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 — refer to 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 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.

    error.code

    int

    A number that identifies the error.

    error.msg

    string

    A message describing the error in detail.

    warnings

    list

    A list 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 max-warnings in Query Parameters. By default, no warnings are returned, even if warnings have occurred during processing.

    warning.code

    int

    A number that identifies the warning.

    warning.msg

    string

    A message describing the warning 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.

    metrics.warningCount

    unsigned int

    The number of warnings that occurred during the request.

    For more information on these common responses, refer to 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.