Status messages
The status message attributes identify the success or failure of an REST API operation.
Some POST, PUT, PATCH, and DELETE requests include status-message attributes in the response body to describe the success or failure of the request, using the following JSON structure.
Most GET requests that are successful (2xx response code) do not include status-message attributes. Some GET requests that fail (response codes other than 2xx) include status-message attributes in the response body to describe the failure of the request, using the following JSON structure.
Attributes | Type | Description | ||
---|---|---|---|---|
result | String | Results of the request. This can be one of the following values.
| ||
messages | Array of objects | Information about one or more messages | ||
id | String | Message identifier of a returned message | ||
text | String | Message text associated with the message identifier | ||
explanation | String | Additional information to clarify the reason for the message | ||
recovery | Array of objects | Recovery information | ||
text | String | User actions that can be taken to recover from the event | ||
URL | String | Link to the help system for more information, if available |
The following example is returned for a failed REST API request.
{
"result": "failed",
"messages": [{
"id": "FQXHMSS1002J",
"text": "The request to change the log level of com.apache to ERROR was not successful.",
"explanation": "The log level requested could not be changed.",
"recovery": {
"text": "Please retry the action.",
"url": ""
}
}]
}
Give documentation feedback