UpdateAssetVariable

Updated at:

Description: Updates a specified asset variable.

Path: rpa/openapi/asset-variable/UpdateAssetVariable

Method: POST

Usage notes:

  • Only the owner of the asset variable can perform this operation.

  • The user identified by the AKSK must be authorized to use this asset variable.

  • The AuthorizedMemberIds parameter overwrites the existing list of authorized users.

  • As the owner, the creator of the asset variable cannot be removed. The AuthorizedMemberIds parameter only updates the list of other authorized users.

  • Do not specify AuthorizedMemberIds if the usage scope is all or is being set to all.

  • If the specified asset UUID does not exist, the server returns a "not found" error.

  • You cannot modify the variable type.

  • You must specify at least one of the following five optional parameters: AssetVariableName, AssetVariableNickName, AssetVariableValue, UsageScope, or AuthorizedMemberIds.

Request parameters:

Parameter

Type

Required

Example value

Description

AssetVariableId

String

Yes

5743b65c-****-****-****-520af9bfab4a

Specifies the ID of the asset variable to update.

AssetVariableName

String

No

exampleName2

The new name for the asset variable. No specific naming conventions apply.

AssetVariableNickName

String

No

exampleNickName2

The new nickname for the asset variable.

AssetVariableValue

Object, serialized as JSON

No

{

"account":"test",

"password":"Rpa41234%"

}

The new value for the asset variable, provided as a JSON object. This value is not encrypted. The server validates the JSON structure against the variable type. If a required field is missing, the API returns an error.

  1. account-password type: Must contain account and password fields. Example: {"account":"test","password":"Rpa41234%"}

  2. string type: Must contain a string field. Example: {"string":"test"}

  3. password type: Must contain a password field. Example: {"password":"Rpa41234%"}

UsageScope

String

No

specified

The usage scope of the asset variable. If this parameter is not specified, the current scope is retained. Valid values:

  1. all: All users within the enterprise can use the asset variable.

  2. specified: Only specified users can use the asset variable.

AuthorizedMemberIds

Array of String, serialized as simple

No

["760526e3-****-****-****-430d8e51c448", "6c3c5113-****-****-****-b7d9b23d46be"]

A list of user IDs to authorize for usage. This parameter is only valid if the usage scope is specified.

  1. This parameter is allowed only if you set UsageScope to specified, or if the current usage scope is already specified.

  2. If this parameter is omitted while the usage scope remains specified, the current user ID list is retained. When provided, this parameter overwrites the existing list of authorized users but does not affect the creator (owner), who is always authorized.

Important

You must provide this parameter when changing the usage scope from all to specified.

Return parameters:

Returns true if the update is successful, or false otherwise.