POST
/
trpc
/
datasets.getStatus
Get Dataset Status
curl --request POST \
  --url https://api.kontext.dev/trpc/datasets.getStatus

Overview

  • Type: tRPC query
  • Path: POST /trpc/datasets.getStatus
  • Auth: x-api-key (required)

Request (tRPC HTTP)

One of jobId or datasetId is required. Body (POST JSON):
{
  "input": {
    "jobId": "job_..."
    // or
    // "datasetId": "ds_..."
  }
}

Response (tRPC envelope)

200 OK
{
  "result": {
    "data": {
      "status": "pending|processing|completed|failed|not_found",
      "progress": 123,
      "error": null,
      "startedAt": "2025-09-07T20:14:18.000Z",
      "completedAt": null
    }
  }
}
Note: SDK and tRPC clients return the inner object directly (no wrapper).

Examples

curl -X POST https://api.kontext.dev/trpc/datasets.getStatus \
  -H "x-api-key: ktext_abc123..." \
  -H "content-type: application/json" \
  -d '{
    "input": { "jobId": "job_123" }
  }'

Behavior notes

  • jobId: exact job lookup
  • datasetId: resolves the latest full_sync job for this dataset under your developer’s internal user
  • not_found: returned as a status (200 OK) if no job is known

Errors

  • 401 UNAUTHORIZED — invalid API key
  • 400 BAD_REQUEST — using datasetId but your developer is not linked to a user internally

Next steps

  • Upload Dataset: /datasets/upload (source of jobId)
  • After indexing: facts‑first QA /trpc/datasets.query, vector search /trpc/datasets.search