Ops Genie Alert API
79 min
opsgenie alert api connector uses opsgenie alert rest api opsgenie is a modern incident management platform that helps organizations quickly detect and respond to incidents prerequisites opsgenie alert api requires an apikey asset setup the asset for this plugin requires the following inputs api token capabilities opsgenie alert api connector has the following capabilities get request status create alert delete alert get alert list alerts count alerts acknowledge alert close alert add note to alert execute custom action unacknowledge alert snooze alert escalate alert to next assign alert add team to alert and so on notes the complete documentation for the api is found at https //docs opsgenie com/docs/alert api apikey can be created at https //app opsgenie com/ configurations api key authentication authenticates using an api key configuration parameters parameter description type required url a url to the target host string required x apikey geniekey string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions acknowledge alert opsgenie acknowledge alert endpoint url v2/alerts/{{identifier}}/acknowledge method post input argument name type required description path parameters identifier string required identifier of the alert parameters identifiertype string optional parameters for the acknowledge alert action source string optional source field of the alert default value is ip address of the incoming request note string optional additional note that will be added while creating the alert user string optional display name of the request owner input example {"path parameters" {"identifier" "string"},"parameters" {"identifiertype" "string"},"source" "string","note" "string","user" "string"} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} add note to alert opsgenie add note to alert endpoint url v2/alerts/{{identifier}}/notes method post input argument name type required description path parameters identifier string required parameters for the add note to alert action parameters identifiertype string optional parameters for the add note to alert action user string optional parameter for add note to alert source string optional parameter for add note to alert note string optional parameter for add note to alert input example {"parameters" {"identifiertype" "id"},"json body" {"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} add responder to alert opsgenie add responder to alert endpoint url v2/alerts/{{identifier}}/responders method post input argument name type required description path parameters identifier string required parameters for the add responder to alert action parameters identifiertype string optional parameters for the add responder to alert action responder object optional parameter for add responder to alert responder type string optional type of the resource responder id string optional unique identifier user string optional parameter for add responder to alert source string optional parameter for add responder to alert note string optional parameter for add responder to alert input example {"parameters" {"identifiertype" "id"},"json body" {"responder" {"type" "team","id" "4513b7ea 3b91 438f b7e4 e3e54af9147c"},"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} add tags to alert opsgenie add tags to alert endpoint url v2/alerts/{{identifier}}/tags method post input argument name type required description path parameters identifier string required parameters for the add tags to alert action parameters identifiertype string optional parameters for the add tags to alert action tags array optional parameter for add tags to alert user string optional parameter for add tags to alert source string optional parameter for add tags to alert note string optional parameter for add tags to alert input example {"parameters" {"identifiertype" "id"},"json body" {"tags" \["overwritequiethours","critical"],"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} add team to alert opsgenie add team to alert endpoint url v2/alerts/{{identifier}}/teams method post input argument name type required description path parameters identifier string required parameters for the add team to alert action parameters identifiertype string optional parameters for the add team to alert action team object optional parameter for add team to alert team id string optional unique identifier user string optional parameter for add team to alert source string optional parameter for add team to alert note string optional parameter for add team to alert input example {"parameters" {"identifiertype" "id"},"json body" {"team" {"id" "4513b7ea 3b91 438f b7e4 e3e54af9147c"},"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} assign alert opsgenie assign alert endpoint url v2/alerts/{{identifier}}/assign method post input argument name type required description path parameters identifier string required parameters for the assign alert action parameters identifiertype string optional parameters for the assign alert action owner object optional parameter for assign alert owner id string optional unique identifier user string optional parameter for assign alert source string optional parameter for assign alert note string optional parameter for assign alert input example {"parameters" {"identifiertype" "id"},"json body" {"owner" {"id" "4513b7ea 3b91 438f b7e4 e3e54af9147c"},"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} close alert opsgenie close alert endpoint url v2/alerts/{{identifier}}/close method post input argument name type required description path parameters identifier string required parameters for the close alert action parameters identifiertype string optional parameters for the close alert action user string optional parameter for close alert source string optional parameter for close alert note string optional parameter for close alert input example {"parameters" {"identifiertype" "id"},"json body" {"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} count alerts count alerts request is used to count alerts in opsgenie endpoint url v2/alerts/count method get input argument name type required description parameters query string optional search query to apply while filtering the alerts parameters searchidentifier string optional identifier of the saved search query to apply while filtering the alerts parameters searchidentifiertype string optional identifier type of the saved search query possible values are id and name default value is id input example {"parameters" {"query" "string","searchidentifier" "string","searchidentifiertype" "string"}} output parameter type description data object response data data count number response data took number output field took requestid string unique identifier output example {"data" {"count" 7},"took" 0 051,"requestid" "9ae63dd7 ed00 4c81 86f0 c4ffd33142c9"} create alert create alert using opsgenie rest api endpoint url v2/alerts method post input argument name type required description message string optional message of the alert alias string optional client defined identifier of the alert description string optional a detailed information about the alert responders array optional teams, users, escalations and schedules that the alert will be routed to send notifications responders id string optional unique identifier responders type string optional type of the resource responders name string optional name of the resource responders username string optional name of the resource visibleto array optional teams and users that the alert will become visible to without sending any notification visibleto id string optional unique identifier visibleto type string optional type of the resource visibleto name string optional name of the resource visibleto username string optional name of the resource actions array optional custom actions that will be available for the alert tags array optional tags of the alert details object optional map of key value pairs to use as custom properties of the alert details key1 string optional parameter for create alert details key2 string optional parameter for create alert entity string optional used to specify which domain alert is related to priority string optional priority level of the alert possible values are p1, p2, p3, p4 and p5 default value is p3 source string optional source field of the alert default value is ip address of the incoming request note string optional additional note that will be added while creating the alert user string optional display name of the request owner input example {"message" "string","alias" "string","description" "string","responders" \[{"id" "12345678 1234 1234 1234 123456789abc","type" "string","name" "example name","username" "example name"}],"visibleto" \[{"id" "12345678 1234 1234 1234 123456789abc","type" "string","name" "example name","username" "example name"}],"actions" \["string"],"tags" \["string"],"details" {"key1" "string","key2" "string"},"entity" "string","priority" "string","source" "string","note" "string","user" "string"} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} delete alert opsgenie delete alert endpoint url v2/alerts/{{identifier}} method delete input argument name type required description path parameters identifier string required identifier of the alert parameters identifiertype string optional possible values are alertid and tinyid parameters user string optional display name of the request owner parameters source string optional display name of the request source input example {"path parameters" {"identifier" "string"},"parameters" {"identifiertype" "string","user" "string","source" "string"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} escalate alert to next opsgenie escalate alert to next endpoint url v2/alerts/{{identifier}}/escalate method post input argument name type required description path parameters identifier string required parameters for the escalate alert to next action parameters identifiertype string optional parameters for the escalate alert to next action escalation object optional escalation that the alert will be escalated either id or name of the escalation should be provided escalation id string optional unique identifier user string optional parameter for escalate alert to next source string optional parameter for escalate alert to next note string optional parameter for escalate alert to next input example {"parameters" {"identifiertype" "id"},"json body" {"escalation" {"id" "4513b7ea 3b91 438f b7e4 e3e54af9147c"},"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} execute custom action opsgenie execute custom action endpoint url v2/alerts/{{identifier}}/actions/{{action}} method post input argument name type required description path parameters identifier string required parameters for the execute custom action action path parameters action string required parameters for the execute custom action action parameters identifiertype string optional parameters for the execute custom action action user string optional parameter for execute custom action source string optional parameter for execute custom action note string optional parameter for execute custom action input example {"parameters" {"identifiertype" "id"},"json body" {"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7","action" "restart"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} get alert opsgenie get alert endpoint url v2/alerts/{{identifier}} method get input argument name type required description path parameters identifier string required identifier of the alert parameters identifiertype string optional parameters for the get alert action input example {"path parameters" {"identifier" "string"},"parameters" {"identifiertype" "string"}} output parameter type description data object response data data id string response data data tinyid string response data data alias string response data data message string response data data status string response data data acknowledged boolean response data data isseen boolean response data data tags array response data data snoozed boolean response data data snoozeduntil string response data data count number response data data lastoccurredat string response data data createdat string response data data updatedat string response data data source string response data data owner string response data data priority string response data data responders array response data data responders id string response data data responders type string response data data integration object response data data integration id string response data data integration name string response data data integration type string response data output example {"data" {"id" "70413a06 38d6 4c85 92b8 5ebc900d42e2","tinyid" "1791","alias" "event 573","message" "our servers are in danger","status" "closed","acknowledged"\ false,"isseen"\ true,"tags" \["overwritequiethours","critical"],"snoozed"\ true,"snoozeduntil" "2017 04 03t20 32 35 143z","count" 79,"lastoccurredat" "2017 04 03t20 05 50 894z","createdat" "2017 03 21t20 32 52 353z","updatedat" "2017 04 03t20 32 57 301z","source" "isengard"},"requestid" "9ae63dd7 ed00 4c81 86f0 c4ffd33142c9"} get request status opsgenie get request status endpoint url v2/alerts/requests/{{requestid}} method get input argument name type required description path parameters requestid string required parameters for the get request status action input example {"path parameters" {"requestid" "513085b8 caf3 4f91 aa23 be5fdefc3570"}} output parameter type description data object response data data success boolean response data data action string response data data processedat string response data data integrationid string response data data issuccess boolean response data data status string response data data alertid string response data data alias string response data took number output field took requestid string unique identifier output example {"data" {"success"\ true,"action" "create","processedat" "2017 05 24t14 24 20 844z","integrationid" "c9cec2cb e782 4ebb bc1d 1b2fa703cf03","issuccess"\ true,"status" "created alert","alertid" "8743a1b2 11da 480e 8493 744660987bef","alias" "8743a1b2 11da 480e 8493 744660987bef"},"took" 0 022,"requestid" "ec7e1d8e 1c75 442e a271 731070a7fa4d"} list alerts list alert opsgenie alert api endpoint url v2/alerts method get input argument name type required description parameters query string optional parameters for the list alerts action parameters offset number optional parameters for the list alerts action parameters limit number optional parameters for the list alerts action parameters sort string optional parameters for the list alerts action parameters order string optional parameters for the list alerts action parameters searchidentifier string optional parameters for the list alerts action parameters searchidentifiertype string optional parameters for the list alerts action input example {"parameters" {"query" "status\ open","offset" 7,"limit" 10,"sort" "createdat","order" "desc","searchidentifier" "70413a06 38d6 4c85 92b8 5ebc900d42e2","searchidentifiertype" "id"}} output parameter type description data array response data data id string response data data tinyid string response data data alias string response data data message string response data data status string response data data acknowledged boolean response data data isseen boolean response data data tags array response data data snoozed boolean response data data snoozeduntil string response data data count number response data data lastoccurredat string response data data createdat string response data data updatedat string response data data source string response data data owner string response data data priority string response data data responders array response data data responders file name string response data data responders file string response data data integration object response data data integration id string response data data integration name string response data data integration type string response data output example {"data" \[{"id" "70413a06 38d6 4c85 92b8 5ebc900d42e2","tinyid" "1791","alias" "event 573","message" "our servers are in danger","status" "closed","acknowledged"\ false,"isseen"\ true,"tags" \[],"snoozed"\ true,"snoozeduntil" "2017 04 03t20 32 35 143z","count" 79,"lastoccurredat" "2017 04 03t20 05 50 894z","createdat" "2017 03 21t20 32 52 353z","updatedat" "2017 04 03t20 32 57 301z","source" "isengard"},{"id" "70413a06 38d6 4c85 92b8 5ebc900d42e2","tinyid" "1791","alias" "event 573","message" "sample remove tags from alert opsgenie remove tags from alert endpoint url v2/alerts/{{identifier}}/tags method delete input argument name type required description path parameters identifier string required parameters for the remove tags from alert action parameters identifiertype string optional parameters for the remove tags from alert action parameters tags string required parameters for the remove tags from alert action parameters user string optional parameters for the remove tags from alert action parameters source string optional parameters for the remove tags from alert action parameters note string optional parameters for the remove tags from alert action input example {"parameters" {"identifiertype" "id","tags" "overwritequiethours,critical","user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} snooze alert opsgenie snooze alert endpoint url v2/alerts/{{identifier}}/snooze method post input argument name type required description path parameters identifier string required parameters for the snooze alert action parameters identifiertype string optional parameters for the snooze alert action endtime string optional time value user string optional parameter for snooze alert source string optional parameter for snooze alert note string optional parameter for snooze alert input example {"parameters" {"identifiertype" "id"},"json body" {"endtime" "2017 04 03t20 05 50 894z","user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} unacknowledge alert opsgenie unackowledge alert endpoint url v2/alerts/{{identifier}}/unacknowledge method post input argument name type required description path parameters identifier string required parameters for the unacknowledge alert action parameters identifiertype string optional parameters for the unacknowledge alert action user string optional parameter for unacknowledge alert source string optional parameter for unacknowledge alert note string optional parameter for unacknowledge alert input example {"parameters" {"identifiertype" "id"},"json body" {"user" "monitoring script","source" "aws lambda","note" "action executed via alert api"},"path parameters" {"identifier" "8418d193 2dab 4490 b331 8c02cdd196b7"}} output parameter type description result string result of the operation took number output field took requestid string unique identifier output example {"result" "request will be processed","took" 0 302,"requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120"} response headers header description example content type the media type of the resource application/json date the date and time at which the message was originated thu, 01 jan 2024 00 00 00 gmt