Ops Genie Alert API
78 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 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 identifier string required identifier of the alert identifiertype string optional unique identifier 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier responder object required parameter for add responder to alert type string optional type of the resource 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier tags array required 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier team object required parameter for add team to alert 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier owner object required parameter for assign alert 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier user string optional parameter for close alert source string optional parameter for close alert note string optional parameter for close alert output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 query string optional search query to apply while filtering the alerts searchidentifier string optional identifier of the saved search query to apply while filtering the alerts searchidentifiertype string optional identifier type of the saved search query possible values are id and name default value is id output parameter type description data object response data count number count value took number output field took requestid string unique identifier 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 required 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 id string optional unique identifier type string optional type of the resource name string optional name of the resource username string optional name of the resource visibleto array optional teams and users that the alert will become visible to without sending any notification id string optional unique identifier type string optional type of the resource name string optional name of the resource 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 key1 string optional parameter for create alert 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required identifier of the alert identifiertype string optional possible values are alertid and tinyid user string optional display name of the request owner source string optional display name of the request source output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier escalation object required escalation that the alert will be escalated either id or name of the escalation should be provided 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 output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier action string required parameter for execute custom action identifiertype string optional unique identifier user string optional parameter for execute custom action source string optional parameter for execute custom action note string optional parameter for execute custom action output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required identifier of the alert identifiertype string optional unique identifier output parameter type description data object response data id string unique identifier tinyid string unique identifier alias string output field alias message string response message status string status value acknowledged boolean output field acknowledged isseen boolean output field isseen tags array output field tags snoozed boolean output field snoozed snoozeduntil string output field snoozeduntil count number count value lastoccurredat string output field lastoccurredat createdat string output field createdat updatedat string output field updatedat source string output field source owner string output field owner priority string output field priority responders array output field responders id string unique identifier type string type of the resource integration object output field integration id string unique identifier name string name of the resource type string type of the resource 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" }, "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 requestid string required unique identifier output parameter type description data object response data success boolean whether the operation was successful action string output field action processedat string output field processedat integrationid string unique identifier issuccess boolean whether the operation was successful status string status value alertid string unique identifier alias string output field alias took number output field took requestid string unique identifier 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 query string optional parameter for list alerts offset number optional parameter for list alerts limit number optional parameter for list alerts sort string optional parameter for list alerts order string optional parameter for list alerts searchidentifier string optional unique identifier searchidentifiertype string optional unique identifier output parameter type description data array response data id string unique identifier tinyid string unique identifier alias string output field alias message string response message status string status value acknowledged boolean output field acknowledged isseen boolean output field isseen tags array output field tags snoozed boolean output field snoozed snoozeduntil string output field snoozeduntil count number count value lastoccurredat string output field lastoccurredat createdat string output field createdat updatedat string output field updatedat source string output field source owner string output field owner priority string output field priority responders array output field responders file name string name of the resource file string output field file integration object output field integration id string unique identifier name string name of the resource type string type of the resource example \[ { "data" \[ {}, {} ], "paging" { "next" "https //api opsgenie com/v2/alerts?query=status%3aopen\&offset=20\&limit=10\&sort=c ", "first" "https //api opsgenie com/v2/alerts?query=status%3aopen\&offset=0\&limit=10\&sort=cr ", "last" "https //api opsgenie com/v2/alerts?query=status%3aopen\&offset=100\&limit=10\&sort= " }, "took" 0 605, "requestid" "9ae63dd7 ed00 4c81 86f0 c4ffd33142c9" } ] remove tags from alert opsgenie remove tags from alert endpoint url v2/alerts/{{identifier}}/tags method delete input argument name type required description identifier string required unique identifier identifiertype string optional unique identifier tags string required parameter for remove tags from alert user string optional parameter for remove tags from alert source string optional parameter for remove tags from alert note string optional parameter for remove tags from alert output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier endtime string required time value user string optional parameter for snooze alert source string optional parameter for snooze alert note string optional parameter for snooze alert output parameter type description result string result of the operation took number output field took requestid string unique identifier 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 identifier string required unique identifier identifiertype string optional unique identifier user string optional parameter for unacknowledge alert source string optional parameter for unacknowledge alert note string optional parameter for unacknowledge alert output parameter type description result string result of the operation took number output field took requestid string unique identifier example \[ { "result" "request will be processed", "took" 0 302, "requestid" "43a29c5c 3dbf 4fa4 9c26 f4f71023e120" } ] notes the complete documentation for the api is found at https //docs opsgenie com/docs/alert api https //docs opsgenie com/docs/alert api apikey can be created at https //app opsgenie com/ https //app opsgenie com/