The persistence to JSON datastore is performed via HTTP methods. HTTP response codes are
used to validate the success or failure to perform the operations. The JSON datastore must
respect the following:
|
Method
|
Operation
|
URL format
|
HTTP response code
|
|
PUT
|
update objects
|
/{primary key}
|
HTTP Code 201 (created), 200 (ok) or 204 (no content)
|
|
HEAD
|
locate objects
|
/{primary key}
|
HTTP 404 if the object does not exist
|
|
POST
|
insert objects
|
/
|
HTTP Code 201 (created), 200 (ok) or 204 (no content)
|
|
GET
|
fetch objects
|
/{primary key}
|
HTTP Code 200 (ok) or 404 if object does not exist
|
|
GET
|
retrieve extent of classes (set of objects)
|
/
|
HTTP Code 200 (ok) or 404 if no objects exist
|
|
DELETE
|
delete objects
|
/{primary key}
|
HTTP Code 202 (accepted), 200 (ok) or 204 (no content)
|