UNPKG

@itentialopensource/adapter-opsgenie

Version:

This adapter integrates with system described as: opsgenieRestApi.

1,531 lines 3.08 MB
{ "openapi": "3.0.0", "info": { "title": "Opsgenie REST API", "description": "Opsgenie OpenAPI Specification", "contact": {}, "version": "2.0.0" }, "servers": [ { "url": "https://api.opsgenie.com", "variables": {} } ], "paths": { "/v2/alerts/requests/{requestId}": { "get": { "tags": [ "alert" ], "summary": "getRequestStatus", "description": "Used to track the status and alert details (if any) of the request whose identifier is given", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-get-request-status" }, "operationId": "getRequestStatus", "parameters": [ { "name": "requestId", "in": "path", "description": "Universally unique identifier of the questioned request", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Request status information for given id", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } }, "X-RateLimit-State": { "description": "Status of rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Status of rate limit" } } } }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Source of the rate limit" } } } }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "content": { "text/plain": { "schema": { "type": "string", "description": "Time of throttle in seconds" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetRequestStatusResponse" } } } }, "400": { "description": "Invalid JSON body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "apiKey is invalid or integration is disabled", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "402": { "description": "apiKey is valid but the account cannot do this action because of subscription plan", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "apiKey is valid but the apiKey cannot do this operation because of permissions", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Entity cannot be found for the given identifier", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Throttling", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Unexpected error", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "deprecated": false } }, "/v2/alerts": { "get": { "tags": [ "alert" ], "summary": "listAlerts", "description": "Returns list of alerts", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-list-alerts" }, "operationId": "listAlerts", "parameters": [ { "name": "query", "in": "query", "description": "Search query to apply while filtering the alerts", "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "searchIdentifier", "in": "query", "description": "Identifier of the saved search query to apply while filtering the alerts", "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "searchIdentifierType", "in": "query", "description": "Identifier type of the saved search query. Possible values are 'id', or 'name'", "style": "form", "explode": true, "schema": { "allOf": [ { "$ref": "#/components/schemas/searchIdentifierType" }, { "description": "Identifier type of the saved search query. Possible values are 'id', or 'name'" } ] } }, { "name": "offset", "in": "query", "description": "Start index of the result set (to apply pagination). Minimum value (and also default value) is 0", "style": "form", "explode": true, "schema": { "minimum": 0.0, "type": "integer", "format": "int32" } }, { "name": "limit", "in": "query", "description": "Maximum number of items to provide in the result. Must be a positive integer value. Default value is 20 and maximum value is 100", "style": "form", "explode": true, "schema": { "maximum": 100.0, "minimum": 1.0, "type": "integer", "format": "int32" } }, { "name": "sort", "in": "query", "description": "Name of the field that result set will be sorted by", "style": "form", "explode": true, "schema": { "allOf": [ { "$ref": "#/components/schemas/sort" }, { "description": "Name of the field that result set will be sorted by" } ] } }, { "name": "order", "in": "query", "description": "Sorting order of the result set", "style": "form", "explode": true, "schema": { "allOf": [ { "$ref": "#/components/schemas/order" }, { "description": "Sorting order of the result set" } ] } } ], "responses": { "200": { "description": "List of alert informations", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } }, "X-RateLimit-State": { "description": "Status of rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Status of rate limit" } } } }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Source of the rate limit" } } } }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "content": { "text/plain": { "schema": { "type": "string", "description": "Time of throttle in seconds" } } } }, "X-Paging-Prev": { "description": "Previous page url", "content": { "text/plain": { "schema": { "type": "string", "description": "Previous page url" } } } }, "X-Paging-Next": { "description": "Next page url", "content": { "text/plain": { "schema": { "type": "string", "description": "Next page url" } } } }, "X-Paging-First": { "description": "First page url", "content": { "text/plain": { "schema": { "type": "string", "description": "First page url" } } } }, "X-Paging-Last": { "description": "Last page url", "content": { "text/plain": { "schema": { "type": "string", "description": "Last page url" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListAlertsResponse" } } } }, "400": { "description": "Invalid JSON body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "apiKey is invalid or integration is disabled", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "402": { "description": "apiKey is valid but the account cannot do this action because of subscription plan", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "apiKey is valid but the apiKey cannot do this operation because of permissions", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Semantic errors in request body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Throttling", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Unexpected error", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "deprecated": false }, "post": { "tags": [ "alert" ], "summary": "createAlert", "description": "Creates a new alert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-create-alert" }, "operationId": "createAlert", "parameters": [], "requestBody": { "description": "Request payload of created alert", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/CreateAlertPayload" }, { "description": "Request payload of created alert" } ] } } }, "required": true }, "responses": { "202": { "description": "Returns request id for this async operation.", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } }, "X-RateLimit-State": { "description": "Status of rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Status of rate limit" } } } }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Source of the rate limit" } } } }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "content": { "text/plain": { "schema": { "type": "string", "description": "Time of throttle in seconds" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } }, "400": { "description": "Invalid JSON body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "apiKey is invalid or integration is disabled", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "402": { "description": "apiKey is valid but the account cannot do this action because of subscription plan", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "apiKey is valid but the apiKey cannot do this operation because of permissions", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Semantic errors in request body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Throttling", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Unexpected error", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "deprecated": false } }, "/v2/alerts/{identifier}": { "get": { "tags": [ "alert" ], "summary": "getAlert", "description": "Returns alert with given id, tiny id or alias", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-get-alert" }, "operationId": "getAlert", "parameters": [ { "name": "identifier", "in": "path", "description": "Identifier of alert which could be alert id, tiny id or alert alias", "required": true, "style": "simple", "schema": { "type": "string" } }, { "name": "identifierType", "in": "query", "description": "Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'", "style": "form", "explode": true, "schema": { "allOf": [ { "$ref": "#/components/schemas/identifierType" }, { "description": "Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'" } ] } } ], "responses": { "200": { "description": "Alert information for given identifier", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } }, "X-RateLimit-State": { "description": "Status of rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Status of rate limit" } } } }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "content": { "text/plain": { "schema": { "type": "string", "description": "Source of the rate limit" } } } }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "content": { "text/plain": { "schema": { "type": "string", "description": "Time of throttle in seconds" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAlertResponse" } } } }, "400": { "description": "Invalid JSON body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "apiKey is invalid or integration is disabled", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "402": { "description": "apiKey is valid but the account cannot do this action because of subscription plan", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "403": { "description": "apiKey is valid but the apiKey cannot do this operation because of permissions", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Entity cannot be found for the given identifier", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Semantic errors in request body", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "429": { "description": "Throttling", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "default": { "description": "Unexpected error", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "deprecated": false }, "delete": { "tags": [ "alert" ], "summary": "deleteAlert", "description": "Deletes an alert using alert id, tiny id or alias", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-delete-alert" }, "operationId": "deleteAlert", "parameters": [ { "name": "identifier", "in": "path", "description": "Identifier of alert which could be alert id, tiny id or alert alias", "required": true, "style": "simple", "schema": { "type": "string" } }, { "name": "identifierType", "in": "query", "description": "Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'", "style": "form", "explode": true, "schema": { "allOf": [ { "$ref": "#/components/schemas/identifierType" }, { "description": "Type of the identifier that is provided as an in-line parameter. Possible values are 'id', 'alias' or 'tiny'" } ] } }, { "name": "user", "in": "query", "description": "Display name of the request owner", "style": "form", "explode": true, "schema": { "type": "string" } }, { "name": "source", "in": "query", "description": "Display name of the request source", "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "Returns request id for this async operation.", "headers": { "X-Request-ID": { "description": "Id of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Id of given request" } } } }, "X-Response-Time": { "description": "Process time of given request", "content": { "text/plain": { "schema": { "type": "string", "description": "Process time of given request" } } } }, "X-R