Access request tracking API

Hi Team,

We have a requirement to create a custom api to know the access request status..

Can you please provide me the road map to fullfil this activity of you have any sample also please share with me

If you need BeanShell code please try this. I’m not much clarity on the question. This code will work based on identity. If you need rest service api let me know . I will provide the details how to create the restendpoint

import sailpoint.object.IdentityRequest;
import sailpoint.object.Filter;
import sailpoint.object.QueryOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

// Replace with the unique SailPoint Identity name
String targetIdentityName = “john.doe”;
List resultsList = new ArrayList();

// Formulate efficient query options using SailPoint Filters
QueryOptions qo = new QueryOptions();
qo.addFilter(Filter.eq(“targetName”, targetIdentityName));

// Query the DB context
List requests = context.getObjects(IdentityRequest.class, qo);

if (requests != null && !requests.isEmpty()) {
for (IdentityRequest req : requests) {
Map reqDetails = new HashMap();
reqDetails.put(“requestId”, req.getName());
reqDetails.put(“executionStatus”, req.getExecutionStatus().toString()); // Executing, Completed, etc.
reqDetails.put(“completionStatus”, req.getCompletionStatus() != null ? req.getCompletionStatus().toString() : “PENDING”);
reqDetails.put(“created”, req.getCreated().toString());

    resultsList.add(reqDetails);
}

}

return resultsList;

@sureshbommareddy98 If i understood it correctly, you need a rest endpoint to check any access request status like Completed, In progress or Cancelled.

If so, you need to create a Plugin for custom REST service where you can take access request number as input and in your executor, you can query access request and return the status.

Please follow this article for plugin development references: Plugin Development - Compass
If you need any further help with the development, do reach out to us.

You will have to create a plugin and expose the access request endpoint. You can check sailpoint videos plugin exposing rest endpoints,

The best option is to create plugin which can be used effectively for this requirement

Hi bro

This can be achieved using a custom Plugin in IdentityIQ. We can create a REST endpoint that accepts a Request ID and returns the current access request status.

The endpoint can fetch details from Identity Requests, Work Items, or Provisioning Transactions and provide statuses such as Pending, Approved, Rejected, Completed, or Failed.