Expose Incidents/{}/chat API as REST API

XMLWordPrintable

    • 4

      User Problem

      This https://docs.opsgenie.com/docs/incident-api does not expose any endpoints for  /chat or /chat/channels for the Incident API

      But with a valid token from web login, customers can send a POST request to

      https://<my-instance>.app.opsgenie.com/webapi/incidents/]{}/chat/create-channel
      
      • With the right auth header and it being an open incident, the slack channel is created.
      • The body is also important, and relies on a connection with the incident slack app to already be completed.
        {"channelName":"good-channelname","description":"Descriptions are cool","connectionIdentifier":{"chatType":"slack","connectionId":"myconnectionID"}}

         

      This POST enables customers to send a subsequent POST to https://docs.opsgenie.com/docs/incident-api#add-tags-to-incident (the documented API) adding the slack channel ID to a tag.

      • Any alert then sent to responders through a customers company wide incident announcement channel, will then includes a relevant link to the already created slack channel. A very useful reference, avoiding manual roundabouts methods of finding the channel.
      • This also 100% ensure each incident has a relevant discussion channel in slack , and avoids any “reminder” for engineers to create a slack channel.

      With a GET to 'https://<my-instance>.app.opsgenie.com/webapi/incidents/{}/chat/channels' (auth header required also), Customers can retrieve the chat channels of any incident also.

      There should also be the ability to remove a channel using DELETE.

      Suggested Solutions

      Expose chat and/or chat/channels as REST API endpoints and attributes:

      REST API endpoints to handle Chat channels like Responders
      GET https://api.opsgenie.com/v1/incidents/:identifier
      Returns Chat details as fields in response
      POST,PUT,PATCH https://api.opsgenie.com/v1/incidents/:identifier/chat
      To Modify the list of Chat Channels in an Incident

      OR REST API endpoints to handle Multiple chat connections

      POST https://api.opsgenie.com/v1/incidents/:identifier/chat/create
      Creates Chat Channels
      GET https://api.opsgenie.com/v1/incidents/:identifier/chat/
      Gets a List of Chat Channels
      GET https://api.opsgenie.com/v1/incidents/:identifier/chat/:connectionId
      Gets Details of a particular Chat channel
      DELETE https://api.opsgenie.com/v1/incidents/:identifier/chat/:connectionId 
      Deletes a Chat Channel from an Incident.

      Current Workarounds

      Currently customers need to use the /webapi/* calls, to obtain these details and have to explicitly manage session token expiry in order to continue to use these calls.

            Assignee:
            Unassigned
            Reporter:
            Scot Wilson
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: