Using the SDK to handle Access Requests

Get Access Request Status will show the status of the entire request, whereas Get Pending Approvals will show the status of each approval step in an access request. If the goal is to write a program that can cancel an access request based on some criteria, use the get access request status endpoint to find the access request you are interested in. There are a number of query params that can help narrow it down, such as using regardingIdentity and the sorters query params to filter by a specific identity and by latest requests. Once you narrow down which request you are interested in cancelling, pull out the accessRequestId from the body, which you will use in cancel access request to cancel the request.