Enables GET and HEAD, retrieving the resource.
The query component of the request selects what to retrieve. It may state a @metreeca/qest template, or
form-encoded criteria filtering the collection the resource holds, as a client filtering a list would state them.
An empty query retrieves the default view the shape describes. Localised content is negotiated through the
Accept-Language header, and the store default applies where none is given.
200 OK with the resource as JSON404 Not Found where the store holds no such resource, or the review hook withholds itOptionalhooks: LookupHooksRetrieval hooks; if omitted, the request is bounded by the shape alone
This driver
Enables POST, creating a resource from the request body in the collection the resource holds.
The body is validated against the shape of the collected resources. A body stating no identifier is named after
the Slug header, or given a generated name where the header is missing or holds no letter or digit.
201 Created with a Location header pointing to the new resource409 Conflict where the store refuses to create the resource, as when its identifier is takenOptionalhooks: WriteHooksWrite hooks
This driver
TypeError Where the shape holds no collection ranging over resources, or several
Enables PUT, replacing the resource with the request body, validated against the shape.
The resource keeps the identifier of the request target, so a client cannot redirect the update elsewhere.
204 No Content where the resource is replaced404 Not Found where the store holds no such resourceOptionalhooks: WriteHooksWrite hooks
This driver
Enables DELETE, removing the resource along with the embedded and captive data the shape ties to it.
204 No Content where the resource is removed404 Not Found where the store holds no such resourceThis driver
Model-driven resource driver.
Serves a resource through the HTTP methods enabled on it: its retrieval, the creation of new resources in the collection it holds, its replacement and its removal, so that one driver serves containers, items and standalone resources alike, each enabling only the methods its role in the API calls for and answering others with
405.