RequestResponse #

Kuzzle normalized API response.

It is accessible from the KuzzleRequest.response property. Most of its properties read or write the request they belong to.

This object is mostly meant to be used internally by Kuzzle. To set the response of an action, use configure.

action #

TypeDescriptionget / set
string
API action name (null if not set)get

collection #

TypeDescriptionget / set
string
Collection name (null if not set)get

controller #

TypeDescriptionget / set
string
API controller name (null if not set)get

deprecations #

TypeDescriptionget / set
Deprecation[]
Deprecation warnings of the request (undefined when there is none)get / set

error #

TypeDescriptionget / set
KuzzleError
Request error (null if none). Setting it calls setErrorget / set

headers #

TypeDescriptionget / set
JSONObject
Response headers. Reading, writing or deleting a key calls getHeader, setHeader or removeHeader. Holds the X-Kuzzle-Node header by defaultget

index #

TypeDescriptionget / set
string
Index name (null if not set)get

node #

TypeDescriptionget / set
string
Identifier of the Kuzzle node processing the requestget

raw #

TypeDescriptionget / set
boolean
If true, the result is sent as is, instead of being wrapped in a response payload (default: false)get / set

requestId #

TypeDescriptionget / set
string
Request idget

result #

TypeDescriptionget / set
any
Request resultget / set

Setting result calls the deprecated setResult method, which also resets the status to 200. Use configure({ result }) instead.

status #

TypeDescriptionget / set
number
Request statusget / set

volatile #

TypeDescriptionget / set
JSONObject
Volatile data of the request (null if not set)get