API error messages

When an API request fails due to request errors or server errors, an error response message is returned in JSON format.

An error response message is returned in JSON format even for endpoints that support other MIME types. The error response message includes error message itself, a description of the error, a unique error code for the endpoint, an HTTP response message, and an HTTP response code.

The error response includes following fields:

  • message: the error message
  • details: a field for additional information, which may or may not be populated
  • description: description of the specific error
  • code: Unique error response code
  • http_response:
    • message: HTTP response message
    • code: HTTP response status code

For example, the following API request attempts to get information about a non-existent reference set that is called "test-set":

https://<host_ip>/api/reference_data/sets/test_set

An HTTP 404 response code and the following JSON error response message are returned:

{
  "message": "test_set does not exist",
  "details": {},
  "description": "The reference set does not exist.",
  "code": 1002,
  "http_response": {
     "message": "We could not find the resource you requested.",
      "code": 404
   }
}

The following table provides more information about the HTTP response error categories returned by the IBM® QRadar® REST API:

HTTP error category HTTP response Code HTTP response message
MULTIPLE CHOICES 300 The requested resource corresponds to any one of a set of representations, each with its own specific location.
MOVED PERMANENTLY 301 The resource has moved permanently. Please refer to the documentation.
FOUND 302 The resource has moved temporarily. Please refer to the documentation.
SEE OTHER 303 The resource can be found under a different URI.
NOT MODIFIED 304 The resource is available and not modified.
USE PROXY 305 The requested resource must be accessed through the proxy given by the Location field.
TEMPORARY REDIRECT 307 The resource resides temporarily under a different URI.
BAD REQUEST 400 Invalid syntax for this request was provided.
UNAUTHORIZED 401 You are unauthorized to access the requested resource. Please log in.
FORBIDDEN 403 Your account is not authorized to access the requested resource.
NOT FOUND 404 We could not find the resource you requested. Please refer to the documentation for the list of resources.
METHOD NOT ALLOWED 405 This method type is not currently supported.
NOT ACCEPTABLE 406 Acceptance header is invalid for this endpoint resource.
PROXY AUTHENTICATION REQUIRED 407 Authentication with proxy is required.
REQUEST TIMEOUT 408 Client did not produce a request within the time that the server was prepared to wait.
CONFLICT 409 The request could not be completed due to a conflict with the current state of the resource.
GONE 410 The requested resource is no longer available and has been permanently removed.
LENGTH REQUIRED 411 Length of the content is required, please include it with the request.
PRECONDITION FAILED 412 The request did not match the pre-conditions of the requested resource.
REQUEST ENTITY TOO LARGE 413 The request entity is larger than the server is willing or able to process.
REQUEST-URI TOO LONG 414 The request URI is longer than the server is willing to interpret.
UNSUPPORTED MEDIA TYPE 415 The requested resource does not support the media type provided.
REQUESTED RANGE NOT SATISFIABLE 416 The requested range for the resource is not available.
EXPECTATION FAILED 417 Unable to meet the expectation given in the Expect request header.
MISSING ARGUMENTS 419 The requested resource is missing required arguments.
INVALID ARGUMENTS 420 The requested resource does not support one or more of the given parameters.
UNPROCESSABLE ENTITY 422 The request was well-formed but was unable to be followed due to semantic errors.
INTERNAL SERVER ERROR 500 Unexpected internal server error.
NOT IMPLEMENTED 501 The requested resource is recognized but not implemented.
BAD GATEWAY 502 Invalid response received when acting as a proxy or gateway.
SERVICE UNAVAILABLE 503 The server is currently unavailable.
GATEWAY TIMEOUT 504 Did not receive a timely response from upstream server while acting as a gateway or proxy.
HTTP VERSION NOT SUPPORTED 505 The HTTP protocol version used in the request message is not supported.
INITIALIZATION FAILURE 550 A failure occurred during initialization of services. API will be unavailable.