Dataset

Get the state of an upload/ingest

Changed on

Poll after POST .../finalize until status is ready or failed. Also reports uploading (finalize not called yet, but the file was PUT) before you finalize at all.

get/datasets/{datasetId}/uploads/{uploadId}

Request

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

Path parameters

datasetIdstring required
Example:ds_3f9a1c2e7b0d4a5f

The id returned by POST /datasets

uploadIdstring required
Example:up_1a2b3c4d5e6f7a8b

The uploadId returned by POST /datasets

Response

Current upload/ingest state

uploadIdstring required
status'uploading' | 'ingesting' | 'ready' | 'failed' required
  • uploading — the file was PUT to the presigned URL, but finalize has not been called yet.
  • ingesting — finalize was called; the worker is parsing and validating the file.
  • ready — ingested successfully. version carries the result.
  • failed — ingest rejected the file (e.g. bad CSV contract, mixed timestamp units, a .zip with no file inside or more than one).
jobIdstring

The ingest job id, while status is ingesting.

errorstring

A human-readable reason, present when status is failed (e.g. bad CSV contract, mixed timestamp units, a .zip with no file inside or more than one). Durably recorded alongside the failure itself, so it stays available however long after the fact you poll — not tied to how recently the failure happened.

Example response

{
  "uploadId": "up_1a2b3c4d5e6f7a8b",
  "status": "ready",
  "error": "line 3: column 'close' is not a number: not-a-number",
  "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