Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

Error Codes and Responses

The Prime Infrastructure API attempts to return appropriate HTTP status codes for every request.

HTTP Status Codes

This table outlines the status codes returned by the Prime Infrastructure API.

Code Text Description
200 OK Success!
400 Bad Request The request was invalid. An accompanying error message will explain why.
401 Unauthorized Authentication credentials were missing or incorrect.
403 Forbidden The request is understood, but it has been refused. An accompanying error message will explain why.
404 Not Found The URI requested is invalid or the resource requested does not exist.
500 Internal Server Error Something is broken.
502 Bad Gateway The server is down or being upgraded.
503 Service Unavailable The servers are up, but overloaded with requests. Try again later. This code is used when requests are being denied due to rate limiting.

Error Messages Error Messages

When the NBI API returns error messages, it does so in your requested format. For example, an error from a JSON method might look like this:

  1. {"errorDocument":{"httpResponseCode":404,"httpMethod":"GET","message":"No such entity type as unkown.-PRS-102","id":"presentation.PRS-102","uriPath":"\/data\/unkown","queryParams":"{}"}}

The corresponding XML response would be:

  1. <?xml  version="1.0"  encoding="UTF-8"?>
  2. <errorDocument>
  3.    <httpResponseCode>404</httpResponseCode>
  4.    <httpMethod>GET</httpMethod>
  5.    <message>No such entity type as unkown.-PRS-102</message>
  6.    <id>presentation.PRS-102</id>
  7.    <uriPath>/data/unkown</uriPath>
  8.    <queryParams>{}</queryParams>
  9. </errorDocument>