[occi-wg] Semantics of OCCI API: nouns and verbs
richard.davies at elastichosts.com
Thu Apr 16 08:05:54 CDT 2009
Sam Johnston wrote:
> > list, info, create, destroy, set are equivalent to CRUD;
> The CRUD operations map to HTTP verbs which were designed for making
> certain actions on a resource - I don't see that there's a need to repeat
> ourselves here by burning this information into the URL/request syntax.
Agreed in principle, but there's an implementation issue that many common
HTTP libraries will only do POST/GET, not PUT/DELETE, so need url versions
of 'UD' anyway.
Perhaps the compromise position is to work both ways:
POST/GET/PUT/DELETE /<object> accepts all 4 CRUD operations
POST /<object>/set alternative form of 'U' (if cannot PUT)
POST /<object>/destroy alternative form of 'D' (if cannot DELETE)
POST /<object>/create alternative form of 'C' (for symmetry)
GET /<object>/info alternative form of 'R' (for symmetry)
> Non-CRUD operations such as start, stop, restart, clone, snapshot, etc.
> can be exposed by "actuator" URLs, which fits nicely with HATEOAS.
The actuator URLs for these can then fit in alongside the alternative
actuator forms of the CRUD operations themselves.
More information about the occi-wg