The request body of a SQL request is a JSON object. The only mandatory field is query; however, you can use the optional fields to control how the request is submitted and how the results are returned.
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
query | String | One or more SQL statements to run separated by a semicolon. The SQL statements can be parameterized by including question marks in place of SQL literals. For example, INSERT INTO mytable VALUES (?, ?, ?) |
- | Yes |
params | Array | Array of arrays containing parameters to the SQL statement. If more than one array exists, the statement is run multiple times, each time with the next array of parameters in the array. |
- | No |
outParams | Array | Array of names of output parameters for a stored procedure. | - | No |
batch | Boolean | If the statements are run using JDBC batch processing, set to true, else false. | false | No |
session | Long | Session ID generated by the service. If the session is already in use, the request is queued. | - | No Uses implicit session when not specified. |
queryBands | Object | SESSION query bands to append prior to running the query. For example, { "queryBand1":"value1", "queryBand2":"value2" } | - | No |
queueTimeout | Integer | Number of seconds the request waits in the queue before timing out. A zero value indicates that the request is not queued, and returns an error. | no timeout | No |
queryTimeout | Integer | Number of seconds the client waits for the query to complete before timing out. For example, see JDBC Statement.setQueryTimeout() | no timeout | No |
clientId | String | Unique ID specified by the client for later lookup of the state of the query. | - | No |
rowOffset | Integer | Number of rows to discard at the beginning of the result set. Used when implementing paging. | 0 | No |
rowLimit | Integer | Number of rows to limit the response to. A value of 0 disables the limit. | 1000 | No |
format | String | Format to return the data. The format can be one of the following:
|
object | No |
includeColumns | Boolean | Indicates whether to include the column metadata in the response, such as the column names and types. Columns are included in the CSV output if the request format is "csv." | false | No |