Analytics Query Parameters

    +

    Common Parameters

    The Couchbase Analytics Service API supports the following parameters in common with the N1QL for Query REST API.

    For more information on these common parameters, refer to Request-Level Parameters.

    Common Parameters

    Name Description Schema

    statement
    required

    Specifies at least one valid N1QL for Analytics statement to run.

    string

    client_context_id
    optional

    An identifier passed by the client that is returned verbatim in the query response. Useful for matching a particular query to a specific caller.

    string

    format
    optional

    Desired format for the query results.

    Note that the following values are deprecated and will be removed in a future release:
    application/x-adm, application/json, application/json;lossless, and text/csv.
    Default : "JSON"

    enum (JSON, application/x-adm, application/json, application/json;lossless, text/csv)

    pretty
    optional

    If true, the result is indented.
    Default : false

    boolean

    readonly
    optional

    If true, then DDL statements are not allowed.
    Default : false

    boolean

    scan_consistency
    optional

    The consistency guarantee constraint for index scanning. If not_bounded, the query is executed immediately. If request_plus, the required datasets are updated with data available from the Data service at the time of the request before the query is executed.
    Default : "not_bounded"

    enum (not_bounded, request_plus)

    scan_wait
    optional

    The maximum time to wait for datasets to be updated before the query is executed. The format includes an amount and a unit: ns, us, ms, s, m, or h. The default is "" (no timeout).
    Default : ""

    string

    timeout
    optional

    Maximum time to spend on the request before timing out. The format includes an amount and a unit: ns, us, ms, s, m, or h. The default is "" (no timeout).
    Default : ""

    string

    args
    optional

    An array of positional parameter values.

    < object > array

    $identifier
    optional

    A named parameter value.

    string

    The Analytics Service API does not support the prepared parameter.
    The Analytics Service API does not support the at_plus or statement_plus settings for scan consistency.

    Analytics Parameters

    In addition, the Service API supports the following parameters which are unique to Analytics.

    Analytics Parameters

    Name Description Schema

    plan-format
    optional

    The plan format.
    Default : "JSON"

    enum (JSON, STRING)

    logical-plan
    optional

    If true, the logical plan is included in the query response.
    Default : false

    boolean

    optimized-logical-plan
    optional

    If true, the optimized logical plan is included in the query response.
    Default : true

    boolean

    expression-tree
    optional

    If true, the expression tree is included in the query response.
    Default : false

    boolean

    rewritten-expression-tree
    optional

    If true, the rewritten expression tree is included in the query response.
    Default : false

    boolean

    job
    optional

    If true, the job details are included in the query response.
    Default : false

    boolean

    max-warnings
    optional

    An integer specifying the maximum number of warning messages to be included in the query response.
    Default : 0

    integer (int32)