12.07.2015 Views

Ridgeline 4.0 REST API Quick Start PDF - Extreme Networks

Ridgeline 4.0 REST API Quick Start PDF - Extreme Networks

Ridgeline 4.0 REST API Quick Start PDF - Extreme Networks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Authentication and ExceptionsTable 21: Supported HTTP Status Codes (continued)HTTP Status CodesDescription403 Forbidden The request is valid, but cannot be executed at this time.The server understands the request, and the request is valid, but theserver refuses to process it for one of the following reasons:• The credentials represent a user who is not allowed to performthe requested operation (a read-only user, for example, may nothave permission to create a new entity).• A modification, creation, or deletion operation was attemptedagainst a read-only entity.404 Not Found The request references an unknown URL.406 Not Acceptable Exception When a client makes a request of a server, it indicates the type ofdata it can accept. If a server is capable only of producing data thatthe client will find unacceptable, it instead returns this exception.408 Request Timeout An internal service did not respond in a timely manner.500 Internal Error The <strong>API</strong> encountered an unexpected error (a database connectionfailed, a service timed out, etc.).503 Service Unavailable The <strong>API</strong> service cannot process the request at this time (the service isunavailable—it is initializing, for example).Exception InformationEach errored response is accompanied by an exception message in the format requested by the client:XMLhttp response code numbererrcodehuman readable messageJSON{“response-code : “http response code number”“specific-error”: “errcode”“specific-msg” : “human readable message”}Note that this exception format contains redundant information (the HTTP response code). This can besafely ignored by most clients. Adobe Flash, however, does not pass responses for anything other thanHTTP 200 OK. To support these clients, the <strong>API</strong> supports the error code suppression as a query string:HTTP GET /v1.0/dataservice/inventory/devices?status=down&suppress_errors=true<strong>Ridgeline</strong> <strong>4.0</strong> <strong>REST</strong> <strong>API</strong> <strong>Quick</strong> <strong>Start</strong> 16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!