Execute an NQL

Execute NQL queries and retrieve data in JSON or CSV format

Execute an NQL V1

post

Executes an NQL query and returns the results.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
AuthorizationstringOptional
Acceptstring · nullableOptional

Set it to application/json for a JSON response, text/csv for a CSV response. If no value is set, application/json is used by default. Otherwise a 406 error (not acceptable) is returned.

Example: application/json
Body
queryIdstring · min: 1 · max: 255Required

Identifier of the query which is going to be executed.

Example: #my_query_idPattern: ^#[a-z0-9_]{2,255}$
Responses
chevron-right
200

OK - Successful execution.

queryIdstringOptional

Identifier of the executed query

executedQuerystringOptional

Final query executed with the replaced parameters.

rowsinteger · int64Optional

Number of rows returned

headersstring[]Optional

Ordered list with the headers of the returned fields.

dataobject[][]Optional

List of rows with the data returned by the query execution.

post
/api/v1/nql/execute

Execute an NQL V2

post

Executes an NQL query and returns the results.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
AuthorizationstringOptional
Acceptstring · nullableOptional

Set it to application/json for JSON response, text/csv for CSV response. If no value is set, application/json is used by default. Otherwise a 406 error (not acceptable) is returned.

Example: application/json
Body
queryIdstring · min: 1 · max: 255Required

Identifier of the query which is going to be executed.

Example: #my_query_idPattern: ^#[a-z0-9_]{2,255}$
Responses
chevron-right
200

OK - Successful execution.

queryIdstringOptional

Identifier of the executed query

executedQuerystringOptional

Final query executed with the parameters replaced

rowsinteger · int64Optional

Number of rows returned

executionDateTimestringOptional

Date and time of the execution in ISO format

Example: 2023-03-07T15:56:02
post
/api/v2/nql/execute

Last updated

Was this helpful?