API-Fehlernachrichten

Wenn eine API-Anforderung wegen Anforderungsfehlern oder Serverfehlern fehlschlägt, wird eine Fehlerantwortnachricht im JSON-Format zurückgegeben.

Eine Fehlerantwortnachricht wird im JSON-Format zurückgegeben, auch wenn Endpunkte andere MIME-Typen unterstützen. Die Fehlerantwortmeldung enthält die eigentliche Fehlermeldung, eine Beschreibung des Fehlers, einen eindeutigen Fehlercode für den Endpunkt, eine HTTP Antwortmeldung und einen HTTP Antwortcode.

Die Fehlerantwort enthält folgende Felder:

  • message: Fehlernachricht
  • details: Ein Feld für zusätzliche Informationen, das gefüllt werden kann oder nicht.
  • description: Beschreibung des spezifischen Fehlers
  • code: Eindeutiger Fehlerantwortcode
  • http_response:
    • message: HTTP Antwortnachricht
    • code: HTTP Antwort-Statuscode

Die folgende API-Anforderung versucht beispielsweise, Informationen zu einem nicht vorhandenen Referenzset namens "test-set" abzurufen:

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

Eine HTTP404Antwortcode und die folgende JSON-Fehlerantwortnachricht werden zurückgegeben:

{
  "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
   }
}

Die folgende Tabelle enthält weitere Informationen über die HTTP Antwortfehlerkategorien, die von der IBM® QRadar® REST-API ZURÜCKGEGEBEN WERDEN:

HTTP fehlerkategorie HTTP-Antwortcode HTTP antwortnachricht
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.
Gefunden 302 The resource has moved temporarily. Please refer to the documentation.
Andere anzeigen 303 The resource can be found under a different URI.
Not Modified 304 The resource is available and not modified.
Proxy verwenden 305 The requested resource must be accessed through the proxy given by the Location field.
Temporäre Umleitung 307 The resource resides temporarily under a different URI.
Fehlerhafte Anforderung 400 Invalid syntax for this request was provided.
Nicht berechtigt 401 You are unauthorized to access the requested resource. Please log in.
Nicht zulässig 403 Your account is not authorized to access the requested resource.
NICHT GEFUNDEN 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.
Nicht zulässig 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.
Konflikt 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.
Länge erforderlich 411 Length of the content is required, please include it with the request.
Vorbedingung nicht erfüllt 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.
Anforderungs-URI zu lang 414 The request URI is longer than the server is willing to interpret.
Nicht unterstützter Datenträgertyp 415 The requested resource does not support the media type provided.
Angeforderter Bereich nicht erfüllbar 416 The requested range for the resource is not available.
Expectation Failed 417 Unable to meet the expectation given in the Expect request header.
FEHLENDE ARGUMENTE 419 The requested resource is missing required arguments.
UNGÜLTIGE ARGUMENTE. 420 The requested resource does not support one or more of the given parameters.
Nicht verarbeitbare Entität 422 The request was well-formed but was unable to be followed due to semantic errors.
Interner Serverfehler 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 nicht unterstützt 505 The HTTP protocol version used in the request message is not supported.
INITIALISIERUNGSFEHLER 550 A failure occurred during initialization of services. API will be unavailable.