API 오류 메시지
API 요청이 요청 오류 또는 서버 오류로 인해 실패하면 오류 응답 메시지가 JSON 형식으로 리턴됩니다.
오류 응답 메시지는 심지어 다른 MIME 유형을 지원하는 엔드포인트의 경우에도 JSON 형식으로 리턴됩니다. 오류 응답 메시지에는 오류 메시지 자체, 오류의 설명, 엔드포인트의 고유한 오류 코드, HTTP 응답 메시지 및 HTTP 응답 코드가 포함됩니다.
오류 응답은 다음 필드를 포함합니다.
- message: 오류 메시지
- details: 추가 정보를 위한 필드로서 채워지거나 채워지지 않을 수도 있음
- description: 특정 오류의 설명
- code: 고유한 오류 응답 코드
- http_response:
- message: HTTP 응답 메시지
- code: HTTP 응답 상태 코드
예를 들어, 다음 API 요청은 "test-set"라고 하는 존재하지 않는 참조 세트에 대한 정보를 가져오려고 합니다.
https://<host_ip>/api/reference_data/sets/test_set
An HTTP404응답 코드 및 다음 JSON 오류 응답 메시지가 리턴됩니다.
{
"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
}
}
다음 표에서는 HTTP 응답 오류 범주에 대한 자세한 정보를 제공합니다 IBM® QRadar® REST API:
| HTTP 오류 카테고리 | HTTP 응답 코드 | HTTP 응답 메시지 |
|---|---|---|
| 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. |
| 없음 | 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. |