Update User Asset Permission


Assign or remove asset permissions to/from a user.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/user/asset/assign

Request Parameters (Query)


Name

Mandatory/Optional

Data Type

Description

orgId

Mandatory

String

OU ID.

Request Parameters (Body)


Name

Mandatory/Optional

Data Type

Description

userId

Mandatory

String

User ID.

assetIds

Mandatory

List/string

Asset ID. Leave it blank to remove all asset permissions of the user.

Response Parameters


Name

Data Type

Description

data

boolean

The results of assigning or removing asset permissions, true for success and false for failure.

Error Code


Error Code

Description

31404

Service account, user, or asset does not exist.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/user/asset/assign
method: POST

requestBody:
{
    "userId": "your_user_id",
    "assetIds": [
        "your_resource_id_1",
        "your_resource_id_2"
    ]
}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": true
}