Add items from several traces
const url = 'http://localhost:8080/api/v1/projects/example/datasets/example/items/from-traces';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"items":[{"span_id":"example","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/datasets/example/items/from-traces \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "items": [ { "span_id": "example", "trace_id": "example" } ] }'Project members and above, a read-write personal access token, or an API key with write (D-J-5, D-J-25). Copies 1 to 100 traces as from-trace does, in one new version. A trace that cannot be copied is listed in skipped; no copyable trace is a 400.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Dataset id, or its name.
Request Bodyrequired
Section titled “Request Bodyrequired”POST …/items/from-traces body (D-J-25): 1 to 100 traces, each copied as from-trace copies it.
object
The traces to copy, 1 to 100 of them.
One trace of a bulk add from traces (D-J-25): the trace, and the span when it is not the root.
object
16 hex digits. Absent: the trace root.
32 hex digits, either case.
Example generated
{ "items": [ { "span_id": "example", "trace_id": "example" } ]}Responses
Section titled “Responses”The new version, the items added and the traces skipped.
The answer of a bulk add from traces (D-J-25): the new version, the items it added, and the traces that were not copied.
object
The items added, in request order.
One item as it is in a version.
object
Creation time of this revision. JSON is RFC 3339.
Any JSON value.
The item id, stable across versions.
Any JSON value.
object
This revision.
The span the item was copied from. Omitted when none.
The trace the item was copied from. Omitted when none.
The version that introduced this revision.
Every trace that was not copied, in request order.
A trace of a bulk add that was not copied (D-J-25).
object
Position of the trace in the request.
Why it was not copied.
The trace id as the request gave it.
The version the copies were added in.
object
Items this version adds (D-J-24).
Creation time. JSON is RFC 3339.
The user id, or key:<key id> for an API key. Omitted when unknown.
Items this version deletes (D-J-24).
What changed, e.g. add 12 items.
Items this version edits (D-J-24).
Version number. Versions start at 1.
Example generated
{ "items": [ { "created_at": "2026-04-15T12:00:00Z", "expected_output": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "input": "example", "metadata": {}, "revision_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_span_id": "example", "source_trace_id": "example", "version": 1 } ], "skipped": [ { "index": 1, "message": "example", "trace_id": "example" } ], "version": { "added": 1, "created_at": "2026-04-15T12:00:00Z", "created_by": "example", "deleted": 1, "description": "example", "edited": 1, "version": 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"}The server is busy or a dependency is unavailable. Retry later.
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"}