Skip to content

Commit

Permalink
Merge pull request #8245 from heyitsanthony/doc-json-prefix-range
Browse files Browse the repository at this point in the history
dev-guide: document using range_end for prefixes with json
  • Loading branch information
heyitsanthony committed Jul 12, 2017
2 parents ae33c5e + da2f4bb commit 148ed90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Documentation/dev-guide/api_grpc_gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ curl -L http://localhost:2379/v3alpha/kv/put \
curl -L http://localhost:2379/v3alpha/kv/range \
-X POST -d '{"key": "Zm9v"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}

# get all keys prefixed with "foo"
curl -L http://localhost:2379/v3alpha/kv/range \
-X POST -d '{"key": "Zm9v", "range_end": "Zm9w"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}
```

### Watch keys
Expand Down

0 comments on commit 148ed90

Please sign in to comment.