Braintest
POST/v1/project_logs/{project_id}/insert

Insert project log events

Inserts a set of events into the logs for a project. Supply the events in events, including the application inputs and outputs you want to evaluate, optional scores and metadata, execution metrics, context, tags, and event identifiers. Use the merge controls when you need to replace or deep-merge an existing event with the same id.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
project_idstringrequired
The project's unique identifier in UUID format.

An object containing the project log events to insert.

eventsarray<object>required
A list of project logs events to insert

6 status codes
200Returns an object containing `row_ids`, an array of inserted row identifiers aligned one-to-one with the submitted events.
row_idsarray<string>required
The ids of all rows that were inserted, aligning one-to-one with the rows provided as input
400Returned when the request is unacceptable, including when the required `events` field is missing or an event fails validation.
401Returned when no valid API key is provided.
403Returned when the API key does not have permission to insert project log events.
429Returned when too many requests reach the API too quickly.
500Returned when an internal API failure occurs.

Error handling

The events field is required, and a 400 is returned when it is missing or the request is unacceptable. A 401 indicates that no valid API key was provided, while a 403 indicates that the API key lacks permission; a 429 indicates excessive request frequency, and a 500 indicates an internal API failure. Keep values in scores between 0 and 1, and use _is_merge with _merge_paths only when controlling how an existing event is merged.