Query

Read a completed query job's results by byte offset

Changed on

Reads a completed job's stored result by byte offset, so a large result can be fetched in pieces and a dropped connection resumed. Typical flow: query/run and query/wait with completionOnly: true until the job is COMPLETE, then call this repeatedly, starting at offset 0 and passing each response's stream_stats.next_offset until it is null. Each result is base64 of a raw byte slice of the Arrow IPC stream; decode and append the slices, then parse the joined bytes. The response has the same text/ndjson framing as query/wait. Results stay readable for about an hour after the job completes; after that, and for a job that has not completed, the job line reports an error status.

get/api/v1/query/results

Request

  • Base URL
    https://omniapp.co (the document declares no server; this is the origin it was published from)
  • URL
    https://omniapp.co/api/v1/query/results
  • Auth
    HTTP bearer

Query parameters

jobIdstring uuid required

ID of a completed query job, from the query/run or query/wait response.

Example:123e4567-e89b-42d3-a456-426614174000
maxBytesinteger

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

Example:50000000
offsetinteger

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

timeoutMsinteger

Stop streaming after roughly this many milliseconds; stream_stats.next_offset says where to resume. At least one chunk is always returned.

Example:60000

Response

One job line carrying the requested slice in result and the byte window in stream_stats, then a footer, as a text/ndjson stream.

Changes