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

RahulG2
Kilo Contributor

Dear all, I am new to the community and trying setting up snow apis for my team.

I need to extract the all approvers listed on a change to send them a notification. How can I extract those based upon a change number provided?

thank you.

Hi Rahul,

 

First of all you would need to get sys_id - value based on the CHG nuber

 

https://YOUR_INSTANCE.service-now.com/api/now/table/change_request?number=CHGxxxxxxxx&sysparm_fields=sys_id

{
    "result": [
        {
            "sys_id""d2d8a6cadbbd9300c42062eb0b9619d6"
        }
    ]
}
 
When you have a sys_id of the CHG you could run following request from sysapproval_approver table
 
https://YOURINSTANCE.service-now.com/api/now/table/sysapproval_approver/d2d8a6cadbbd9300c42062eb0b9619d6?sysparm_display_value=true&sysparm_fields=approver%2Capprover.email

Thank you Sergey ! This solved my problem!