@kanecta/api
v1.0.1
Published
Kanecta HTTP API — exposes all datastore operations over REST
Downloads
361
Readme
kanecta-api
HTTP API for the Kanecta data store.
Setup
npm installRunning in dev mode
npm startThe server listens on port 3000 by default. Override with the PORT env var:
PORT=4000 npm startBy default the API resolves the data store relative to this directory. Point it elsewhere with KANECTA_DATASTORE:
KANECTA_DATASTORE=/path/to/your/datastore npm startEndpoints
GET /:id
Returns the metadata for the item with the given UUID.
GET /f1a00002-b45e-4c3d-9e7f-000000000001{
"id": "f1a00002-b45e-4c3d-9e7f-000000000001",
"parentId": "f1a00001-b45e-4c3d-9e7f-000000000001",
"value": "Clarify",
"type": "string",
...
}Responses
| Status | Meaning | |--------|---------| | 200 | Item found — body is the metadata JSON | | 400 | ID is not a valid UUID | | 404 | No item exists with that ID |
Running tests
npm test