Common Responses
The Couchbase Analytics Service API returns the following responses in common with the N1QL for Query REST API.
For more information on these common responses, refer to the Response section on the N1QL for Query REST API page.
Common Responses
Polymorphism : Composition
Name | Description | Schema |
---|---|---|
requestID |
A unique identifier for the response. |
string (UUID) |
clientContextID |
The client context ID of the request, if one was supplied — refer to |
string |
signature |
The schema of the results. Present only when the query completes successfully. |
object |
results |
An array of all the objects returned by the query. An object can be any JSON value. |
< object > array |
status |
The status of the request. |
enum (success, running, failed, timeout, fatal) |
errors |
An array of error objects. Present only if 1 or more errors are returned during processing of the request. Each error is represented by an object in this list. |
< Errors > array |
warnings |
An array of warning objects. Present only if 1 or more warnings are returned during processing of the request. Each warning is represented by an object in this list. Note that you can specify the maximum number of warning messages to be returned in the query response — refer to |
< Warnings > array |
metrics |
An object containing metrics about the request. |
For information about query parameters, see Analytics Query Parameters.
Errors
Name | Description | Schema |
---|---|---|
code |
A number that identifies the error. |
integer |
msg |
A message describing the error in detail. Refer to Error Codes. |
string |
Warnings
Name | Description | Schema |
---|---|---|
code |
A number that identifies the warning. |
integer |
msg |
A message describing the warning in detail. |
string |
Common Metrics
Name | Description | Schema |
---|---|---|
elapsedTime |
The total time taken for the request, that is the time from when the request was received until the results were returned. |
string |
executionTime |
The time taken for the execution of the request, that is the time from when query execution started until the results were returned. |
string |
resultCount |
The total number of objects in the results. |
integer (unsigned) |
resultSize |
The total number of bytes in the results. |
integer (unsigned) |
errorCount |
The number of errors that occurred during the request. |
integer (unsigned) |
warningCount |
The number of warnings that occurred during the request. |
integer (unsigned) |
Analytics Responses
In addition, the Service API returns the following responses which are unique to Analytics.
Analytics Responses
Polymorphism : Composition
Name | Description | Schema |
---|---|---|
plans |
An object containing the query plans, if requested. |
|
metrics |
An object containing metrics about the request. |
Plans
Name | Description | Schema |
---|---|---|
logicalPlan |
The logical plan. |
object |
optimizedLogicalPlan |
The optimized logical plan. |
object |
rewrittenExpressionTree |
The rewritten expression tree. |
string |
expressionTree |
The expression tree. |
string |
job |
The job details. |
object |
The structure and content of query plans is expected to change as development of the query processor progresses. |