To use the
CA SpectrumWeb Services API, you generate a request to the OneClick server for which you receive results in response. The request can be in the form of a URL or imbedded in XML content.
RESTful Web Service URLs are noun-oriented, and the HTTP operation itself represents the verb. The following is the base URL when generating a request using the
CA SpectrumWeb Services API:
- Because RESTful architecture and applications are stateless, no client context is stored between requests. Each request contains all the information necessary to service the request in the URL or XML content.
There are two types of requests used in the
CA SpectrumWeb Services API. Both request types offer the same performance.
- URL RequestsUsed when a resource targets a specific model. For example, DELETE <mh>deletes a specific model. This type of request works well for simple requests with few parameters, does not require body text, and can be used as a browser URL.All URL requests have GET Tunneling equivalents.
- GET Tunneling RequestsUsed when a resource targets multiple models using complex parameters. An HTTP GET command can only support a limited number of parameters in a URL and does not support a body. The GET Tunneling operation tunnels a GET request through a POST body, allowing complex requests to be created. The XML body can contain rich filters by using new and existing search criteria and pre-defined alarm filters. Semantics of GET Tunneling requests are defined by Request.xsd and Filter.xsd schemas and can be created manually or generated from request beans.
General URL Parameters
The following are general parameters that are supported for some of the resources, depending on application. In general, the order of URL parameters in a list does not matter. Any exceptions are noted.
Parameters are preceded by either ? or &. In accordance with standard HTTP syntax, the first parameter specified must be preceded by ?, and any subsequent parameters must be preceded by &. All of the following parameters are shown preceded by &. Use the appropriate prefix depending on the location of the parameter in the list.
- &attr=<attr_ID>&val=<num>Specifies attribute value pairs, which are used to obtain specific attribute values for the resource being queried. For example, if you GET alarms, you get the alarm IDs only by default. However, if you retrieve alarms with specified attributes you get the alarm IDs with their specific attribute values.When attribute value pairs are specified, especially when updating attribute values, attribute ID and values must occur in sequence for proper binding of the ID and value, as in the following:?attr=0x10062&val=text&attr=0x10001&val=12334This pairing tells the RESTful servlet that an attr ID will be followed by the desired value for that ID when updating the value of the attribute.Multiple attribute-value pairs can be specified.
- &landscape=<landscape_handle>Specifies which landscapes to include in query. Multiple landscape parameters can be specified.
- &mh=<model_handle>Specifies the model handle.
- &throttlesize=<num>Specifies the number of items from the result set to retrieve per response. If the throttlesize value is less than the total number of items in the result set, the results contain a "next" link. This link can be used to retrieve more results. See Using Throttle and Next.Not all resources support the throttlesize parameter.