GET /data/:userId/:collection¶
Get all documents from a collection
URL : api.prisme.ai/v1/data/:userId/:collection
Method : GET
Request example¶
curl -X GET \
https://api.prisme.ai/v1/data/1234/collection \
Success Response¶
Code : 200
Content example
[
{
"_id": "5ece393e679b9f0011628d95",
"somecolumn": "somedata",
"updatedAt": "2020-05-27T09:56:14.078Z"
}
]
POST /data/:userId/:collection¶
Add a new document into a collection
URL : api.prisme.ai/v1/data/:userId/:collection
Method : POST
Request example¶
curl -X POST \
https://api.prisme.ai/v1/data/1234/collection \
--data '{"somecolumn": "somedata"}'
Success Response¶
Code : 201
Content example
[
{
"_id": "5ece393e679b9f0011628d95",
"somecolumn": "somedata",
"updatedAt": "2020-05-27T09:56:14.078Z"
}
]
PUT /data/:userId/:collection/:document¶
Update a document
URL : api.prisme.ai/v1/data/:userId/:collection/:document
Method : PUT
Request example¶
curl -X PUT \
https://api.prisme.ai/v1/data/1234/collection/5678 \
--data '{"somecolumn": "newdata", "newcolumn": "foo"}'
Success Response¶
Code : 201
Content example
[
{
"_id": "5ece393e679b9f0011628d95",
"somecolumn": "newdata",
"newcolumn": "foo",
"updatedAt": "2020-05-27T09:56:14.078Z"
}
]
DELETE /data/:userId/:collection/:document¶
Delete a document
URL : api.prisme.ai/v1/data/:userId/:collection/:document
Method : DELETE
Request example¶
curl -X DELETE \
https://api.prisme.ai/v1/data/1234/collection/5678
Success Response¶
Code : 204