Get Assets by Organization¶
Get all the assets that a specified user can access under a specified organization.
Prerequisites¶
- The associated application has been acquired by the organization.
- The associated application must have access permissions (authorized by the organization administrator) for the assets.
Request Parameters (Body)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
userId | Mandatory | String | The user ID. |
orgId | Mandatory | String | The organization ID which the asset belongs to. How to get orgId >>. |
pagination | Optional | Pagination Request Struct | Lists the paging requirements in a request. If not specified, the default pagination size is 1000 pages, starting from 0. For more details, see Pagination Request Struct. |
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 pagination and list of the assets’ information. |
Data Struct¶
Name | Data Type | Description |
---|---|---|
pagination | Pagination Struct | The pagination information. |
assets | Assets Struct | The list of the assets’ information. |
type | String | Source Type. |
typeName | I18nString | Specify the type name in its respective locale’s language. You must specify at least the default or en_US value. For more details on the structure and locales supported, see Internationalized name struct. |
Pagination Struct¶
Name | Data Type | Description |
---|---|---|
pageNo | Integer | The request pages. |
pageSize | Integer | The number of records in each page. |
totalElements | Long | The total number of records. |
Assets Struct¶
Name | Data Type | Description |
---|---|---|
id | String | The asset ID |
name | I18nString | The asset’s name in its respective locale’s language. For more details on the structure and locales supported, see Internationalized name struct |
Error Codes¶
Code | Description |
---|---|
31400 | User ID and OU ID are required |
31403 | The application has no access to user information or asset information |
31404 | The user is not found, or not in the organization |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/asset/list
method: POST
{
"userId": "yourUserId",
"orgId": "yourOrgId",
"resourceTypes": ["type1", "type2"],
"pagination": {
"pageNo": 0,
"pageSize": 1000,
}
}
Response Sample¶
{
"code": 0,
"message": "OK",
"data": {
"pagination": {
"totalElements": 1,
"pageNo": 0,
"pageSize": 1000
},
"assets": [
{
"id": "your_asset_id",
"name": {
"default": "autoTree",
"en_US": "autoTree_EN",
"zh_CN": "自动化树",
"es_ES": "menús",
"ja_JP": "自動化ツリー"
},
"type": "auth_unit",
"typeName": {
"default": "Physical Resource",
"en_US": "Physical Resource",
"zh_CN": "实体资产"
}
}
]
}
}