Core
API v1.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.

Kuzzle Response #

A Kuzzle Response is a standardized result. This format is shared by all API routes, including routes added by controller plugins.

A Kuzzle Response is a JSON object with the following format:

PropertyDescription
actionExecuted controller action
collectionData collection name, or null if no collection was involved
controllerExecuted API controller
errorKuzzleError object, or null if there was no error
indexData index name, or null if no index was involved
requestIdRequest unique identifier
resultQuery result, or null if an error occured
statusResponse status, using HTTP status codes
volatileArbitrary data repeated from the initial request

Examples #

This is a response from a successful real-time subscription:

{
  "requestId": "32dfbe90-34e1-43c0-a857-25b715b28a1b",
  "status": 200,
  "error": null,
  "controller": "realtime",
  "action": "subscribe",
  "collection": "bar",
  "index": "foo",
  "volatile": null,
  "result":
  {
    "roomId": "75b6e181f963ead45787871776dda3c1",
    "channel": "75b6e181f963ead45787871776dda3c1-7a90af8c8bdaac1b"
  }
}

And this is an error, obtained by trying to fetch a non-existing document:

{
  "requestId": "b1e9ed17-1910-4356-b9a2-15e177c949f1",
  "status": 404,
  "error":
  {
    "message": "Not Found",
    "status": 404
  },
  "controller": "document",
  "action": "get",
  "collection": "bar",
  "index": "foo",
  "volatile": null,
  "result": null
}