Interacting with the datasetd web service can be done with any web client. For documentation purposes I am assuming you are using curl. This command line program is available on most POSIX systems including Linux, macOS and Windows.
Create a JSON document in the collection. Requires a unique key in the URL and the content most be JSON less than 1 MiB in size.
`http://localhost:8485/<COLLECTION_ID>/object/<KEY>`
Create requires using the “POST” HTTP method with.
Creates a JSON document for the <KEY>
in
collection <COLLECTION_ID>
. On success it returns a
JSON status object and HTTP 201 OK. Otherwise an HTTP error if creation
fails.
The “POST” needs to be JSON encoded and using a Content-Type of “application/json” in the request header.
The <COLLECTION_ID>
is “t1”, the
<KEY>
is “one” The content posted is
{
"one": 1
}
Posting using CURL is done like
curl -X POST -H 'Content-Type: application.json' \
http://locahost:8485/t1/object/one \
-d '{"one": 1}'