Added documentation for sorted listings.
parent
3b485e20bb
commit
c62603ba73
32
README.md
32
README.md
|
@ -330,6 +330,38 @@ curl -X POST http://127.0.0.1:4001/v2/keys/queue -d value=Job2
|
|||
}
|
||||
```
|
||||
|
||||
To enumerate the in-order keys as a sorted list, use the "sorted" parameter.
|
||||
|
||||
```sh
|
||||
curl -s -X GET 'http://127.0.0.1:4001/v2/keys/queue?recursive=true&sorted=true' | python -m json.tool
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "get",
|
||||
"node": {
|
||||
"createdIndex": 2,
|
||||
"dir": true,
|
||||
"key": "/queue",
|
||||
"modifiedIndex": 2,
|
||||
"nodes": [
|
||||
{
|
||||
"createdIndex": 2,
|
||||
"key": "/queue/2",
|
||||
"modifiedIndex": 2,
|
||||
"value": "Job1"
|
||||
},
|
||||
{
|
||||
"createdIndex": 3,
|
||||
"key": "/queue/3",
|
||||
"modifiedIndex": 3,
|
||||
"value": "Job2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
[lockmod]: #lock
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue