REST API response codes
The following table describes the different categories of the response codes.
类别 | 描述 |
---|---|
2xx |
Indicates that the request was accepted successfully. |
4xx |
Returns the client-side error response with the error message. |
5xx |
Returns the server-side error response with the error message. |
The following are some response codes that you will see in the REST API.
Response code |
Status |
描述 |
---|---|---|
200 |
OK |
Returned from GET and PUT operations, and non-configuration API calls such as Login or Logout when the request is successfully completed. |
201 |
Created |
Returned from POST operations when a new resource was successfully created. |
204 |
No Content |
Returned from a PUT, POST, or DELETE operation when the request was successfully processed and there is no content to return. |
400 |
Bad request |
A problem with the request body, such as invalid syntax, incorrectly formatted JSON, or data violating a database constraint. |
401 |
Unauthorized |
No active session for this client (the login API has not been called) or too many sessions already created from this client. |
403 |
Forbidden |
客户端会话瓦里d, but does not have permissions to access the requested resource. |
404 |
Not found |
The resource does not exist, or the URI is incorrect for the desired resource. Can also occur when accessing the POST, PUT, or DELETE API while the REST access-mode is set to read-only. |
500 |
Internal server error |
An unexpected error has occurred in processing the request. View the logs on the device for details. |
503 |
Service unavailable |
The device is receiving more requests than it can process and is defensively rejecting requests to protect resources. |