get #
Gets a document.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/<index>/<collection>/<documentId>
Method: GETOther protocols #
{
"index": "<index>",
"collection": "<collection>",
"controller": "document",
"action": "get",
"_id": "<documentId>"
}Kourou #
kourou document:get <index> <collection> <id>Arguments #
collection: collection namedocumentId: document unique identifierindex: index name
Response #
Returns an object with the following properties:
_id: document unique identifier_source: document content_version: document version
{
"status": 200,
"error": null,
"index": "<index>",
"collection": "<collection>",
"controller": "document",
"action": "get",
"requestId": "<unique request identifier>",
"result": {
"_id": "<documentId>",
"_version": 1,
"_source": {
"name": {
"first": "Steve",
"last": "Wozniak"
},
"hobby": "Segway polo",
"_kuzzle_info": {
"author": "Bob",
"createdAt": 1481816934209,
"updatedAt": null,
"updater": null
}
}
}
}