Execute a Query
post
/20190828/query
Execute a SQL query.
Request
Query Parameters
-
limit: integer
Minimum Value:
1
Maximum Value:1000
The maximum number of items to return.Default Value:1000
-
page: string
Minimum Length:
1
Maximum Length:1024
The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
Header Parameters
-
opc-request-id: string
The client request ID for tracing.
SQL query statement and ancillary information.
Root Schema : QueryDetails
Type:
object
All the information surrounding a query, including the query statement,
limits, consistency, and so forth.
Show Source
-
compartmentId:
string
Compartment OCID, to provide context for a table name in the given statement.
-
consistency(optional):
string
Default Value:
EVENTUAL
Allowed Values:[ "EVENTUAL", "ABSOLUTE" ]
Consistency requirement for a read operation. -
isPrepared(optional):
boolean
If true, the statement is a prepared statement.
-
maxReadInKBs(optional):
integer
Default Value:
0
A limit on the total amount of data read during this operation, in KB. -
statement:
string
A NoSQL SQL query statement; or a Base64-encoded prepared statement.
-
timeoutInMs(optional):
integer
Default Value:
5000
Timeout setting for the query. -
variables(optional):
object variables
Additional Properties Allowed: additionalPropertiesA map of prepared statement variables to values.
Nested Schema : variables
Type:
object
Additional Properties Allowed
Show Source
A map of prepared statement variables to values.
Nested Schema : additionalProperties
Type:
object
Response
Supported Media Types
- application/json
200 Response
QueryResultCollection comprises an array of results and
usage information.
Headers
-
opc-next-page: string
For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : QueryResultCollection
Type:
object
The result of a query.
Show Source
-
items(optional):
array items
Array of objects representing query results.
-
usage(optional):
object RequestUsage
The usage metrics for a request.
Nested Schema : items
Type:
array
Array of objects representing query results.
Show Source
-
Array of:
object items
Additional Properties Allowed: additionalPropertiesThe map of values from a row.
Nested Schema : RequestUsage
Type:
object
The usage metrics for a request.
Show Source
-
readUnitsConsumed(optional):
integer
Read Units consumed by this operation.
-
writeUnitsConsumed(optional):
integer
Write Units consumed by this operation.
Nested Schema : items
Type:
object
Additional Properties Allowed
Show Source
The map of values from a row.
Nested Schema : additionalProperties
Type:
object
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
retry-after: number(float)
A decimal number representing the number of seconds the client should wait before polling this endpoint again.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.
Default Response
Unknown Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code:
string
A short error code that defines the error, meant for programmatic parsing.
-
message:
string
A human-readable error string.