Руководство Разработчика для Cisco Cisco Prime Performance Manager 1.7
Cisco Prime Performance Manager 1.7 REST API Guide
Notice that no message-body (no content) is found in an HTTP response that has 204 as
the status code.
the status code.
206
Partial content. This status code is returned when a partial set of the report data has been
returned. It is sent along with a “Content-Range” header. This status code indicates that
pagination is required to retrieve the remaining data for the requested report.
returned. It is sent along with a “Content-Range” header. This status code indicates that
pagination is required to retrieve the remaining data for the requested report.
400
Bad Request. This happens when the request has an invalid parameter, or it is missing a
required parameter. Or it could also be the case when the requested resource path is not
in the expected syntax.
required parameter. Or it could also be the case when the requested resource path is not
in the expected syntax.
401
Authentication Failed. This status code is generated when the Prime Performance
Manager server is running with user access (authentication) enabled, and the REST API
server was unable to authenticate the user.
Manager server is running with user access (authentication) enabled, and the REST API
server was unable to authenticate the user.
403
Forbidden or Access Denied. This status code is generated when the requested report is
currently disabled in the Prime Performance Manager system. A report can be disabled
when its “poller” is disabled in Prime Performance Manager.
currently disabled in the Prime Performance Manager system. A report can be disabled
when its “poller” is disabled in Prime Performance Manager.
404
Resource Not Found. This status code is generated when the requested resource does not
exist in the Prime Performance Manager REST API server. For example, if the request is
for a report that is not found on the Prime Performance Manager server.
exist in the Prime Performance Manager REST API server. For example, if the request is
for a report that is not found on the Prime Performance Manager server.
405
Method Not Allowed. This status code is generated when the requested method (HEAD,
POST, PUT or DELETE) is not supported for that resource.
POST, PUT or DELETE) is not supported for that resource.
406
Not Acceptable. This status code is generated when the “Accept” header sent in the
request is not supported by the REST API.
request is not supported by the REST API.
415
Unsupported Media Type. This status code is generated when the requested content-type
is not supported for that resource. For example, let’s say a given report is only be
available in CSV, and the client request that report using XML in the content-type. In this
case, the 415 error is generated.
is not supported for that resource. For example, let’s say a given report is only be
available in CSV, and the client request that report using XML in the content-type. In this
case, the 415 error is generated.
500
Internal Error. This error code is sent back for unexpected error on the server. If this error
occurs, the user should retry the same request. If the error continues the user should
verify the server logs.
occurs, the user should retry the same request. If the error continues the user should
verify the server logs.
5.12 Error Responses
In addition to HTTP header status code, the error response contains a content component. The following
table shows error response samples. All the other error responses follow a similar format.
table shows error response samples. All the other error responses follow a similar format.
Table 46 - CSV Request / Error Response Sample – Invalid HTTP Verb
Request / Error Response (CSV) - Invalid HTTP Verb: POST
Request
POST /ppm/rest/reports/ HTTP/1.1
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
Host: ppm-clean.cisco.com:4440
User-Agent: RestClient-Tool
Response
HTTP/1.1 405 Method Not Allowed
Transfer-Encoding: chunked
Date: Wed, 28 Mar 2012 16:12:11 GMT
POST /ppm/rest/reports/ HTTP/1.1
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
Host: ppm-clean.cisco.com:4440
User-Agent: RestClient-Tool
Response
HTTP/1.1 405 Method Not Allowed
Transfer-Encoding: chunked
Date: Wed, 28 Mar 2012 16:12:11 GMT