On Thu, Apr 16, 2009 at 6:16 PM, Richard Davies <richard.davies@elastichosts.com> wrote:
At present, the API draft specifies a single central entry point, on which a
HTTP GET returns a complete description of all objects that a user has
access to.
For a user with a large number of servers, this could be a very expensive
operation - the cloud will have to check with each individual virtualization
host to get values such as the performance monitoring.
It is probably good to offer this option, but the API should definitely
ofter separate 'retrieve' operations (which are much cheaper) such as:
- List UUIDs of all a user's objects, but do not describe them fully
- Describe a single object fully given its UUID.
Search service (SS)
Attribute search
It is possible to search for arbitrary attributes by specifying them in the full text search query string (e.g. "?q=cpu.cores:2")Category search
To search for members of a given category (that is, any resource with a given Atom "term" or "label") do a HTTP GET request to "<entrypoint>/-/cat1/cat2":
- "/-/" denotes that the following fragments are to be interpreted as categories
- multiple cateogries result in a logical AND query (e.g. "/-/cat1/cat2" means "cat1 AND cat2")
- use pipe (|, URL encoded as %7C) for logical OR (e.g. "/-/cat1|cat2" means "cat1 OR cat2")
- prefixing "-" negates a category (e.g. "/-/cat1/-cat2" means "cat1 AND NOT cat2")
- Atom schemes can be specified using curly braces (e.g. "/-/{urn:example.com}public")
- any of these selectors can be combined (e.g. "/-/cat1%7Ccat2/-cat3" means "(cat1 OR (NOT cat2)) AND (NOT cat3)")
Full text search
For full text search append "?q=<query>" to the entry point URI and make a HTTP GET request. An XML feed containing all matching resources will be returned.