You are viewing the documentation for a prerelease version.

View Latest

Couchbase Analytics Service Query Parameters

Common Parameters

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

Parameter Default Values

statement

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

client_context_id

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

format

application/json

application/x-adm, application/json, application/json;lossless, text/csv, json

pretty

FALSE

TRUE or FALSE. If TRUE, the result will be indented. (Optional.)

scan_consistency

not_bounded

not_bounded or request_plus. 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.

scan_wait

0s (no timeout)

An amount and a unit: ns, us, ms, s, m, or h. The maximum time to wait for datasets to be updated before the query is executed.

timeout

0s (no timeout)

An amount and a unit: ns, us, ms, s, m, or h.

args

An array of positional parameter values.

$<identifier>

A named parameter value.

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

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.

Parameter Default Values

plan-format

JSON

JSON, STRING

logical-plan

FALSE

TRUE, FALSE

optimized-logical-plan

TRUE

TRUE, FALSE

expression-tree

FALSE

TRUE, FALSE

rewritten-expression-tree

FALSE

TRUE, FALSE

job

FALSE

TRUE, FALSE