Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Status Sql Query

GET/api/v2/sqlQueries/{sqlQueryId}/getStatus
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Gets the status of a query.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:sql-queries-read.

Path parameters

sqlQueryId
string

The id of a query.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Response body

QueryStatus
union
Hide child attributes

Hide child attributes

running
object
optional
Show child attributes

Show child attributes

canceled
object
optional
failed
object
optional
Show child attributes

Show child attributes

succeeded
object
optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 curl \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/sqlQueries/OikKBfqBaWRjOGQ3YTJkNzMtYjhiZi00ZDMzLTlkOWMtOGQzOW/getStatus?preview=true"

Error responses

Error Name
QueryPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionThe provided token does not have permission to access the given query.
ParametersqueryId
QueryCanceledError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe query was canceled.
ParametersqueryId
QueryFailedError CodeINTERNAL
Status Code500
DescriptionThe query failed.
ParametersqueryId, errorMessage
QueryParseErrorError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe query cannot be parsed.
ParameterserrorMessage
QueryRunningError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe query is running.
ParametersqueryId
ReadQueryInputsPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionThe provided token does not have permission to access the inputs to the query.
Parametersrids
GetStatusSqlQueryPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not getStatus the SqlQuery.
ParameterssqlQueryId