Previous Topic: CA Performance Center Web ServicesNext Topic: Accessing the API


Basic Operations in REST Web Services

The REST specification leaves room for some flexibility. As a result, REST web services can use basic HTTP syntax to perform different tasks. All of the CA Performance Center REST web Services require user and password authorization in the HTTP request header. You can use the same credentials that that you use to log in from the CA Performance Center user interface.

In this implementation, the basic REST commands are used as follows:

Here is an example of a simple PUT operation that updates the description parameter of a tenant:

http://[server IP address]:8181/pc/center/webservice/tenants/
tenantName/{tenantName}/description/{NewDescription}

You would substitute the desired values inside the braces { } for the required parameters:

{tenantName}

The name of the tenant that you want to edit.

{tenantDescription}

The new description to identify this tenant.

Here is an example of a simple GET operation that returns a list of tenant ID names using the tenants web service:

http://[server IP address]:8181/pc/center/webservice/
tenants/idNames

The following XML is returned:

<?xml version="1.0" encoding="UTF-8"?>
<idNames>
  <idName value="tenantAccountId" />
  <idName value="tenantItemId" />
  <idName value="tenantName" />
</idNames>

HTTP requests always return a response and a status code, even when successful. The response text is either the expected result or an error message to indicate a problem. The status code is 200 for a successful response, or a numeric error indicator. The following HTTP response code ranges are used:

For more information about HTTP status codes, see the following IETF website:

http://www.ietf.org/rfc/rfc2616.txt