REST API Query for RITM Approver

jcshelby
Mega Contributor

I'm looking for a REST API endpoint or table that I can query to determine what the approver for a specific RITM is? In other words: for a given REQ, when the REQ is waiting on approval from another user (ex. a manager), is there a query to tell me who that person is or is there a table where that data is maintained? This is for Jakarta or Kingston.

For example, if a user opens a request that spawns a RITM, there is a task that's created for approval of that RITM. However, when I go look at the sc_tasks table I don't see that task present in the query response. I saw in the doc that the approver information is maintained in an extension to this table, but I'm not sure what table that would be or how I can query it. I also didn't see the approver information listed in the response when querying the sc_request table, though I did see that one of the fields in the response indicated that approval was in progress, but not on whom that approval was waiting.

1 ACCEPTED SOLUTION

jcshelby
Mega Contributor

I figured it out - the query seems to need to be filtered by the request table rather than the requested items table. It seems the approval is linked to the originating request rather than the RITM that's derived from that request. The query that ended up working is below. Thanks for the quick help and assistance!



https://dev21256.service-now.com/api/now/table/sysapproval_approver?source_table=sc_request


View solution in original post

5 REPLIES 5

Can we get the entire api call Since I am trying to form this API request but I guess I am messing up the request with sys_id