Get Users Asset List¶
Get the asset permissions of users without logging in to Application Portal.
Operation Permissions¶
In Application Portal, the application must be granted the “Obtain all user permissions in the OU” permission.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.2/user/users/assetList
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
organizationId |
Mandatory |
String |
The organization ID. How to get organizationId>> |
userIds |
Mandatory |
List |
The list of user IDs |
resourceTypes |
Optional |
Array |
Filtering resources by the specified resource types, supporting up to 1000 types. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The information about users and their corresponding assets |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
usersUserAssets |
UsersUserAssetsDTO Struct |
The information about users and their corresponding assets |
userAssets |
UserAssetInfoDTO Struct |
The asset information |
type |
String |
Source Type. |
typeName |
I18nString |
Specify the type name in its respective locale’s language. You must specify at least the |
UsersUserAssetsDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
userId |
String |
The user ID |
userAssetIds |
List |
The list of Asset IDs |
UserAssetInfoDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The asset ID |
name |
I18nString |
The asset name |
Error Codes¶
Code |
Description |
---|---|
31400 |
Errors such as incorrect parameters, empty parameters, character limits exceeded, and so on |
31403 |
The application has not been granted the “Obtain all user permissions in the OU” permission |
31404 |
Organization not found |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/users/assetList
method: POST
{"organizationId":"yourOrgId",
"userIds": ["user1","user2","user3"],
"resourceTypes": ["type1", "type2"]}
Return Sample¶
{
"code": 0,
"message": "OK",
"data": {
"usersUserAssets": [
{
"userId": "your_user_id",
"userAssetIds": [
"your_asset_id"
]
}
],
"userAssets": [
{
"id": "Vc8RXLiG",
"name": {
"default": "autoTree",
"en_US": "autoTree_EN",
"zh_CN": "自动化树",
},
"type": "auth_unit",
"typeName": {
"default": "Physical Resource",
"en_US": "Physical Resource",
"zh_CN": "实体资产"
}
}
]
}
}