Deployments.ai Docs
Evaluations

Import cases from a JSON case file

POST /v1/regression-datasets/{datasetId}/cases/import · SDK importDatasetCases · CLI deployments eval case import

POST
/v1/regression-datasets/{datasetId}/cases/import

Requires observability:write.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

datasetId*string

Regression dataset ID.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
cases*array<>
Items1 <= items <= 100

Response Body

ImportDatasetCasesResponse

application/json
  1. response
created*integer
Range0 <= value <= 9007199254740991
existing*integer
Range0 <= value <= 9007199254740991
items*array<>
curl -X POST "https://example.com/v1/regression-datasets/string/cases/import" \  -H "x-deployments-organization: string" \  -H "x-deployments-project: string" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "cases": [      {        "message": "string"      }    ]  }'
{  "created": 0,  "existing": 0,  "items": [    {      "case": {        "consentBasis": "string",        "contentSha256": "string",        "createdAt": "2019-08-24T14:15:22Z",        "datasetId": "string",        "expectationKinds": [          "string"        ],        "externalId": "string",        "id": "string",        "inputPreview": "string",        "provenance": "annotation",        "sourceRunId": "string",        "sourceThreadId": "string",        "sourceTraceId": "string",        "tags": [          "string"        ]      },      "created": true,      "externalId": "string"    }  ]}