Playbooks Rest API Post Teams | Nutanix Community
Skip to main content

Im trying to create a playbook that on X alert posts to teams channel…. is this possible?

I have tried a few methods but not having much joy.

Method: POST 

URL: https://outlook.office.com/webhook/blahblahblahlongstring

user: blank

Pass: blank

Request body: I have tried setting json and tried using the built in parameters

Alert: Source Entity Name

Alert: Alert Name

Alert: Creation Time

Alert: Severity

 

request headers: blank or Content-Type: application/json

 

 

so am i just missing something about the syntax? Or is the rest api call for nutanix api’s only? 

 

Thanks in advance. 

Hey @adoyle as far as I think the REST API calls are for Nutanix APIs only. And also below are some of the documents relating to X-PLAY Playbooks.

 

  1. Parameters required for Triggers and actions and this also explains what all actions you can take on an Alert: https://portal.nutanix.com/page/documents/details/?targetId=Prism-Central-Guide-Prism-v5_17%3Amul-playbooks-parameters-pc-r.html
  2. A really good summary about X-play: https://next.nutanix.com/blog-40/simple-and-powerful-automation-with-prism-pro-x-play-33030

 

Also what teams channel are you talking about, is it a slack group ?

 

The only actions which are supported are:

 

Actions

 

Let me know if you need anything else.:smile:


Thanks Anish, 

 

I have been trying to post to a Microsoft teams (Microsoft’s version slack)… using the rest api method but I assumed it was for nutanix rest api after trying to test. 

 

I can use a bash script instead to run the post from curl with an alert… thank you for the information, greatly appreciated :) 


Hey, @adoyle that is so amazing.:smile: Glad that it worked out. I see so you were talking about MS Teams.

It is indeed a pleasure to share. I hope it is working now. Let me know if you need help with anything else. :grin:

 

 


Ok I figured it out… I wasnt able to include the nutanix api perameters… but its now working for anyone who wants to know

all it was expecting was json format… didnt need to specify headers at all.

 

heres what i set:

 

set a custom alert policy to 5-10% cpu so it would trigger a lot and selected my test vm

 

obviously this is my very fist time attempting this and literally just figured it out but in the near future Id like to see if I can call the alert parameters.

cant seem to change the answer in the post? might just make a quick new one. 

Any hew cheers! 

Aidan


Hey @adoyle . That is amazing.  Glad that you figured it out. Yes, you can make a new topic and mention the workaround. :smile:

 

Cheers !!


Hey @adoyle 
I’m a bit late to responding here, we actually have a couple video examples our team has put together on how you can set this up real easily.