Get Asset Structure¶
Get the upstream organization structure where the asset is located.
Prerequisites¶
The user has logged in to Application Portal and entered an OU. You can log in to Application Portal through the Log In API and select the OU through the Choose Organization API.
Request Format¶
GET https://{apigw-address}/app-portal-service/v2.2/asset/structure
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
assetId |
Query |
Required |
String |
The asset ID. How to get assetId >> |
Request Parameters (Header)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Authorization |
Required |
String |
The access token generated after the user logs in and selects the OU, represented by Bearer Token, is in the form of |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
structures |
AssetStructure Struct |
The list of the organization structure tree. |
AssetStructure Struct¶
Name |
Data Type |
Description |
---|---|---|
id |
String |
The organization structure ID. |
name |
String |
The organization structure name. |
description |
String |
The organization structure description. |
orgId |
String |
The organizational ID where the organization structure is located. |
children |
AssetStructure Struct |
The child organization structure. |
displayOrder |
Integer |
The serial number of node display order. The smaller the number, the higher the node. |
nameJson |
I18nString |
The organization structure name in multiple languages. |
descriptionJson |
I18nString |
The organization structure description in multiple languages. |
Error Codes¶
Code |
Description |
---|---|
31400 |
Asset ID is required |
31401 |
Access Token is invalid |
31404 |
The asset is not found |
31512 |
Selecting an OU is required |
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.2/asset/structure?assetId=your_asset_id
method: GET
headers: {"Authorization":"Bearer your_token"}
Return Sample¶
{
"code": 0,
"data": {
"structures": [
{
"children": [],
"description": "",
"descriptionJson": {
"default": ""
},
"displayName": "wyf",
"id": "your_node_id",
"name": "wyf",
"nameJson": {
"default": "wyf"
},
"orgId": "your_org_id",
"displayOrder": 0
},
{
"children": [],
"description": "",
"descriptionJson": {
"default": ""
},
"displayName": "wyf2",
"id": "your_node_id",
"name": "wyf2",
"nameJson": {
"default": "wyf2"
},
"orgId": "yourOrgId",
"displayOrder": 1
}
]
},
"message": "OK"
}