Execute an OPAL query

Execute an OPAL query.

Results can be returned as CSV or NDJSON.

  • Set Accept header to text/csv or application/x-ndjson
  • Default: CSV

Either two of startTime, endTime, and interval or interval alone can be specified to set the time interval. The startTime parameter is inclusive and the endTime parameter is exclusive, to prevent overlap from subsequent windows.

  • interval: An interval relative to now
  • startTime + endTime: The specified time interval
  • startTime or endTime + interval: The specified time interval relative to the provided start or end time

Inputs are specified as dataset IDs, or previously-defined stages.

Set paginate to true for an asynchronous paginated mode. The response will be 202 Accepted and contain headers for fetching the results via /v1/meta/export/query/page. You may also want to increase rowCount to allow large, paginated queries.

Query Params
string

Beginning of time window (inclusive) as ISO time.

string

End of time window (exclusive) as ISO time. Defaults to now if just interval is specified.

string

Length of time window (if start or end is missing).

string

Which stage to get the data from. Defaults to last stage.

boolean

Whether to switch to an asynchronous paginated mode. Defaults to false.

Body Params

The OPAL query text and input dataset bindings.

query
object
required

Encodes the actual OPAL query and its inputs.

string
0 to 100000

The maximum number of rows to return. Defaults to 100,000, which is the maximum if paginate=false. If paginate=true rowCount can be up to the maximum value of int64 (9,223,372,036,854,775,807).

presentation
object
Headers
string
enum
Defaults to application/x-ndjson

Generated from available response content types

Allowed:
Responses

400

Query not accepted.

401

Authorization missing.

403

Authorization denied.

429

Rate limit exceeded.

500

Internal error: query error.

504

Internal error: infrastructure error.

Language
Credentials
Bearer
Authorization: Bearer <customerid> <apitoken>
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/x-ndjson
text/csv
*/*