Back to demo
Demo guide
Demo guide
Run these requests with your demo key.
Set up your terminal
Set the URL and key once.
Example
export API_BASE_URL=https://shipdeploy.work/api/v1
export DEMO_API_KEY=replace-with-your-demo-api-keyCheck service health
Confirm the service is online.
Example
curl https://shipdeploy.work/health.jsonCreate one record
Store one JSON entity.
Example
curl -X POST "$API_BASE_URL/entities.json" \
-H 'content-type: application/json' \
-H 'x-api-key: $DEMO_API_KEY' \
-d '{"id":"person-ada","type":"person","data":{"name":"Ada","active":true,"department":"research"}}'Find a record by id
Read one entity by id.
Example
curl -X POST "$API_BASE_URL/queries/find-entity-by-id.json" \
-H 'content-type: application/json' \
-H 'x-api-key: $DEMO_API_KEY' \
-d '{"id":"person-ada"}'Update a record
Replace the stored type and data for one id.
Example
curl -X POST "$API_BASE_URL/entities/update.json" \
-H 'content-type: application/json' \
-H 'x-api-key: $DEMO_API_KEY' \
-d '{"id":"person-ada","type":"person","data":{"name":"Ada Lovelace","active":true,"department":"research"}}'List records by type
List records with the same type.
Example
curl -X POST "$API_BASE_URL/queries/find-entities-by-type.json" \
-H 'content-type: application/json' \
-H 'x-api-key: $DEMO_API_KEY' \
-d '{"type":"person","page":1,"page-size":20,"sort-by":"updated-at","sort-direction":"desc"}'Delete a record
Soft delete removes the entity from normal reads and lists.
Example
curl -X POST "$API_BASE_URL/entities/delete.json" \
-H 'content-type: application/json' \
-H 'x-api-key: $DEMO_API_KEY' \
-d '{"id":"person-ada","mode":"soft"}'Expiry
After 48 hours, the key stops working and demo data is deleted.