Skip to content

14. Redfish Responses

The HTTP status code can be used for initial determination for how to process a response from a Redfish service.

The following table provides guidance for processing responses:

HTTP status code Indication and next steps
200 The request was successful. The response body contains the requested resource or action results.
201 The request was successful. If there is a response body, it contains a newly created resource. The Location HTTP header contains the URI of the new resource.
202 The request is still in process.
204 The request was successful and no response body is given.
3<XX> The request is redirected to another URI. Perform a GET on the URI in the Location HTTP header.
4<XX> The request was rejected due to a client-side error and the response body contains error information. This is typically due to unsupported properties or values or missing HTTP headers. See the Error Responses section for additional handling.
5<XX> The request was rejected due to a service-side error and the response body contains error information. Retrying the request might be successful. See the Error Responses section for additional handling.

14.1 Error Responses

When a service returns an HTTP 4<XX> or 5<XX> status code, the response body contains an error response. This type of response allows a service to provide detailed information about the failure. The following example response shows a single message that indicates the user specified the value Red for the ResetActionInfo property, but the value is not allowed by the service.

{
    "error": {
        "code": "Base.0.0.1.PropertyValueNotInList",
        "message": "The value 'Red' for the property ResetActionInfo is not in the ...",
        "@Message.ExtendedInfo": [
            {
                "@odata.type": "#Message.v0_0_1.Message",
                "MessageId": "Base.0.0.1.PropertyValueNotInList",
                "RelatedProperties": ["/ResetActionInfo"],
                "Message": "The value 'Red' for the property ResetActionInfo is not in the ...",
                "MessageArgs": ["Red", "ResetActionInfo"],
                "Severity": "Warning",
                "MessageSeverity": "Warning",
                "Resolution": "Choose a value from the enumeration list that the ..."
            }
        ]
    }
}

The @Message.ExtendedInfo property inside error is an array, which allows for the service to provide multiple messages in the response. Users and client software can make decisions for corrective measures, such as modifying the request to the service, retrying the request, or performing service operations.

Next section