Is there a way to use the REST API to see who alerts are currently being sent to?

Not Yet Reviewed

We have an on-call rotation that switches every day. Its difficult to remember who is on-call that day, especially when people are doing temporary replacements. Currently the way that I check who is on-call is to 

1. Login

2. Click my profile

3. Click "My Schedule"

4. Mouse over the current day and see who's name is at the top.

I would like to be able to make a script to go out and retrieve this information for me if possible. Thanks!

0

Comments

11 comments
Date Votes

Please sign in to leave a comment.

  • Hey Eric. You're in luck! We just recently released the Group Calendar API here

    That doc article has a curl example:

    curl -H "Content-Type: application/json" --user username
    "https://acmeco.xmatters.com/api/xm/1/groups/IT/calendar"

    Parsing the response is the tricky part and will depend on where you are making the request from. Where are you intending on displaying this information or what application will make the request?

    0
  • Ideally I wanted to have a little desktop icon that I could click, and it would just display a persons name or username. Nothing too fancy

    0
  • already answered. sorry 

    0
  • Hey Eric, I'm going through old posts and I found your comment about a desktop notification. Desktop is tricky because it is so OS dependent. Something developed for windows likely won't work on a mac. There are some apps like PushBullet that we've kicked around, but a lot of IT security won't allow installing something like that on a workstation. 

    We are working on shift notifications for the mobile app. You can set the notifications to fire at a pre set time before your shift and before your shift ends. I'm pretty sure this will be rolled out to the product as a whole so that an SMS or email can be sent reminding you of your shift starting. 

    0
  • FWIW: shift notifications can be seen here: Sneak peek: mobile on-call reminders

    And to Travis' point, the UI first rolls out on Android, but the feature isn't mobile-centric: you can be notified on SMS, email, voice, as well as mobile push.

    0
  • Sorry if I was confusing with my response, I wasn't looking for a desktop notification, but rather a bat script that I could run from a desktop icon that would just display who was on-call. Even better would be if I could specify a day. We use the xmatters shift as a rolling on-call, so it can be cumbersome to find out who is on-call for a specific day.

    0
  • hmmm, I bet you could have a bat file that would make an http request to the REST API, then generate an HTML file and pop that. Might work better with a powershell script for windows, or a bash script for mac. 

    0
  • I believe I ran into an issue before due to the fact that I am behind a corporate proxy. Is there anyway I can specify the proxy details in order to get through on this call?

    0
  • Well, it's going to depend on the script and what language/framework it is written in. It looks like PowerShell has proxy support. If you're on linux/mac, curl has a pretty simple proxy variable.

    What language are you writing this in?

    0
  • That worked! I can use either curl or powershell, but I am on a windows machine.

    0
  • Any suggestions on parsing the output?

    0

Didn't find what you were looking for?

New post