Get Assets by Application¶
Get all the assets that the current user can access under a specified application.
Operation Permissions¶
User login to Application Portal is required.
Selecting an OU is required.
Prerequisites¶
The associated application has been purchased by the organization.
The associated application must have access permissions (authorized by the organization administrator) for the assets.
Request Format¶
GET https://{apigw-address}/app-portal-service/v2.2/user/app/asset/tree
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
accessKey |
Query |
Mandatory |
String |
The service account of the application. The application authenticates with |
Request Parameters (Header)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Mandatory |
String |
The access token (or bearer token). The format of the parameter’s string is Bearer {your token}. Refer to Log In or Refresh Access Token to learn how to get the access token. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Data Struct |
The list of the assets |
tags |
List<StructureTagDTO> |
The tag of organization structures |
displayorder |
Integer |
The serial number of display order |
nameJson |
I18nString |
The organization structure name in Json, supporting multiple languages |
Data Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The node ID |
name |
String |
The node name |
tag |
String |
The tag of a node. “Asset” will mean the node is an asset with a parent node that is also an organizational structure node (because an asset can only be mounted on the leaf node of the organizational structure), and “null” will mean the node is an organizational structure node |
parentId |
String |
The parent node ID |
children |
Data Struct |
The child nodes |
StructureTagDTO Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
Integer |
The serial number of organization structure tags |
key |
String |
The key of organization structure tags |
value |
String |
The value of organization structure tags |
Error Codes¶
Code |
Description |
---|---|
31400 |
AccessKey is required |
31401 |
Access Token is invalid |
31403 |
No access to the application |
31404 |
The application does not exist, or the organization does not purchase the application |
31512 |
Selecting an OU is required |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/user/app/asset/tree?accessKey=yourAccessKey
method: GET
requestHeader:
{
"Authorization":"yourBearerToken"
}
Return Sample¶
{
"id": "sg1566xxxxxxxxxx",
"name": "Solar_shangHai",
"tag": null,
"displayOrder": 0,
"parentId": "",
"nameJson": {
"default": "Solar_shangHai"
},
"tags": [
{
"id": 75,
"key": "aaa",
"value": "bbb"
}
]
"children": [
{
"id": "sg15663524029331",
"name": "JiangYin",
"tag": null,
"displayOrder": 0,
"parentId": "sg1566xxxxxxxxxx",
"nameJson": {
"default": "JiangYin"
},
"tags": null,
"children": [
{
"id": "zULM004t",
"name": "Solar_Assert",
"tag": "asset",
"displayOrder": 0,
"parentId": "",
"nameJson": {
"default": "Solar_Assert"
},
"tags": null,
"children": null
},
{
"id": "osvxGtJC",
"name": "shangHai",
"tag": "asset",
"displayOrder": 1,
"parentId": "",
"nameJson": {
"default": "shangHai"
},
"tags": null,
"children": null
}
]
}
]
}