Response
Response
Opsgenie REST API has a standard response format for JSON objects.
| Field | Description |
|---|---|
| data | entity data |
| result | Human friendly message |
| requestId* | ID of the request |
| took | Response time in seconds (only back-end servers, proxies are not included) |
| expandable | Extra fields that can be returned by using expand query param |
Response Headers
Each response has standard headers that are listed below.
| Header Key | Description |
|---|---|
| X-Request-ID* | ID of the request |
| X-Response-Time | Response time in seconds |
If you have a problem, you can contact us with the given request ID *.
Response Codes
In the table below you can find the response codes and their descriptions.
| Status Code | Internal Code | Description |
|---|---|---|
| 200 - OK | Successful | |
| 201 - Created | A new entity is created | |
| 202 - Accepted | The request is valid and will be processed asynchronously.
| |
| 400 - Bad Request (Syntax Error only) | Invalid JSON body | |
| 401 - Unauthenticated (Not Unauthorized) | apiKey is invalid or integration is disabled | |
| 402 - Payment Required | apiKey is valid but the account cannot do this action because of subscription plan | |
| 403 - Forbidden (Unauthorized) | 40301 | apiKey is valid but the apiKey cannot do this operation because of permissions |
| 403 - Forbidden | 40302 | apiKey is valid and authorized but we do not support the request |
| 404 - Not Found | Resource or handler not found | |
| 405 - Method Not Allowed | URL is valid but HTTP method not supported | |
| 406 - Not Acceptable | Requested format is not supported (Accept header) | |
| 409 - Conflict | ID or name conflicts with another entity. E.g. integration name already exists | |
| 410 - Gone | Feature is deprecated | |
| 415 - Unsupported Media Type | Request body format is not supported (Content-Type header) | |
| 416 - Requested Range Not Satisfiable | The given range is not supported. | |
| 422 - Unprocessable Entity | Semantic errors in request body | |
| 428 - Pre Condition Required | Entity is used by another entity (schedule,escalation,team,etc) | |
| 429 - Too Many Request* | Throttling. | |
| 500 - Internal Server Error | ||
| 501 - Not Implemented | ||
| 503 - Service Unavailable* | Back-end servers are at capacity. |
If you get 503, you should retry the request, but if 429 you should wait a bit then retry the request *
