HTTP Status Codes
Each request to the REST API results into a standard HTTP status code. When using the following HTTP status codes, the Plant Applications API services adhere as closely as possible to standard HTTP and REST conventions.
When working with REST APIs, the status code for every HTTP request to the server is returned according to the HTTP status code described in the RFC 2616 and RFC 6585. The HTTP codes are grouped into five different categories:
Status Code | Meaning | Comments |
---|---|---|
1xx | Informational | Provisional response. |
2xx | Successful | Clients request was successfully received, understood and accepted. |
3xx | Redirection | Further action needs to be taken by the user. |
4xx | Client error | Client did something wrong. It should NOT send the same request again, but fix the issue first. |
5xx | Server error | Server did something wrong or incapable of performing the request. Client can continue and try again with the same request. |
The HTTP status codes clearly indicate the status for every REST API response:
Status Code | Usage |
---|---|
200 OK | Success message. The request has been completed. |
201 Created | Success message. A new resource has been created. The resource URI is available from the location header in the response. |
204 No Content | Success message. An update to an existing resource has been applied. |
400 Bad Request | Error message. The request was malformed. The response body provides additional information. |
401 Unauthorized | Error message. Either you are not authenticated, or the authentication is incorrect. You must re-authenticate and try again. |
403 Forbidden | Error message. You do not have permission to access this resource. |
404 Not Found | Error message. The requested resource does not exist. |
409 Conflict | Error message. The request conflicts with another request. |
500 Internal Error | Error message. The server encountered an unexpected condition that prevented it from fulfilling the request. |