note: work in progress, beware of the dragons ๐
This repository is maintained by: @jastam
The document store provides storage for arbitrary JSON documents. The id in the URL corresponds to the id field in the document. When there is a conflict between these, the value in the URL takes precedence.
- Response 200 (application/json)
- Body { "id": 1 "name": "message", "value": "Hello world!" }
-
Request (application/json)
- Body { "id": 1 (optional) "name": "message", "value": "Message to add" }
-
Response 200
- Body { "result":"true" }
-
Response 400
- Body { "result":"false","error":"No valid message given" }
-
Response 500
- Body { "result":"false","error":"Server error message" }
-
Response 200
- Body { "result":"true" }
-
Response 400
- Body { "result":"false","error":"No valid message given" }
-
Response 500
- Body { "result":"false" }
- Response 200 (application/json)
- Body [ { "id": 1 "name": "message 1", "value": "Something" } { "id": 2 "name": "message 2", "value": "Something else" } ]
If no id field is given in the body of the document, a random value will be generated for the id field.
-
Request (application/json)
- Body { "name": "message", "value": "Message to add" }
-
Response 200
- Body { "result":"true", "id": "3" }
-
Response 400
- Body { "result":"false","error":"No valid message given" }
-
Response 500
- Body { "result":"false" }