Export an NQL
Export large datasets to S3 and track export status
Starts the execution of a query that will finish with the export of the results to a file in S3. The service response contains an identifier that can be used in the "status" operation to obtain the URL of the file with the results.
Identifier of the query which is going to be executed.
#my_query_id
The compression algorithm for the export. If not set, no compression is applied. Allowed values: NONE
, ZSTD
, GZIP
.
ZSTD
OK - Successful execution.
Unauthorized - No valid authentication credentials.
No permission - Not authorized to execute queries.
Not found - No query associated with that ID.
Internal server error.
Service unavailable.
GET /api/v1/nql/export?queryId=text HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"exportId": "text"
}
Starts the execution of a query that will finish with the export of the results to a file in S3. The service response contains an identifier that can be used in the "status" operation to obtain the URL of the file with the results.
Identifier of the query which is going to be executed.
#my_query_id
Pattern: ^#[a-z0-9_]{2,255}$
The compression algorithm for the export. If not set, no compression is applied.
ZSTD
Possible values: OK - Successful execution.
Unauthorized - No valid authentication credentials.
No permission - Not authorized to execute queries
Not found - No query associated with that ID.
Internal server error.
Service unavailable.
POST /api/v1/nql/export HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 132
{
"queryId": "#my_query_id",
"parameters": {
"parameterName1": "parameterValue1",
"parameterName2": "parameterValue2"
},
"compression": "ZSTD"
}
{
"exportId": "text"
}
Retrieve the status of an export given its identifier.
Export identifier
OK - Successful execution.
Partial Content - The query results were truncated because the maximum number of results allowed by the license was reached
Unauthorized - No valid authentication credentials.
No permission - Not authorized to execute queries.
Not found - No export associated with that ID.
Too many requests - The user has reached the daily request limit.
Internal server error.
Service unavailable.
GET /api/v1/nql/status/{exportId} HTTP/1.1
Host: instance.api.region.nexthink.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"status": "SUBMITTED",
"resultsFileUrl": "text",
"errorDescription": "text"
}
Was this helpful?