Dataset

Get the state of an import/ingest

Changed on

Poll after POST /datasets/imports until status is ready or failed. An import spends real time fetching from its source before anything is even staged — fetching is the one status only an import ever reports; ingesting/ready/failed mean exactly what they do on GET /datasets/{datasetId}/uploads/{uploadId}, since an import re-enters that same ingest chain once it has fetched and staged its data.

get/datasets/{datasetId}/imports/{importId}

Request

  • Base URL: https://api.qtsurfer.net/v1
  • URL: https://api.qtsurfer.net/v1/datasets/{datasetId}/imports/{importId}
  • Auth: HTTP bearer

Path parameters

datasetIdstring required
Example:ds_3f9a1c2e7b0d4a5f

The id returned by POST /datasets/imports

importIdstring required
Example:imp_01j9z1x2y3z4a5b6c7d8e9f0g1

The importId returned by POST /datasets/imports

Response

Current fetch/ingest state

importIdstring required
status'fetching' | 'ingesting' | 'ready' | 'failed' required
  • fetching — reading from the source; nothing staged yet.
  • ingesting — fetch complete, staged, and re-entered the same ingest chain an upload uses; the worker is parsing and validating it.
  • ready — ingested successfully. version carries the result.
  • failed — the fetch or the ingest that followed it was rejected. error names why.
jobIdstring

The fetch/ingest job id, while status is fetching or ingesting.

errorstring

A human-readable reason, present when status is failed — an unresolvable pool/pair, no data in the requested range, a range older than the configured source retains, the fetch exceeding your tier's time ceiling, or any of DatasetUploadState.error's own ingest-side reasons once fetching hands off to it. Durably recorded, same as on the upload path.

Example response

{
  "importId": "imp_01j9z1x2y3z4a5b6c7d8e9f0g1",
  "status": "ready",
  "error": "Import exceeded the tier's 12 minute ceiling",
  "version": {
    "datasetId": "ds_3f9a1c2e7b0d4a5f",
    "id": "dsv_8e2b4f19c6a03d7e",
    "bytes": 4831022,
    "rows": 86400,
    "cadence": "1s",
    "timestampUnit": "iso",
    "dataUrl": "https://storage.qtsurfer.com/00000000-.../ds_3f9a1c2e7b0d4a5f/dsv_8e2b4f19c6a03d7e/ticker_BTC_USDT_1700000000000_1700086400000_1m.lastra?X-Amz-...",
    "dataFormat": "lastra"
  }
}

Changes