Get Asset Structure¶
Get the upstream organizational structure where the asset is located.
Request Parameters (URI)¶
Name | Location (Path/Query) | Mandatory/Optional | Data Type | Description |
---|---|---|---|---|
assetId | Query | Mandatory | String | The asset ID. Supports the query of multiple asset IDs, separated by commas. How to get assetId >> |
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 organizational structure |
displayOrder | Integer | The serial number of node display order |
nameJson | I18nString | The organization structure name in Json, supporting multiple languages |
descriptionJson | I18nString | The organization structure description in Json, supporting multiple languages |
Data Struct¶
Name | Data Type | Description |
---|---|---|
structures | AssetStructure Struct | The list of the organizational structure tree |
AssetStructure Struct¶
Name | Data Type | Description |
---|---|---|
id | String | The organizational structure ID |
name | String | The organizational structure name |
description | String | The organizational structure description |
orgId | String | The organizational ID where the organizational structure is located |
children | AssetStructure Struct | The sub-organizational structure |
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=Dqp9GZsT
method: GET
requestHeader:
{
"Authorization":"yourBearerToken"
}
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"
}