Append explicit recorded cases to the latest pinned dataset version

POST /api/v1/public/datasets/{datasetId}/traces

POST /api/v1/public/datasets/{datasetId}/traces

Create or trigger datasets traces.

Operation ID: post_api_v1_public_datasets_datasetId_traces.

Authentication

Choose a credential. Each row is an accepted alternative; access also depends on current roles, project bindings, and entitlements.

CredentialCarrierOAuth scopes
ServiceAccountBearerAuthAuthorization: BearerSee credential policy
OAuth2Authorization: Bearerevaluation:write

For OAuth and service-account credentials, send the selected project UUID in x-project-id, including when the header is optional for legacy keys.

Service-account tokens need the corresponding functional scopes listed for OAuth, as well as an active binding and role for the selected project.

Availability

This operation requires the public-api-mutations capability to be enabled for the deployment. Its presence in the contract does not guarantee availability. See operation availability.

Request parameters

NameLocationRequiredType / allowed valuesDescription / constraints
datasetIdpathYesstringdatasetId path parameter; format: uuid; Pattern constrained; see the downloadable schema.
idempotency-keyheaderYesstringidempotency-key header parameter; Required canonical UUIDv4 or high-entropy base64url idempotency key; minLength: 22; maxLength: 43; Pattern constrained; see the downloadable schema.
x-project-idheaderYesstringx-project-id header parameter; format: uuid; Pattern constrained; see the downloadable schema.

Request body

Body required: yes.

application/json

FieldType / allowed valuesRequired in parentDescription / constraints
$objectYesadditionalProperties: false
idempotencyKeystringYesformat: uuid; Pattern constrained; see the downloadable schema.
traceIdsarray<string>NomaxItems: 500
traceIds[]stringYesminLength: 1; maxLength: 255
spanIdsarray<object>NomaxItems: 500
spanIds[]objectYesadditionalProperties: false
spanIds[].traceIdstringYesminLength: 1; maxLength: 255
spanIds[].spanIdstringYesminLength: 1; maxLength: 255
includeRootbooleanNodefault: false
skipExistingbooleanNodefault: true
baseVersionIdstringYesformat: uuid; Pattern constrained; see the downloadable schema.
replaceCasesarray<object>NominItems: 1; maxItems: 500
replaceCases[]objectYesadditionalProperties: false
replaceCases[].caseIdstringYesformat: uuid; Pattern constrained; see the downloadable schema.
replaceCases[].traceIdstringYesminLength: 1; maxLength: 255

Request example

Replace placeholder IDs and environment variables with values from your authorized project. Credentials are expanded into curl's stdin configuration, not its command arguments. Keep shell tracing off and do not log this configuration. For requests with a body, put a payload matching the schema in request-body.txt; form requests use URL-encoded content.

curl --fail-with-body --silent --show-error --config - <<CURL_CONFIG
request = "POST"
header = "Authorization: Bearer ${NEATLOGS_TOKEN}"
header = "idempotency-key: ${IDEMPOTENCY_KEY}"
header = "x-project-id: ${NEATLOGS_PROJECT_ID}"
header = "Content-Type: application/json"
data-binary = "@request-body.txt"
url = "https://app.neatlogs.com/api/v1/public/datasets/<datasetId>/traces"
CURL_CONFIG

Responses

StatusDescriptionContent type
202Durable append queued; version drift rejects publicationapplication/json
400Invalid public API requestapplication/problem+json
401Missing or invalid public API credentialapplication/problem+json
403Public API request is not authorizedapplication/problem+json
404Dataset or source not found in projectapplication/problem+json
409Dataset version or idempotency conflictapplication/problem+json
413Public API request body too largeapplication/problem+json
415Unsupported public API request bodyapplication/problem+json
422Evaluation setup is unavailableapplication/problem+json
429Public API rate limit exceededapplication/problem+json
500Internal server errorapplication/problem+json
503Public API credential, project context, or rate limiting unavailable. Backend is draining; retry after the Retry-After delay.application/problem+json, application/json

202 response fields

Content type: application/json.

FieldType / allowed valuesRequired in parentDescription / constraints
$objectYesadditionalProperties: false
dataobjectYesadditionalProperties: false
data.captureIdstringYesformat: uuid; Pattern constrained; see the downloadable schema.
data.datasetIdstringYesformat: uuid; Pattern constrained; see the downloadable schema.
data.state"recording" | "queued" | "running" | "needs_review" | "completed" | "failed" | "cancelled"Yes—
requestIdstringYesPattern constrained; see the downloadable schema.
successtrueYes—

Failures use Problem Details. For exact validation patterns and all response schemas, download the OpenAPI specification.

On this page

neatlogs
neatlogs

Ask neatlogs AI

Answers grounded in the docs

neatlogs

How can I help?

Ask anything about Incidents, Experiments, tracing, or the neatlogs dashboard.