REST API response codes

The Lenovo XClarity Administrator REST APIs use the HTTP protocol for sending and retrieving data. Client code using the REST APIs makes an HTTP request to the Lenovo XClarity Administrator server and processes the HTTP response accordingly. Included with the HTTP response data is the HTTP response code. The response code provides some indication as to the success of the HTTP request and can provide information on how to handle the included response data.

The following table lists some of the most common response codes.

Response code Description
200 OK. The request completed successfully.
201 Created. One or more new resources have been successfully created.
202 Accepted. The request has been accepted for processing, but the processing has yet completed. The request might or might not be acted upon, depending on the results of the processing.
203 Found. The URL changed. The response header returns the correct URL in the Location field.
204 No Content. The request complete successfully, but no response content is returned (for example, a successful DELETE request).
400 Bad Request. An argument is missing or not valid or the operation is not supported. A descriptive error message is returned in the response body.
401 Unauthorized. The user could not be authenticated. Authentication has not been provided or has failed.
403 Forbidden. The management server was prevented from fulfilling the request.
404 Not found. A specified resource could not be found.
405 Method Not Allowed. The method is not supported for the specified resource.
408 Request Timeout. The management server did not receive a required request in the a specific amount of time.
409 Conflict. The request could not be completed due to a conflict with the current state of the resource. Wait until the state is valid, and attempt the request again.
412 Precondition failed. Specified data is invalid because of missing values.
413 Request Entity Too Large. Clients might impose limitations on the length of the request URL, and the request URL is too long to be handled.
500 Internal Server Error. An internal error occurred. A descriptive error message is returned in the response body.