- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2018 05:03 PM
Is there a way to display who is the active on-call member from the calendar. For example we may have John Doe in Order position 3 and he is the active on-call member for the week but when we query the roster it will display who is in position 1 instead of who is truly on-call?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2018 01:30 AM
If you want to make an api call through script you can do like this -
var request = new sn_ws.RESTMessageV2(); request.setEndpoint('http://localhost:8008/api/now/on_call_rota/whoisoncall?group_ids=0a52d3dcd7011200f2d224837e6103f2'); request.setHttpMethod('GET'); //Eg. UserName="admin", Password="admin" for this code sample. var user = 'admin'; var password = 'admin'; request.setBasicAuth(user,password); request.setRequestHeader("Accept","application/json"); var response = request.execute(); gs.log(response.getBody());
For more examples navigate to rest api explorer select an api call you can see examples
to attach them in the code like in the screenshot attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 12:41 AM
Hi Ben Cervantes,
there is an API call named 'whoisoncall'. For your question you can provide group sys ids to the API call and it will return the details of the present active on-call member of that group.
Regards,
Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2018 06:42 AM
How would the function called be scripted is you could get me started with an example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2018 01:30 AM
If you want to make an api call through script you can do like this -
var request = new sn_ws.RESTMessageV2(); request.setEndpoint('http://localhost:8008/api/now/on_call_rota/whoisoncall?group_ids=0a52d3dcd7011200f2d224837e6103f2'); request.setHttpMethod('GET'); //Eg. UserName="admin", Password="admin" for this code sample. var user = 'admin'; var password = 'admin'; request.setBasicAuth(user,password); request.setRequestHeader("Accept","application/json"); var response = request.execute(); gs.log(response.getBody());
For more examples navigate to rest api explorer select an api call you can see examples
to attach them in the code like in the screenshot attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2018 11:56 AM
I got it to work thanks!