CreateAssetVariable

Updated at:

Description: Creates a new asset variable.

Path: rpa/openapi/asset-variable/CreateAssetVariable

Method: POST

Usage notes:

  • Successful creation assigns the asset variable to the enterprise super administrator and the API caller by default.

  • The creator of the asset variable becomes its owner.

  • If the format of the asset variable value does not match the asset variable type, the API returns a parameter error.

  • If you set UsageScope to all, you cannot specify the AuthorizedMemberIds parameter.

Request parameters:

Parameter

Type

Required

Example

Description

AssetVariableName

String

Yes

exampelName

The asset variable name.

AssetVariableNickName

String

Yes

exampleNickName

The asset variable nickname.

AssetVariableType

String

Yes

password

The asset variable type. This is an enumerated value. Valid values: string, password, and account.

AssetVariableValue

JSON object

Yes

{"account":"test","password":"Rpa412******346"}

The asset variable value. This value is an unencrypted JSON object. Its structure depends on the asset variable type. The server parses and validates this value.

  1. If the AssetVariableType is account, both the account and password fields are required: {"account":"test","password":"Rpa41234%"}

  2. If the AssetVariableType is string, the string field is required: {"string":"test"}

  3. If the AssetVariableType is password, the password field is required: {"password":"Rpa4123"}

UsageScope

String

No

specified

The asset variable's usage scope. Defaults to specified.

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

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

AuthorizedMemberIds

Array of strings

No

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

Specifies the list of user IDs to grant permission to use the asset variable. This parameter is optional.

  1. This parameter is valid only when UsageScope is set to specified.

  2. If this parameter is omitted, permissions default to the API caller and the enterprise super administrator. Any user IDs that you specify are authorized in addition to these defaults.

Response parameters:

For common response parameters, see Standard Responses. The following table describes the fields in the data object.

Parameter

Type

Example

Description

AssetVariableId

String

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

The ID of the asset variable.