Skip to content

Assets

AssetsService

Bases: FolderContext, BaseService

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.

retrieve(name, *, folder_key=None, folder_path=None)

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 Optional[str]

The key of the folder to execute the process in. Override the default one set in the SDK config.

None
folder_path Optional[str]

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

The asset data.

Examples:

from uipath import UiPath

client = UiPath()

client.assets.retrieve(name="MyAsset")

retrieve_async(name, *, folder_key=None, folder_path=None) 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 Optional[str]

The key of the folder to execute the process in. Override the default one set in the SDK config.

None
folder_path Optional[str]

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

The asset data.

retrieve_credential(name, *, folder_key=None, folder_path=None)

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 Optional[str]

The key of the folder to execute the process in. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder to execute the process in. Override the default one set in the SDK config.

None

Returns:

Type Description
Optional[str]

Optional[str]: The decrypted credential password.

retrieve_credential_async(name, *, folder_key=None, folder_path=None) 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 Optional[str]

The key of the folder to execute the process in. Override the default one set in the SDK config.

None
folder_path Optional[str]

The path of the folder to execute the process in. Override the default one set in the SDK config.

None

Returns:

Type Description
Optional[str]

Optional[str]: The decrypted credential password.

update(robot_asset, *, folder_key=None, folder_path=None)

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.

update_async(robot_asset, *, folder_key=None, folder_path=None) async

Asynchronously 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.