UNPKG

@itentialopensource/adapter-opsgenie

Version:

This adapter integrates with system described as: opsgenieRestApi.

1,717 lines 660 kB
{ "swagger": "2.0", "info": { "title": "Opsgenie REST API", "description": "Opsgenie OpenAPI Specification", "version": "2.0.0" }, "host": "api.opsgenie.com", "schemes": [ "https" ], "produces": [ "application/json" ], "securityDefinitions": { "GenieKey": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "security": [ { "GenieKey": [] } ], "paths": { "/v2/alerts/requests/{requestId}": { "get": { "tags": [ "alert" ], "summary": "Get Request Status of Alert", "description": "Used to track the status and alert details (if any) of the request whose identifier is given", "operationId": "getRequestStatus", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-get-request-status" }, "parameters": [ { "name": "requestId", "in": "path", "description": "Universally unique identifier of the questioned request", "required": true, "type": "string" } ], "responses": { "200": { "description": "Request status information for given id", "schema": { "$ref": "#/definitions/GetRequestStatusResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts": { "get": { "tags": [ "alert" ], "summary": "List Alerts", "description": "Returns list of alerts", "operationId": "listAlerts", "x-collapse-params": "ListAlertsRequest", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-list-alerts" }, "parameters": [ { "name": "query", "in": "query", "description": "Search query to apply while filtering the alerts", "required": false, "type": "string" }, { "name": "searchIdentifier", "in": "query", "description": "Identifier of the saved search query to apply while filtering the alerts", "required": false, "type": "string" }, { "name": "searchIdentifierType", "in": "query", "description": "Identifier type of the saved search query. Possible values are 'id', or 'name'", "required": false, "type": "string", "enum": [ "id", "name" ], "default": "id" }, { "name": "offset", "in": "query", "description": "Start index of the result set (to apply pagination). Minimum value (and also default value) is 0", "required": false, "type": "integer", "format": "int32", "minimum": 0 }, { "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", "required": false, "type": "integer", "format": "int32", "minimum": 1, "maximum": 100 }, { "name": "sort", "in": "query", "description": "Name of the field that result set will be sorted by", "required": false, "type": "string", "enum": [ "createdAt", "updatedAt", "tinyId", "alias", "message", "status", "acknowledged", "isSeen", "snoozed", "snoozedUntil", "count", "lastOccurredAt", "source", "owner", "integration.name", "integration.type", "report.ackTime", "report.closeTime", "report.acknowledgedBy", "report.closedBy" ], "default": "createdAt" }, { "name": "order", "in": "query", "description": "Sorting order of the result set", "required": false, "type": "string", "enum": [ "asc", "desc" ], "default": "desc" } ], "responses": { "200": { "description": "List of alert informations", "schema": { "$ref": "#/definitions/ListAlertsResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" }, "X-Paging-Prev": { "description": "Previous page url", "type": "string" }, "X-Paging-Next": { "description": "Next page url", "type": "string" }, "X-Paging-First": { "description": "First page url", "type": "string" }, "X-Paging-Last": { "description": "Last page url", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } }, "post": { "tags": [ "alert" ], "summary": "Create Alert", "description": "Creates a new alert", "operationId": "createAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-create-alert" }, "parameters": [ { "name": "body", "in": "body", "description": "Request payload of created alert", "required": true, "schema": { "$ref": "#/definitions/CreateAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}": { "get": { "tags": [ "alert" ], "summary": "Get Alert", "description": "Returns alert with given id, tiny id or alias", "operationId": "getAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-get-alert" }, "x-collapse-params": "GetAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" } ], "responses": { "200": { "description": "Alert information for given identifier", "schema": { "$ref": "#/definitions/GetAlertResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } }, "delete": { "tags": [ "alert" ], "summary": "Delete Alert", "description": "Deletes an alert using alert id, tiny id or alias", "operationId": "deleteAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-delete-alert" }, "x-collapse-params": "DeleteAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "$ref": "#/parameters/AlertUserParam" }, { "$ref": "#/parameters/AlertSourceParam" } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/acknowledge": { "post": { "tags": [ "alert" ], "summary": "Acknowledge Alert", "description": "Acknowledges alert with given identifier", "operationId": "acknowledgeAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-acknowledge-alert" }, "x-collapse-params": "AcknowledgeAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of acknowledging alert action", "required": false, "schema": { "$ref": "#/definitions/AcknowledgeAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/unacknowledge": { "post": { "tags": [ "alert" ], "summary": "UnAcknowledge Alert", "description": "UnAcknowledge alert with given identifier", "operationId": "unAcknowledgeAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-unacknowledge-alert" }, "x-collapse-params": "UnAcknowledgeAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of unacknowledging alert action", "required": false, "schema": { "$ref": "#/definitions/UnAcknowledgeAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/close": { "post": { "tags": [ "alert" ], "summary": "Close Alert", "description": "Closes alert with given identifier", "operationId": "closeAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-close-alert" }, "x-collapse-params": "CloseAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of closing alert action", "required": false, "schema": { "$ref": "#/definitions/CloseAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/snooze": { "post": { "tags": [ "alert" ], "summary": "Snooze Alert", "description": "Snooze alert with given identifier", "operationId": "snoozeAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-snooze-alert" }, "x-collapse-params": "SnoozeAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of snoozing alert action", "required": true, "schema": { "$ref": "#/definitions/SnoozeAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/escalate": { "post": { "tags": [ "alert" ], "summary": "Escalate Alert", "description": "Escalate alert with given identifier", "operationId": "escalateAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-escalate-alert-to-next" }, "x-collapse-params": "EscalateAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of escalating alert action", "required": true, "schema": { "$ref": "#/definitions/EscalateAlertToNextPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/assign": { "post": { "tags": [ "alert" ], "summary": "Assign Alert", "description": "Assign alert with given identifier", "operationId": "assignAlert", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-assign-alert" }, "x-collapse-params": "AssignAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of assigning alert action", "required": true, "schema": { "$ref": "#/definitions/AssignAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/responders": { "post": { "tags": [ "alert" ], "summary": "Add Responder", "description": "Add responder to alert with given identifier", "operationId": "addResponder", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-add-responder-to-alert" }, "x-collapse-params": "AddResponderToAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of adding responder to alert action", "required": true, "schema": { "$ref": "#/definitions/AddResponderToAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/teams": { "post": { "tags": [ "alert" ], "summary": "Add Team", "description": "Add team to alert with given identifier", "operationId": "addTeam", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-add-team-to-alert" }, "x-collapse-params": "AddTeamToAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of adding team to alert action", "required": true, "schema": { "$ref": "#/definitions/AddTeamToAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/actions/{actionName}": { "post": { "tags": [ "alert" ], "summary": "Custom Alert Action", "description": "Custom actions for the alert", "operationId": "executeCustomAlertAction", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-execute-custom-action" }, "x-collapse-params": "ExecuteCustomAlertActionRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "actionName", "in": "path", "description": "Name of the action to execute", "required": true, "type": "string" }, { "name": "body", "in": "body", "description": "Request payload of executing custom alert action", "required": false, "schema": { "$ref": "#/definitions/ExecuteCustomAlertActionPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/recipients": { "get": { "tags": [ "alert" ], "summary": "List Alert Recipients", "description": "List alert recipients for the given alert identifier", "operationId": "listRecipients", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-list-alert-recipients" }, "x-collapse-params": "ListAlertRecipientsRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" } ], "responses": { "200": { "description": "Returns alert recipients for the given alert identifier", "schema": { "$ref": "#/definitions/ListAlertRecipientsResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/logs": { "get": { "tags": [ "alert" ], "summary": "List Alert Logs", "description": "List alert logs for the given alert identifier", "operationId": "listLogs", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-list-alert-logs" }, "x-collapse-params": "ListAlertLogsRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "$ref": "#/parameters/OffsetParam" }, { "$ref": "#/parameters/PageDirectionParam" }, { "$ref": "#/parameters/AlertLimitParam" }, { "$ref": "#/parameters/OrderParam" } ], "responses": { "200": { "description": "Returns alert logs for the given alert identifier", "schema": { "$ref": "#/definitions/ListAlertLogsResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" }, "X-Paging-Next": { "description": "Next page url", "type": "string" }, "X-Paging-First": { "description": "First page url", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/attachments": { "get": { "tags": [ "alert" ], "summary": "List Alert Attachments", "description": "List alert attachment names and urls for related alert", "operationId": "listAttachments", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-list-alert-attachments" }, "x-collapse-params": "ListAlertAttachmentsRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType2" } ], "responses": { "200": { "description": "Returns name and url for given identifier", "schema": { "$ref": "#/definitions/ListAlertAttachmentsResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } }, "post": { "tags": [ "alert" ], "summary": "Add Alert Attachment", "description": "Add Alert Attachment to related alert", "operationId": "addAttachment", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-create-alert-attachment" }, "x-collapse-params": "AddAttachmentToAlertRequest", "consumes": [ "multipart/form-data" ], "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType2" }, { "name": "file", "in": "formData", "required": true, "description": "Attachment file to be uploaded", "type": "file" }, { "name": "user", "in": "formData", "description": "Display name of the request owner", "required": false, "type": "string" }, { "name": "indexFile", "in": "formData", "description": "Name of html file which will be shown when attachment clicked on UI", "required": false, "type": "string" } ], "responses": { "201": { "description": "Returns attachment id", "schema": { "$ref": "#/definitions/SuccessResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "description": "Corrupted file", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" } } }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/attachments/{attachmentId}": { "get": { "tags": [ "alert" ], "summary": "Get Alert Attachment", "description": "Get alert attachment name and url for the given identifier", "operationId": "getAttachment", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-get-alert-attachment" }, "x-collapse-params": "GetAlertAttachmentRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType2" }, { "name": "attachmentId", "in": "path", "description": "Identifier of alert attachment", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "Returns name and url for given identifier", "schema": { "$ref": "#/definitions/GetAlertAttachmentResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } }, "delete": { "tags": [ "alert" ], "summary": "Remove Alert Attachment", "description": "Remove alert attachment for the given identifier", "operationId": "removeAttachment", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-delete-alert-attachment" }, "x-collapse-params": "RemoveAttachmentFromAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType2" }, { "name": "attachmentId", "in": "path", "description": "Identifier of alert attachment", "required": true, "type": "integer", "format": "int64" }, { "$ref": "#/parameters/AlertUserParam" } ], "responses": { "200": { "description": "Returns deleted messsage for this async operation.", "schema": { "$ref": "#/definitions/SuccessResponse" }, "headers": { "X-Request-ID": { "description": "Id of given request", "type": "string" }, "X-Response-Time": { "description": "Process time of given request", "type": "string" }, "X-RateLimit-State": { "description": "Status of rate limit", "type": "string" }, "X-RateLimit-Reason": { "description": "Source of the rate limit", "type": "string" }, "X-RateLimit-Period-In-Sec": { "description": "Time of throttle in seconds", "type": "string" } } }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/tags": { "post": { "tags": [ "alert" ], "summary": "Add Tags", "description": "Add tags to the alert with given identifier", "operationId": "addTags", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-add-tags-to-alert" }, "x-collapse-params": "AddTagsToAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of creating alert tags action", "required": true, "schema": { "$ref": "#/definitions/AddTagsToAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } }, "delete": { "tags": [ "alert" ], "summary": "Remove Tags", "description": "Remove tags of the alert with given identifier", "operationId": "removeTags", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-remove-tags-from-alert" }, "x-collapse-params": "RemoveTagsFromAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "$ref": "#/parameters/AlertUserParam" }, { "$ref": "#/parameters/AlertNoteParam" }, { "$ref": "#/parameters/AlertSourceParam" }, { "name": "tags", "in": "query", "description": "Tags field of the given alert as comma seperated values (e.g. 'tag1, tag2')", "required": true, "type": "array", "items": { "type": "string" }, "collectionFormat": "csv" } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidden" }, "404": { "$ref": "#/responses/NotFound" }, "422": { "$ref": "#/responses/UnprocessableEntity" }, "429": { "$ref": "#/responses/TooManyRequest" }, "default": { "$ref": "#/responses/GeneralError" } } } }, "/v2/alerts/{identifier}/details": { "post": { "tags": [ "alert" ], "summary": "Add Details", "description": "Add details to the alert with given identifier", "operationId": "addDetails", "externalDocs": { "description": "For more information", "url": "https://www.opsgenie.com/docs/alert-api#section-add-details-custom-properties-to-alert" }, "x-collapse-params": "AddDetailsToAlertRequest", "parameters": [ { "$ref": "#/parameters/AlertIdentifier" }, { "$ref": "#/parameters/AlertIdentifierType" }, { "name": "body", "in": "body", "description": "Request payload of adding alert details action", "required": true, "schema": { "$ref": "#/definitions/AddDetailsToAlertPayload" } } ], "responses": { "202": { "$ref": "#/responses/Accepted" }, "400": { "$ref": "#/responses/BadRequest" }, "401": { "$ref": "#/responses/Unauthorized" }, "402": { "$ref": "#/responses/PaymentRequired" }, "403": { "$ref": "#/responses/Forbidde