lrange #
Returns the list elements between the start
and stop
positions.
Offsets start at 0
, and the range is inclusive.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/ms/_lrange/<_id>?start=<start>&stop=<stop>
Method: GET
Other protocols #
{
"controller": "ms",
"action": "lrange",
"_id": "<key>",
"start": 0,
"stop": -3
}
Argument #
_id
: list key identifierstart
: starting indexstop
: ending index
The arguments start
and stop
can be negative. In that case, the offset is calculated from the end of the list, going backward. For instance, -3
is the third element from the end of the list.
Response #
Returns an array of list elements.
{
"requestId": "<unique request identifier>",
"status": 200,
"error": null,
"controller": "ms",
"action": "lrange",
"collection": null,
"index": null,
"result": [
"value1",
"value2",
"..."
]
}
Edit this page on Github(opens new window)