Kirk Friedman
Hi Travis and team
Related to this article
https://support.xmatters.com/hc/en-us/articles/208001206-Hipchat-Integration
How can I use the REST API within an inbound integration script to retrieve data so that I can push it back to a user.
Example: As a hipchat user I'd like to use my slash command for something like /xm_config OnCall and get back a list of the folks who are on call today or this week.
Thanks
Kirk
0
Comments
Please sign in to leave a comment.
Hello again Kirk! Lemme dig into this and get back to you.
Hey Kirk,
Ok, so I think it is better to add a new slash command because otherwise parsing out the OnCall and the group was getting hairy.
So, we'll create a new slash command, and you can enter this:
To get the on call schedule for the group "Group Name".
To set this all up:
The script below uses the "Hipchat" endpoint, but depending on your set up, we might need to create a new endpoint.
There could definitely be improvements to how the schedules are displayed, so feel free to tweak as needed. There is more data we could display, it just depends on exactly what you want to see.
The script:
Hi Travis,
That works with one caveat: The hipchat user doing the request must have 'Full Access User' role added. Otherwise you get an access error.
Thanks,
Kirk
Bah. Good catch. We are working on coming out with a new Web Services User role that will help allieviate those kinds of things.
Glad it worked for you though!
I hope you don't mind, but I wrote this up as my latest GIG article. Check it out: https://support.xmatters.com/hc/en-us/articles/214627943