A newer version of this documentation is available.

View Latest

Analytics Query Responses

    +

    Common Responses

    The Couchbase Analytics Service API returns the following responses in common with the N1QL for Query REST API.

    Parameter Type Description

    requestID

    UUID

    A unique identifier for the response.

    clientContextID

    string

    The client context ID of the request, if one was supplied — see client_context_id in Query Parameters.

    signature

    object

    The schema of the results. Present only when the query completes successfully.

    results

    list

    A list of all the objects returned by the query. An object can be any JSON value.

    status

    enum

    The status of the request. Possible values are: success, running, errors, completed, stopped, timeout, fatal.

    errors

    list

    A list of 0 or more error objects. If an error occurred during processing of the request, it will be represented by an error object in this list.

    error.code

    int

    A number that identifies the error.

    error.msg

    string

    A message describing the error in detail.

    metrics

    object

    An object containing metrics about the request.

    metrics.elapsedTime

    string

    The total time taken for the request, that is the time from when the request was received until the results were returned.

    metrics.executionTime

    string

    The time taken for the execution of the request, that is the time from when query execution started until the results were returned.

    metrics.resultCount

    unsigned int

    The total number of objects in the results.

    metrics.resultSize

    unsigned int

    The total number of bytes in the results.

    metrics.errorCount

    unsigned int

    The number of errors that occurred during the request.

    For more information on these common responses, see the Response section on the N1QL for Query REST API page.

    Analytics Responses

    In addition, the Service API returns the following responses which are unique to Analytics.

    Parameter Type Description

    metrics.processedObjects

    long

    Number of processed tuples during query execution.

    plans

    object

    Possible elements: logicalPlan, optimizedLogicalPlan, rewrittenExpressionTree, expressionTree, and job.