How to get the list of approvers and their email addresses using REST API

Sergey Minsky
Kilo Contributor

How to get the list of the approvers and their email addresses using REST API. I found this table sysapproval_approver but it's not clear to me how to get the approvers information for the specific list of tasks ?

12 REPLIES 12

Hi Sergey,


"Is it possible to select just   a "Group name" without link?"


Yes it is.


If I understand correctly you already set sysparm_display_value=true so you can add this as well   &sysparm_exclude_reference_link=true


for example


GET https://<instance_name>.service-now.com/api/now/table/incident/965c9e5347c12200e0ef563dbb9a7156?sysparm_display_value=true&sysparm_exclude_reference_link=true

..


"caller_id": "System Administrator",


..


"assignment_group": "Change Management",




without this parameter being set to true - the default is false - the response would be


..


"assignment_group": {


  "display_value": "Change Management",


  "link": "https://<instance_name>.service-now.com/api/now/table/sys_user_group/a715cd759f2002002920bde8132e7018"


  },



Yep, in case you were wondering, the example table above is incident rather than sysapproval_approver but the effect of the sysparm_exclude_reference_link=true is the same.




If the reply was informational, please like, mark as helpful or mark as correct!


Just to mention - both of these paramaeters - sysparm_display_value=true&sysparm_exclude_reference_link=true are visible in the REST api explorer


Screen Shot 2017-09-20 at 10.09.54 PM.png


Hi Sergey,



I see Pradeep has given the specific answer to your question.


In general you can build and copy a query in a list view of a table - in this case of the sysapproval_approver table - and append it to the REST URL.



ServiceNow Scripting 101: Encoded Query - A Breadcrumbs Issue



If the reply was informational, please like, mark as helpful or mark as correct!


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Let me know if that answered your question. If so, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you


How To Mark Answers Correct From Community Inbox