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.

      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
      optional

      A unique identifier for the response.

      string (UUID)

      clientContextID
      optional

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

      string

      signature
      optional

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

      object

      results
      optional

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

      < object > array

      status
      optional

      The status of the request.

      enum (success, running, errors, completed, stopped, timeout, fatal)

      errors
      optional

      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
      optional

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

      < Warnings > array

      metrics
      optional

      An object containing metrics about the request.

      For information about query parameters, see Analytics Query Parameters.

      Errors

      Name Description Schema

      code
      optional

      A number that identifies the error.

      integer

      msg
      optional

      A message describing the error in detail. Refer to Error Codes.

      string

      Warnings

      Name Description Schema

      code
      optional

      A number that identifies the warning.

      integer

      msg
      optional

      A message describing the warning in detail.

      string

      Common Metrics

      Name Description Schema

      elapsedTime
      optional

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

      string

      executionTime
      optional

      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
      optional

      The total number of objects in the results.

      integer (unsigned)

      resultSize
      optional

      The total number of bytes in the results.

      integer (unsigned)

      errorCount
      optional

      The number of errors that occurred during the request.

      integer (unsigned)

      warningCount
      optional

      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
      optional

      An object containing the query plans, if requested.

      metrics
      optional

      An object containing metrics about the request.

      Plans

      Name Description Schema

      logicalPlan
      optional

      The logical plan.

      object

      optimizedLogicalPlan
      optional

      The optimized logical plan.

      object

      rewrittenExpressionTree
      optional

      The rewritten expression tree.

      string

      expressionTree
      optional

      The expression tree.

      string

      job
      optional

      The job details.

      object

      The structure and content of query plans is expected to change as development of the query processor progresses.

      Analytics Metrics

      Name Description Schema

      processedObjects
      optional

      Number of processed tuples during query execution.

      integer (int64)