Get Assets by Organization¶
Get all the assets that a specified user can access under a specified organization.
POST https://{apigw-address}/app-portal-service/v2.0/user/asset/list
Request Parameters (Body)¶
Name |
Required or Not |
Data Type |
Description |
---|---|---|---|
userId |
true |
String |
User ID |
orgId |
true |
String |
Organization ID which the asset belongs to. How to get orgId >> |
pagination |
false |
Pagination request struct |
Random pagination. When not specified, the default pagination size is 1000 pages, starting from 0. Pagination Request Struct |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
data struct |
List of asset information |
data Struct¶
Name |
Data Type |
Description |
---|---|---|
pagination |
Pagination struct |
Pagination information |
assets |
assets struct |
List of asset informaton |
Pagination Struct¶
Name |
Data Type |
Description |
---|---|---|
pageNo |
Integer |
Request pages |
pageSize |
Integer |
Number of records in each page |
totalElements |
Long |
Total number of records |
assets Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
Asset ID |
name |
I18nString |
Internationalized name of the asset. For the structure, see Internationalized name struct |
orgId |
String |
Organization ID which the asset belongs to |
Sample¶
Request Sample¶
POST
https://alpha-apim-cn4.eniot.io/app-portal-service/v2.0/user/asset/list
requestBody:
{
"userId": "yourUserId",
"orgId": "yourOrgId",
"pagination": {
"pageNo": 0,
"pageSize": 1000,
"sorters": []
}
}
Response Parameters¶
{
"code": 200,
"message": "",
"data": {
"pagination": {
"totalElements": 2,
"pageNo": 0,
"pageSize": 1000
},
"assets": [
{
"id": "2rVQ6zfF",
"name": {
"default": "wyf_asset_01",
"en_US": "wyf_asset_01"
}
},
{
"id": "Sx0faZHR",
"name": {
"default": "12345678901234567890123456789012345678901234567890",
"en_US": "12345678901234567890123456789012345678901234567890"
}
}
]
}
}