ExecuteCQL
This page details how to execute CQL directly without creating a Saved Query.
Last updated
This page details how to execute CQL directly without creating a Saved Query.
Last updated
You can execute CQL directly without creating a Saved Query using the below endpoint:
Name | Data Type | Description |
---|---|---|
StartRow and RowCount work with API Saved Queries. When using these parameters with ExecuteCQL, the ResultFormat needs to be set to DELIMITED_FILE and an additional Delimiter parameter needs to be added. The delimiter could be a character of your choosing like "," or "|"
Name | Data Type | Description |
---|---|---|
200 (OK)
To pass in parameters in your executeCQL, you will need to pass in sets of parameters in the following format. If you have one parameter then you would pass in 3 query parameters beginning with Parameters[0].
, and if you have a second parameter you would include an additional 3 query parameters beginning with Parameters[1].
.
Query String Parameter Name | Content |
---|---|
CompressJSON
Boolean
Default is true. Add this parameter and set to false if you want the JSON that's returned to be expanded rather than having the schema being returned separately.
ResultFormat
string
XML JSONCSVTSVPSVPROTOBUF
Type
string
QUERY: Query (Approved Data Only) DRAFT_QUERY: Query (Include Draft Changes) SCALAR: See Scalar functions for more information. NONQUERY: Non Query, such as an insert or delete VERSION_HISTORY_QUERY: Query (Include Version History)
ConnectionId
string
TransactionId
string
When one or more requests share the same TransactionId, they're considered to be within the scope of a single transaction.
Query
string
The CQL query statement to execute
Parameters
Boolean
See below on format for the parameters.
SchemaOnly
integer
Defaults to false.
StartRow
integer
When implementing pagination, specify a starting offset. Combine with RowCount to set the size of the data window.
RowCount
integer
When implementing pagination, specify the number of rows to retrieve for the current page. Combine with StartRow to set the paging position.
CommandTimeout
string
Use this parameter to override the default timeout (30s) for long running queries. In seconds.
UserId
string
The ID of a user with authorization to run the saved query.
Authorization
string
Bearer <access_token>
See Authentication for details.
Parameters[n].ParameterName
Name of the parameter that's in your query, including the '@'.
Ex. @name
Parameters[n].XmlSerializedValue
XML Serialized version of the value of that parameter.
Ex. "test"
Parameters[n].ValueType
Datatype of the value.
Ex. System.String