SDK
SDK Javascript v6.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

query #

Base method used to send queries to a Kuzzle controller, following the API Documentation.

This method injects the controller name into the the request and forwards it to the original Kuzzle.query method.

Arguments #

query (request, [options]);

ArgumentTypeDescription
request
object
API request
options
object
Optional query options

request #

All properties necessary for the Kuzzle API can be added in the request object. The following properties are the most common.

PropertyTypeDescription
action
string
Action name (required)
controller
string
Controller name
body
object
Query body for this action
index
string
Index name for this action
collection
string
Collection name for this action
_id
string
id for this action
volatile
object
Additional information to send to Kuzzle

Note:

  • If the controller property is not set, the controller name property will be used

options #

Additional query options

PropertyType
(default)
Description
queuable
boolean

(true)
If true, queues the request during downtime, until connected to Kuzzle again

Resolves #

Resolve to the raw Kuzzle API response. See the API Documentation.