Let's implement a new feature: atomic arrays. They should have the following RESTful operations:
/a:
GET: list all arrays
POST: add new array with a unique name
/a/test: an array by name test
GET: list all elements in the array (and their total number)
POST: add new element to the end of array
POST with ?if-absent: adds element if it is absent
DELETE: removes the entire array
GET /delete: same as DELETE
/a/test/1: item by number
/a/test/item?content=hello+world!: item by content
GET: returns 200 if it is present and 404 if it is not present in the array (at least one)
DELETE: removes elements and returns 204 if none found
GET /delete: same as DELETE
PUT: modifies element content (409 if there are many items with this content)
Let's implement a new feature: atomic arrays. They should have the following RESTful operations:
/a:GET: list all arraysPOST: add new array with a unique name/a/test: an array by nametestGET: list all elements in the array (and their total number)POST: add new element to the end of arrayPOSTwith?if-absent: adds element if it is absentDELETE: removes the entire arrayGET /delete: same asDELETE/a/test/1: item by number/a/test/item?content=hello+world!: item by contentGET: returns 200 if it is present and 404 if it is not present in the array (at least one)DELETE: removes elements and returns 204 if none foundGET /delete: same asDELETEPUT: modifies element content (409 if there are many items with this content)