mirror of
https://github.com/pikami/cosmium.git
synced 2024-11-24 22:47:11 +00:00
25 lines
568 B
HTTP
25 lines
568 B
HTTP
### Create collection
|
|
|
|
POST https://localhost:8081/dbs/db1/colls
|
|
Content-Type: application/json
|
|
|
|
{"id":"test1", "partitionKey":{"paths":["/pk"],"kind":"Hash","version":2}}
|
|
|
|
### Insert document
|
|
|
|
POST https://localhost:8081/dbs/db1/colls/test/docs
|
|
Content-Type: application/json
|
|
|
|
{"id":"1","_pk":"123","isCool":true}
|
|
|
|
### Get all documents
|
|
|
|
GET https://localhost:8081/dbs/db1/colls/test/docs
|
|
|
|
### Query documents
|
|
|
|
POST https://localhost:8081/dbs/db1/colls/test/docs
|
|
Content-Type: application/json
|
|
|
|
{"query":"SELECT c.id, c.isCool AS cool FROM c WHERE c.isCool = false"}
|