Forum Discussion

wadstromdev's avatar
wadstromdev
Copper Contributor
May 07, 2020

Trigger a playbook on an incident via API?

We can trigger playbooks manually on an incident from the incident page, but is it possible to do this via an API? The goal is to produce some sort of playbook chaining without having to build complex playbooks that are error prone.

 

Any input appreciated!

6 Replies

  • wadstromdev

     

    Running multiple playbooks when a rule triggers will be available real soon now.

    Also, you probably refer to alert triggers (manual or automated) as those are available today. Incident triggers are expected in the near future.

    ~ Ofer

    • wadstromdev's avatar
      wadstromdev
      Copper Contributor

      Ofer_Shezaf that's nice to hear that running multiple playbooks will be available soon, will be a welcome addition!


      What I'm asking for here is an API-version of this button:

      Which is found after clicking here on an incident alert page:

       

      For example being able to trigger the playbook by sending a request to an API-endpoint and specifying the workspace, resource group, incident id or number, and the name or id of the playbook. Makes sense? 🙂

      • Ofer_Shezaf's avatar
        Ofer_Shezaf
        Icon for Microsoft rankMicrosoft

        wadstromdev : gotcha. today you will have to use a webhook and fetch the incident information using the API. We will look into this request for the future.

         

        Thanks!

        ~ Ofer

  • HIwadstromdev 

     

    Yes, you can build a Playbook which trigger is when an HTTP POST is received. As you can see in the screenshot below, you get the URL that you should use in your POST call. You can then execute this POST call from another LogicApp/Playbook.

     

    Does that answer your question?

    • wadstromdev's avatar
      wadstromdev
      Copper Contributor

      Javier-Soriano sorry for the late reply. That seems like a good alternative, although not exactly what I'm after. Do you have any more details on the request body JSON schema or a link with more information so that I can poke around a bit more? 🙂

Resources