Post results
const url = 'http://localhost:8080/api/v1/projects/example/experiments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/items';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"results":[{"dataset_item_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","error":"example","latency_ns":1,"output":"example","repetition":1,"trace_id":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/projects/example/experiments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/items \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "results": [ { "dataset_item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "error": "example", "latency_ns": 1, "output": "example", "repetition": 1, "trace_id": "example" } ] }'Project members and above, a read-write personal access token, or an API key with write (D-J-5).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Experiment id.
Request Bodyrequired
Section titled “Request Bodyrequired”POST …/experiments/{id}/items body: 1 to 500 results.
object
The results, 1 to 500 of them. One row per item and repetition: a later post replaces it.
One result: what the task answered for one item and repetition.
object
The dataset item. Its input and expected output are copied from the pinned version.
What went wrong, at most 4 096 characters. Omitted when none.
Time the task took, in nanoseconds. Omitted when unknown.
Any JSON value.
0 to repetitions − 1.
The trace of the task run. Omitted when none.
Example generated
{ "results": [ { "dataset_item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "error": "example", "latency_ns": 1, "output": "example", "repetition": 1, "trace_id": "example" } ]}Responses
Section titled “Responses”The rows stored and skipped.
What POST …/items stored.
object
Rows not stored because their trace is being deleted (D-J-9).
Rows written.
Example generated
{ "skipped": 1, "stored": 1}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The request conflicts with the current state.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The request body is larger than the limit.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}