Queries

Read query results by offset

Changed on

Read a completed job's stored result by raw byte offset. See Reading large results for the full flow with completionOnly.

Results stay readable for about an hour after the job completes. Reading a job that hasn't completed yet, or whose result has expired, returns an error status on the job line.

get/v1/query/results

Request

  • Base URL
    https://blobsrus.omniapp.co/api
  • URL
    https://blobsrus.omniapp.co/api/v1/query/results
  • Auth
    HTTP bearer

Query parameters

jobIdstring uuid required
Example:a1b2c3d4-e5f6-7890-abcd-ef1234567890

ID of a completed query job, from the Run query or Wait for query results response. Only one job can be read per request.

offsetinteger

Raw result byte to start reading from: 0, or the previous response's stream_stats.next_offset.

maxBytesinteger
Example:50000000

Most raw result bytes to return. Omit to read to the end of the result.

timeoutMsinteger
Example:60000

Stop streaming after roughly this many milliseconds; stream_stats.next_offset says where to resume. At least one chunk is always returned, so a slow read can't stall at the same offset.

Response

The requested byte window of the job's result, streamed as newline-delimited JSON (text/ndjson): one job line, then a footer line. The response as a whole cannot be parsed as a single JSON document — parse it line by line.

Changes