Assets
AssetsService ¶
Service for managing UiPath assets.
Assets are key-value pairs that can be used to store configuration data, credentials, and other settings used by automation processes.
list ¶
List assets using OData API with offset-based pagination.
Returns a single page of results with pagination metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder_path
|
str | None
|
Folder path to filter assets. |
None
|
folder_key
|
str | None
|
Folder key (mutually exclusive with folder_path). |
None
|
filter
|
str | None
|
OData $filter expression (e.g., "ValueType eq 'Text'"). |
None
|
orderby
|
str | None
|
OData $orderby expression (e.g., "Name asc"). |
None
|
skip
|
int
|
Number of items to skip (default 0, max 10000). |
0
|
top
|
int
|
Maximum items per page (default 100, max 1000). |
100
|
Returns:
| Type | Description |
|---|---|
PagedResult[Asset]
|
PagedResult[Asset]: Page of assets with pagination metadata. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If skip or top parameters are invalid. |
Examples:
from uipath.platform import UiPath
client = UiPath()
# List all assets in the default folder
result = client.assets.list(top=100)
for asset in result.items:
print(asset.name, asset.value_type)
# List with filter
result = client.assets.list(filter="ValueType eq 'Text'")
# Paginate through all assets
skip = 0
while True:
result = client.assets.list(skip=skip, top=100)
for asset in result.items:
print(asset.name)
if not result.has_more:
break
skip += 100
list_async
async
¶
Asynchronously list assets using OData API with offset-based pagination.
Returns a single page of results with pagination metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder_path
|
str | None
|
Folder path to filter assets. |
None
|
folder_key
|
str | None
|
Folder key (mutually exclusive with folder_path). |
None
|
filter
|
str | None
|
OData $filter expression (e.g., "ValueType eq 'Text'"). |
None
|
orderby
|
str | None
|
OData $orderby expression (e.g., "Name asc"). |
None
|
skip
|
int
|
Number of items to skip (default 0, max 10000). |
0
|
top
|
int
|
Maximum items per page (default 100, max 1000). |
100
|
Returns:
| Type | Description |
|---|---|
PagedResult[Asset]
|
PagedResult[Asset]: Page of assets with pagination metadata. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If skip or top parameters are invalid. |
retrieve ¶
Retrieve an asset by its name.
Related Activity: Get Asset
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the asset. |
required |
folder_key
|
str | None
|
The key of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
folder_path
|
str | None
|
The path of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
UserAsset |
UserAsset | Asset
|
The asset data. |
Examples:
retrieve_async
async
¶
Asynchronously retrieve an asset by its name.
Related Activity: Get Asset
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the asset. |
required |
folder_key
|
str | None
|
The key of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
folder_path
|
str | None
|
The path of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
UserAsset |
UserAsset | Asset
|
The asset data. |
retrieve_credential ¶
Gets a specified Orchestrator credential.
The robot id is retrieved from the execution context (UIPATH_ROBOT_KEY environment variable)
Related Activity: Get Credential
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the credential asset. |
required |
folder_key
|
str | None
|
The key of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
folder_path
|
str | None
|
The path of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
Returns:
| Type | Description |
|---|---|
str | None
|
Optional[str]: The decrypted credential password. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the method is called for a user asset. |
retrieve_credential_async
async
¶
Asynchronously gets a specified Orchestrator credential.
The robot id is retrieved from the execution context (UIPATH_ROBOT_KEY environment variable)
Related Activity: Get Credential
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the credential asset. |
required |
folder_key
|
str | None
|
The key of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
folder_path
|
str | None
|
The path of the folder to execute the process in. Override the default one set in the SDK config. |
None
|
Returns:
| Type | Description |
|---|---|
str | None
|
Optional[str]: The decrypted credential password. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the method is called for a user asset. |
update ¶
Update an asset's value.
Related Activity: Set Asset
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot_asset
|
UserAsset
|
The asset object containing the updated values. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Response |
Response
|
The HTTP response confirming the update. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the method is called for a user asset. |