---
title: IntegrationsApi
---
## PureCloud::IntegrationsApi
All URIs are relative to *https://api.mypurecloud.com*
Method | Description
------------- | ------------- | -------------
[**delete_integrations_action**](IntegrationsApi.html#delete_integrations_action) | Delete an Action
[**delete_integrations_action_draft**](IntegrationsApi.html#delete_integrations_action_draft) | Delete a Draft
[**get_integrations_action**](IntegrationsApi.html#get_integrations_action) | Retrieves a single Action matching id.
[**get_integrations_action_draft**](IntegrationsApi.html#get_integrations_action_draft) | Retrieve a Draft
[**get_integrations_action_draft_schema**](IntegrationsApi.html#get_integrations_action_draft_schema) | Retrieve schema for a Draft based on filename.
[**get_integrations_action_draft_template**](IntegrationsApi.html#get_integrations_action_draft_template) | Retrieve templates for a Draft based on filename.
[**get_integrations_action_draft_validation**](IntegrationsApi.html#get_integrations_action_draft_validation) | Validate current Draft configuration.
[**get_integrations_action_schema**](IntegrationsApi.html#get_integrations_action_schema) | Retrieve schema for an action based on filename.
[**get_integrations_action_template**](IntegrationsApi.html#get_integrations_action_template) | Retrieve text of templates for an action based on filename.
[**get_integrations_actions**](IntegrationsApi.html#get_integrations_actions) | Retrieves all actions associated with filters passed in via query param.
[**get_integrations_actions_categories**](IntegrationsApi.html#get_integrations_actions_categories) | Retrieves all categories of available Actions
[**get_integrations_actions_drafts**](IntegrationsApi.html#get_integrations_actions_drafts) | Retrieves all action drafts associated with the filters passed in via query param.
[**patch_integrations_action**](IntegrationsApi.html#patch_integrations_action) | Patch an Action
[**patch_integrations_action_draft**](IntegrationsApi.html#patch_integrations_action_draft) | Update an existing Draft
[**post_integrations_action_draft**](IntegrationsApi.html#post_integrations_action_draft) | Create a new Draft from existing Action
[**post_integrations_action_draft_publish**](IntegrationsApi.html#post_integrations_action_draft_publish) | Publish a Draft and make it the active Action configuration
[**post_integrations_action_draft_test**](IntegrationsApi.html#post_integrations_action_draft_test) | Test the execution of a draft. Responses will show execution steps broken out with intermediate results to help in debugging.
[**post_integrations_action_execute**](IntegrationsApi.html#post_integrations_action_execute) | Execute Action and return response from 3rd party. Responses will follow the schemas defined on the Action for success and error.
[**post_integrations_action_test**](IntegrationsApi.html#post_integrations_action_test) | Test the execution of an action. Responses will show execution steps broken out with intermediate results to help in debugging.
[**post_integrations_actions**](IntegrationsApi.html#post_integrations_actions) | Create a new Action
[**post_integrations_actions_drafts**](IntegrationsApi.html#post_integrations_actions_drafts) | Create a new Draft
{: class="table table-striped"}
## - delete_integrations_action(action_id)
Delete an Action
Wraps DELETE /api/v2/integrations/actions/{actionId}
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
begin
#Delete an Action
api_instance.delete_integrations_action(action_id)
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->delete_integrations_action: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## - delete_integrations_action_draft(action_id)
Delete a Draft
Wraps DELETE /api/v2/integrations/actions/{actionId}/draft
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
begin
#Delete a Draft
api_instance.delete_integrations_action_draft(action_id)
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->delete_integrations_action_draft: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Action**](Action.html) get_integrations_action(action_id, opts)
Retrieves a single Action matching id.
Wraps GET /api/v2/integrations/actions/{actionId}
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
opts = {
expand: "expand_example", # String | Indicates fields of the response which should be expanded.
include_config: false # BOOLEAN | Show config when available
}
begin
#Retrieves a single Action matching id.
result = api_instance.get_integrations_action(action_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
**expand** | **String**| Indicates fields of the response which should be expanded. | [optional] **Values**: contract |
**include_config** | **BOOLEAN**| Show config when available | [optional] [default to false] |
{: class="table table-striped"}
### Return type
[**Action**](Action.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Action**](Action.html) get_integrations_action_draft(action_id, opts)
Retrieve a Draft
Wraps GET /api/v2/integrations/actions/{actionId}/draft
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
opts = {
expand: "expand_example", # String | Indicates fields of the response which should be expanded.
include_config: false # BOOLEAN | Show config when available
}
begin
#Retrieve a Draft
result = api_instance.get_integrations_action_draft(action_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action_draft: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
**expand** | **String**| Indicates fields of the response which should be expanded. | [optional] **Values**: contract |
**include_config** | **BOOLEAN**| Show config when available | [optional] [default to false] |
{: class="table table-striped"}
### Return type
[**Action**](Action.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**JsonSchemaDocument**](JsonSchemaDocument.html) get_integrations_action_draft_schema(action_id, file_name)
Retrieve schema for a Draft based on filename.
Wraps GET /api/v2/integrations/actions/{actionId}/draft/schemas/{fileName}
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
file_name = "file_name_example" # String | Name of schema file to be retrieved for this draft.
begin
#Retrieve schema for a Draft based on filename.
result = api_instance.get_integrations_action_draft_schema(action_id, file_name)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action_draft_schema: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
**file_name** | **String**| Name of schema file to be retrieved for this draft. | |
{: class="table table-striped"}
### Return type
[**JsonSchemaDocument**](JsonSchemaDocument.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -String** get_integrations_action_draft_template(action_id, file_name)
Retrieve templates for a Draft based on filename.
Wraps GET /api/v2/integrations/actions/{actionId}/draft/templates/{fileName}
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
file_name = "file_name_example" # String | Name of template file to be retrieved for this action draft.
begin
#Retrieve templates for a Draft based on filename.
result = api_instance.get_integrations_action_draft_template(action_id, file_name)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action_draft_template: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
**file_name** | **String**| Name of template file to be retrieved for this action draft. | |
{: class="table table-striped"}
### Return type
**String**
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: text/plain
## -[**DraftValidationResult**](DraftValidationResult.html) get_integrations_action_draft_validation(action_id)
Validate current Draft configuration.
Wraps GET /api/v2/integrations/actions/{actionId}/draft/validation
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
begin
#Validate current Draft configuration.
result = api_instance.get_integrations_action_draft_validation(action_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action_draft_validation: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
{: class="table table-striped"}
### Return type
[**DraftValidationResult**](DraftValidationResult.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**JsonSchemaDocument**](JsonSchemaDocument.html) get_integrations_action_schema(action_id, file_name)
Retrieve schema for an action based on filename.
Wraps GET /api/v2/integrations/actions/{actionId}/schemas/{fileName}
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
file_name = "file_name_example" # String | Name of schema file to be retrieved for this action.
begin
#Retrieve schema for an action based on filename.
result = api_instance.get_integrations_action_schema(action_id, file_name)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action_schema: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
**file_name** | **String**| Name of schema file to be retrieved for this action. | |
{: class="table table-striped"}
### Return type
[**JsonSchemaDocument**](JsonSchemaDocument.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -String** get_integrations_action_template(action_id, file_name)
Retrieve text of templates for an action based on filename.
Wraps GET /api/v2/integrations/actions/{actionId}/templates/{fileName}
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
action_id = "action_id_example" # String | actionId
file_name = "file_name_example" # String | Name of template file to be retrieved for this action.
begin
#Retrieve text of templates for an action based on filename.
result = api_instance.get_integrations_action_template(action_id, file_name)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling IntegrationsApi->get_integrations_action_template: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**action_id** | **String**| actionId | |
**file_name** | **String**| Name of template file to be retrieved for this action. | |
{: class="table table-striped"}
### Return type
**String**
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: text/plain
## -[**ActionEntityListing**](ActionEntityListing.html) get_integrations_actions(opts)
Retrieves all actions associated with filters passed in via query param.
Wraps GET /api/v2/integrations/actions
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::IntegrationsApi.new
opts = {
category: "category_example", # String | Filter by category name
secure: "secure_example", # String | Filter to only include secure actions. True will only include actions marked secured. False will include only unsecure actions. Do not use filter if you want all Actions.
include_auth_actions: "include_auth_actions_example", # String | Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions.
page_size: 25, # Integer | The total page size requested
page_number: 1, # Integer | The page number requested
sort_by: "sort_by_example", # String | variable name requested to sort by
expand: nil, # Array