I'm trying to perform an API call to get the current on-call user for a particular group.
curl -u dschroeder:PASSWORD https://viasat.hosted.xmatters.com/api/xm/1/groups/GROUP-NAME/calendar
where GROUP-NAME is a urlencoded group name. This works great, except when looking up a group that contains a slash in the name. For example, "Infrastructure - Cloud - CNs/DNs/SANs" throws a 500 error:
$ curl -u dschroeder:PASSWORD https://viasat.hosted.xmatters.com/api/xm/1/groups/Infrastructure%20-%20Cloud%20-%20CNs%2FDNs%2FSANs/calendar
{"code":500,"reason":"Internal Server Error","message":"An unexpected error occurred. When communicating with support please provide this request identifier: 5aad722a-bac5-439a-bd80-da61aeb2409e"}
It's not just this one group, any group I've tried where the name contains a slash throws this 500 error, whereas group names containing spaces, hyphens, parentheses, etc. work just fine. I tried searching through xMatters online documentation, but couldn't find anything on this, so that's why I'm contacting you.
Am I doing something blatantly wrong, or could this be a bug in the xMatters API?
Comments
Please sign in to leave a comment.
Hey Chris! Nope, that all looks right and this is actually a known issue (BUG-10100). It is currently in the backlog. Lemme see if I can get you a ticket to be notified when that is complete.
Hey Chris,
The issue is due to the forward slash in the group name. We've triaged this bug to the highest priority and will be pushing out a fix within the next week or so. I will post back here with the date of the fix when we know it.
In the mean time you can workaround the issue by removing the slashes from the group name.
Sorry for the inconvenience,
Nick Fletcher
Engineering Manager
Hey Chris,
Turns out this was already found and fixed in another ticket and is scheduled for deployment to your non-production environment on Thursday, March 9th and then to your production environment on Friday, March 10th.
Thanks for reaching out to us. Let us know if you run into any other issues or have any suggestions for improvement.
Thanks,
Nick
Thanks for the quick follow up Nick, much appreciated!
Hey Chris,
Just wanted to let you know that we were able to pull the fix in to an earlier deployment and it is now in your non-production environment. This will be in your production environment by EOD tomorrow.
Let us know if you still experience any issues.
Thanks,
Nick
Woo! This works for me:
`curl -X GET -u "restuser" https://acme.cs1.xmatters.com/api/xm/1/groups/TD_%2Fgroup123"
Mine is a non prod environment though, so you might try it in both environments. Let us know if you run into anything!