Cisco Acano X-series 開発者ガイド

ページ / 147
Cisco Meeting Server Release 2.0 : API Reference Guide
18
4 API Methods
There are four methods:
n
is used for retrieval of existing information
n
is used to create new objects in the hierarchy
n
is used to modify an existing object
n
is used to destroy an object in the tree
These methods are described in more detail below.
URL format
For the purposes of addressing or creating individual objects, the URL format mirrors the
conceptual hierarchy of objects, with some additional preceding tags in order to identify that
the request is for the API. By way of example, to retrieve information on API object
“/calls/dbfca0dd-dbe1-43bb-b101-beb9a7ef35f4” it would be necessary to issue:
GET /api/v1/calls/dbfca0dd-dbe1-43bb-b101-beb9a7ef35f4 HTTP/1.1
Specifically, at the top level, including “/api” means that the on-board HTTP server process can
distinguish this HTTP method from a normal browser method, and including “v1” means the API
handler knows that the request is being made by an object that understands version 1 of the API.
If an API method is successful, it yields a “200 OK” response from the Meeting Server. If an error
occurs, the Meeting Server responds with a 4xx or 5xx HTTP status code.
A 503 (“Service Unavailable”) status code is returned for API calls unable to be serviced due to a
temporary “busy” condition on the Meeting Server – this can be used as an indication to the
requestor that it would be useful to re-attempt the same method later.
Equally, a request supplying a <coSpace id> which does not correspond to a valid coSpace
object yields “404 Not Found”.
For 4xx and 5xx error cases, extended error information may be returned as “text/xml” body
data, for example:
<failureDetails>
<coSpaceDoesNotExist/>
</failureDetails>
More generally, such a response consists of a “failureDetails” section and a list of errors; in the
above case a method was attempted using a coSpace ID that did not correspond to an active
coSpace. The possible failure reasons are described in
4.1 GET Methods
As mentioned above, GET methods allow retrieval of information about existing API-accessible
objects, and are used at two levels: Collections level and Individual object level.
4   API Methods