Class WebServicesClient

java.lang.Object
sailpoint.connector.webservices.WebServicesClient

public class WebServicesClient extends Object
Definition of a Web Services Client interface available to Rule implementors.
  • Field Details

    • _client

      protected connector.common.http.client.HttpClient _client
  • Constructor Details

    • WebServicesClient

      public WebServicesClient()
  • Method Details

    • configure

      public void configure(Map args) throws Exception
      Configure connection parameters. See the ARG_* constants.
       public static final String ARG_URL = "url";
       public static final String ARG_USERNAME = "username";
       public static final String ARG_PASSWORD = "password";
       public static final String ARG_TIMEOUT = "timeoutInSeconds";
       
      Parameters:
      args - map of the available configuration parameters, ARG_URL, ARG_USERNAME, ARG_PASSWORD, ARG_TIMEOUT
      Throws:
      Exception - The exception thrown by the client
    • getCookies

      public List getCookies()
      Use this method to get a list of cookies associated with the request
      Returns:
      List of cookies associated with the request
    • executeGet

      public String executeGet(Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a GET call with specifying header values and allowed statuses.
      Parameters:
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Get request response object
      Throws:
      Exception - The exception thrown by the client
    • executeGet

      public String executeGet(String url, Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a GET call with specifying the url, header values and allowed statuses.
      Parameters:
      url - The url to execute the request against
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Get request response object
      Throws:
      Exception - The exception thrown by the client
    • executePost

      public String executePost(String url, Object payload, List<String> allowedStatuses) throws Exception
      Use this method to execute a POST call with specifying the url, payload, and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Post request response object
      Throws:
      Exception - The exception thrown by the client
    • executePost

      public String executePost(String url, Object payload, Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a POST call with specifying the url, payload, header values and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Post request response object
      Throws:
      Exception - The exception thrown by the client
    • executePut

      public String executePut(String url, Object payload, List<String> allowedStatuses) throws Exception
      Use this method to execute a PUT call with specifying the url, payload, and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Put request response object
      Throws:
      Exception - The exception thrown by the client
    • executePut

      public String executePut(String url, Object payload, Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a PUT call with specifying the url, payload, header values and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Put request response object
      Throws:
      Exception - The exception thrown by the client
    • executePatch

      public String executePatch(String url, Object payload, List<String> allowedStatuses) throws Exception
      Use this method to execute a PATCH call with specifying the url, payload and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Patch request response object
      Throws:
      Exception - The exception thrown by the client
    • executePatch

      public String executePatch(String url, Object payload, Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a PATCH call with specifying the url, payload, header values and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Patch request response object
      Throws:
      Exception - The exception thrown by the client
    • getResponseHeaders

      public Map<String,String> getResponseHeaders()
      Get the last executed request's response headers.
      Returns:
      Map of response headers
    • executeDelete

      public String executeDelete(String url, List<String> allowedStatuses) throws Exception
      Use this method to execute a DELETE call specifying the url and allowed statuses.
      Parameters:
      url - The url to execute the request against
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Delete request response object
      Throws:
      Exception - The exception thrown by the client
    • executeDelete

      public String executeDelete(String url, Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a DELETE call specifying the url, header values and allowed statuses.
      Parameters:
      url - The url to execute the request against
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Delete request response object
      Throws:
      Exception - The exception thrown by the client
    • executeDelete

      public String executeDelete(String url, Object payload, Map headers, List<String> allowedStatuses) throws Exception
      Use this method to execute a DELETE call specifying the url, header values and allowed statuses.
      Parameters:
      url - The url to execute the request against
      payload - The payload to send to the request endpoint
      headers - Any headers needed to authenticate or specify a content-type
      allowedStatuses - Allowed response statuses, ie: 200, 201, 400, etc...
      Returns:
      Delete request response object
      Throws:
      Exception - The exception thrown by the client