sailpoint.connector.webservices

## Class WebServicesClient

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

    public class WebServicesClient
    extends java.lang.Object

Definition of a Web Services Client interface available to Rule implementors.

### Field Summary

Fields
`protected HttpClient` `_client`

### Constructor Summary

Constructors
Constructor and Description
`WebServicesClient()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `configure(java.util.Map args)` Configure connection parameters.
`java.lang.String` `executeDelete(java.lang.String url, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a DELETE call specifying the url and allowed statuses.
`java.lang.String` `executeDelete(java.lang.String url, java.util.Map headers, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a DELETE call specifying the url, header values and allowed statuses.
`java.lang.String` `executeGet(java.util.Map headers, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a GET call with specifying header values and allowed statuses.
`java.lang.String` `executeGet(java.lang.String url, java.util.Map headers, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a GET call with specifying the url, header values and allowed statuses.
`java.lang.String` `executePatch(java.lang.String url, java.lang.Object payload, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a PATCH call with specifying the url, payload and allowed statuses.
`java.lang.String` `executePatch(java.lang.String url, java.lang.Object payload, java.util.Map headers, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a PATCH call with specifying the url, payload, header values and allowed statuses.
`java.lang.String` `executePost(java.lang.String url, java.lang.Object payload, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a POST call with specifying the url, payload, and allowed statuses.
`java.lang.String` `executePost(java.lang.String url, java.lang.Object payload, java.util.Map headers, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a POST call with specifying the url, payload, header values and allowed statuses.
`java.lang.String` `executePut(java.lang.String url, java.lang.Object payload, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a PUT call with specifying the url, payload, and allowed statuses.
`java.lang.String` `executePut(java.lang.String url, java.lang.Object payload, java.util.Map headers, java.util.List<java.lang.String> allowedStatuses)` Use this method to execute a PUT call with specifying the url, payload, header values and allowed statuses.
`java.util.List` `getCookies()` Use this method to get a list of cookies associated with the request
`java.util.Map<java.lang.String,java.lang.String>` `getResponseHeaders()` Get the last executed request's response headers.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _client

    protected HttpClient _client

### Constructor Detail

#### WebServicesClient

    public WebServicesClient()

### Method Detail

#### configure

    public void configure(java.util.Map args)
                   throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### getCookies

    public java.util.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 java.lang.String executeGet(java.util.Map headers,
                                       java.util.List<java.lang.String> allowedStatuses)
                                throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executeGet

    public java.lang.String executeGet(java.lang.String url,
                                       java.util.Map headers,
                                       java.util.List<java.lang.String> allowedStatuses)
                                throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executePost

    public java.lang.String executePost(java.lang.String url,
                                        java.lang.Object payload,
                                        java.util.List<java.lang.String> allowedStatuses)
                                 throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executePost

    public java.lang.String executePost(java.lang.String url,
                                        java.lang.Object payload,
                                        java.util.Map headers,
                                        java.util.List<java.lang.String> allowedStatuses)
                                 throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executePut

    public java.lang.String executePut(java.lang.String url,
                                       java.lang.Object payload,
                                       java.util.List<java.lang.String> allowedStatuses)
                                throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executePut

    public java.lang.String executePut(java.lang.String url,
                                       java.lang.Object payload,
                                       java.util.Map headers,
                                       java.util.List<java.lang.String> allowedStatuses)
                                throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executePatch

    public java.lang.String executePatch(java.lang.String url,
                                         java.lang.Object payload,
                                         java.util.List<java.lang.String> allowedStatuses)
                                  throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executePatch

    public java.lang.String executePatch(java.lang.String url,
                                         java.lang.Object payload,
                                         java.util.Map headers,
                                         java.util.List<java.lang.String> allowedStatuses)
                                  throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### getResponseHeaders

    public java.util.Map<java.lang.String,java.lang.String> getResponseHeaders()

Get the last executed request's response headers.

Returns:
  Map of response headers

#### executeDelete

    public java.lang.String executeDelete(java.lang.String url,
                                          java.util.List<java.lang.String> allowedStatuses)
                                   throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client

#### executeDelete

    public java.lang.String executeDelete(java.lang.String url,
                                          java.util.Map headers,
                                          java.util.List<java.lang.String> allowedStatuses)
                                   throws java.lang.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:
  `java.lang.Exception` - The exception thrown by the client