Cisco Cisco Prime Performance Manager 1.4 开发者指南
Cisco Prime Performance Manager REST API Guide
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<error xmlns:ppm="http://www.cisco.com/ppm/rest/reports">
<code>UnsupportedHttpVerb</code>
<message>HTTP method [POST] is not supported.</message>
</error>
<error xmlns:ppm="http://www.cisco.com/ppm/rest/reports">
<code>UnsupportedHttpVerb</code>
<message>HTTP method [POST] is not supported.</message>
</error>
6 REST APIs
The APIs are composed of a GET URI + resource + parameter (or parameters) combination.
6.1 GET Report Listing
This API is used to retrieve a listing of sub-categories and report names. An empty {category} implies a
list of all top level categories. Reports are defined in a hierarchical grouping of categories and
subcategories.
list of all top level categories. Reports are defined in a hierarchical grouping of categories and
subcategories.
Ex: GET /{reportType} /{category}..
The following table shows a sample request for the top level web report categories. Notice that if the
Prime Performance Manager server has SSL enabled, you should also include the Authorization header.
Prime Performance Manager server has SSL enabled, you should also include the Authorization header.
Table 39 - – HTTP List of Reports Request Sample – Top Level Category
HTTP Request Sample – List of Reports
GET /ppm/rest/reports/ HTTP/1.1
Host: ppm-clean.cisco.com:4440
Connection: Keep-Alive
User-Agent: RestClient-Tool
Host: ppm-clean.cisco.com:4440
Connection: Keep-Alive
User-Agent: RestClient-Tool
6.2 Report Listing Samples
Note: The following samples were collected from a development server. These samples are provided to
illustrate the data structure of the different data format types: XML, JSON, and CSV. The data provided
by your server will likely be different.
illustrate the data structure of the different data format types: XML, JSON, and CSV. The data provided
by your server will likely be different.
6.2.1 CSV
Table 22 - CSV Request / Response Sample – List of Reports
Request / Response (CSV) – List of Reports
Request
GET /ppm/rest/reports/ HTTP/1.1
Host: ppm-cls-vm05.cisco.com:4440
Connection: Keep-Alive
User-Agent: RestClient-Tool
Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Wed, 09 May 2012 15:34:16 GMT
GET /ppm/rest/reports/ HTTP/1.1
Host: ppm-cls-vm05.cisco.com:4440
Connection: Keep-Alive
User-Agent: RestClient-Tool
Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Wed, 09 May 2012 15:34:16 GMT
Content-Type: text/csv;charset=UTF-8
Server: Apache-Coyote/1.1
Cache-Control: 3600
Cache-Control: 3600
name,uri
Application Traffic,http://ppm-cls-vm05.cisco.com:4440/ppm/rest/reports/Application+Traffic/
Application Traffic,http://ppm-cls-vm05.cisco.com:4440/ppm/rest/reports/Application+Traffic/