Connections
ConnectionsService
Bases: BaseService
Service for managing UiPath external service connections.
This service provides methods to retrieve and manage connections to external systems and services that your automation processes interact with. It supports both direct connection information retrieval and secure token management.
The service implements a flexible connector system that allows for type-safe instantiation of specific service connectors, making it easier to interact with different types of external services.
__getattr__(name)
Get a plugin by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the plugin to get |
required |
Returns:
Type | Description |
---|---|
Any
|
The plugin instance |
Raises:
Type | Description |
---|---|
PluginNotFoundError
|
If the plugin is not installed |
ImportError
|
If the plugin fails to load |
_load_connectors()
Load all available connector plugins.
Raises:
Type | Description |
---|---|
ImportError
|
If a plugin fails to load |
retrieve(key)
Retrieve connection details by its key.
This method fetches the configuration and metadata for a connection, which can be used to establish communication with an external service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The unique identifier of the connection to retrieve. |
required |
Returns:
Name | Type | Description |
---|---|---|
Connection |
Connection
|
The connection details, including configuration parameters and authentication information. |
retrieve_async(key)
async
Asynchronously retrieve connection details by its key.
This method fetches the configuration and metadata for a connection, which can be used to establish communication with an external service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The unique identifier of the connection to retrieve. |
required |
Returns:
Name | Type | Description |
---|---|---|
Connection |
Connection
|
The connection details, including configuration parameters and authentication information. |
retrieve_token(key)
Retrieve an authentication token for a connection.
This method obtains a fresh authentication token that can be used to communicate with the external service. This is particularly useful for services that use token-based authentication.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The unique identifier of the connection. |
required |
Returns:
Name | Type | Description |
---|---|---|
ConnectionToken |
ConnectionToken
|
The authentication token details, including the token value and any associated metadata. |
retrieve_token_async(key)
async
Asynchronously retrieve an authentication token for a connection.
This method obtains a fresh authentication token that can be used to communicate with the external service. This is particularly useful for services that use token-based authentication.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The unique identifier of the connection. |
required |
Returns:
Name | Type | Description |
---|---|---|
ConnectionToken |
ConnectionToken
|
The authentication token details, including the token value and any associated metadata. |
PluginNotFoundError
Bases: AttributeError
Raised when a plugin is not installed or failed to load.