Cases API
Definition
Under the organization/project prefix, current routes include:
Paths above are suffixes of /v1/organizations/{organizationKey}/projects/{projectId}.
GET /cases GET /cases/{caseId} POST /cases/imports GET /cases/imports/{importId} PUT /cases/{caseId}/reference-result POST /cases/reference-results
Read behavior
Case lists use data.columns and data.rows; detail uses result. Case IDs and dataset-record IDs remain their issued identities. Canonical content, schema version, derived search text, compatibility metadata and latest reference-output context are distinct fields.
These project reads do not define membership of a fixed Benchmark Version. Use the benchmark case-manifest for exact frozen Cases used by an evaluation.
Reference responses
A Case reference-result operation is different from an external candidate Run. Reference-result replacement controls and outcomes do not authorize overwriting accepted benchmark Trial responses.
Input contract
Canonical Case content uses its declared input container and material blocks. Project Input Schema constrains future Case authoring. This router does not establish the old proposed customer /input-schema or /cases/{caseId}/versions endpoints.
List and retrieve Cases
Configure PROJECT_URL with the quickstart. The list defaults to 10 rows, permits limit from 1 through 1,000 and uses nonnegative offset. Conditional reads use the returned ETag with If-None-Match.
curl --fail-with-body \
--header "Authorization: Bearer ${TEAMMATELY_API_KEY}" \
"${PROJECT_URL}/cases?limit=10&offset=0"
# CASE_ID is a case_id returned in data.rows.
curl --fail-with-body \
--header "Authorization: Bearer ${TEAMMATELY_API_KEY}" \
"${PROJECT_URL}/cases/${CASE_ID}"
Write a reference response
PUT /cases/{caseId}/reference-result accepts output and optional normalized trajectory. It returns 201 for a created reference or 200 for a replacement/unchanged reference, plus an ETag. If-Match supplies a conditional precondition.
The batch operation requires Idempotency-Key and returns per-Case outcomes. See ReferenceResultWrite and ReferenceResultBatchWrite in the OpenAPI for replacement controls and batch fields.
