query #
Available since 7.9.0
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]);
Argument | Type | Description |
---|---|---|
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.
Property | Type | Description |
---|---|---|
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
Property | Type (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.
Edit this page on Github(opens new window)