Plugin connect with postmal from sailpoint

Im trying to follow up this tutorial:

The plugin is functional. But when Im trying to apply to call it from postman i get a 404

Im not sure how to call to the endpoint, from the example is:
http://localhost:8080/identityiq/plugin/rest/PluginExample/getExample —> 404

When I call http://localhost:8080/identityiq/plugin -->202 with exception in tomcat “NullPoint”

so I can make get the respond I just need to know the endpoint

===

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.util.AntPathMatcher;
import sailpoint.object.*;
import sailpoint.api.*;
import sailpoint.rest.plugin.BasePluginResource;
import sailpoint.rest.plugin.RequiredRight;
import sailpoint.tools.GeneralException;

/**
 * 
 *         Class to manage all rest api calls.
 */
@Path("PluginExample")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@RequiredRight("examplePluginRight")
public class ExamplePluginRestManager extends BasePluginResource {
	
	private static final Log log = LogFactory.getLog(ExamplePluginRestManager.class);
	private Response response;
	
	public String getPluginName() {
		
		return "Example Plugin";
	}

	
	@GET
	@Path("getExample")
	public Response getExample() throws GeneralException, SQLException {
		
		log.trace("Entering getExample...");
		SailPointContext context = SailPointFactory.getCurrentContext();

//		QueryOptions qo = new QueryOptions();
//		Filter filter = Filter.eq("name", "Adam.Kennedy");
//		qo.addFilter(filter);
//		int count = context.countObjects(Identity.class, qo);
//
//		String responseString = "How many Adams? " + count;
		String responseString = "It worked";

		response = Response.status(Response.Status.OK).entity(responseString).build();

		log.trace("Exiting getExample...");
		log.trace("====response with metadata:: ====" + response.getMetadata());

		return response;
	}
}

When i try the entire endpoint:
http://localhost:8080/identityiq/plugin/rest/PluginExample/getExample

here is the code
PluginExample.zip (30.1 KB)

Thanks in advance

The build.properties contains details which may not be applicable to your environment

jdk.home.1.7=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk
iiq.home=/Users/adam.creaney/Documents/IdentityIQ83/identityiq

Can you try with the below example in the build.properties ?

iiq.version=iiq.X.x

#define the plugin and version
pluginName=<Plugin_Name>
version=Y.y

1 Like

Hi Abhishek,

Thank you for your answer. This what i have (I had changed from the zip download file to my configuration)

jdk.home.1.8=intalation_java/Java/jdk1.8.0_202
iiq.home=installation_iiq/tomcat/webapps/identityiq
iiq.version=iiq.8.3
pluginName=ExamplePlugin
version=1.0.0

Still not working

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.