Get Topology Definition¶
Get the metadata of topologies and the types of devices that defined by topology rules. Supports on-site and off-site topologies.
Operation Permissions¶
Before invoking this API, ensure that the service account has been authorized the policy that includes the following service(s) and action permission(s). For how to authorize the service account, see Managing Service Accounts.
Required Policy |
Required Permission |
---|---|
Administrator |
Full Access |
Before You Start¶
The OU has been bounded with an OU template and the OU template has been assigned at least one topology rule.
Request Format¶
GET https://{apigw-address}/amc/v1.0/topology?action=getDefinition
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
The organization ID. How to get orgId>> |
topologyId |
Query |
Required |
String |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
TopologyDefinition Struct |
The information of topologies |
TopologyDefinition Struct¶
Name |
Data Type |
Description |
---|---|---|
name |
StringI18n |
The topology’s name. |
description |
StringI18n |
The description of the topology. |
topologyMetaData |
TopologyMetaData Struct |
The meta data of the topology. |
TopologyMetaData Struct¶
Name |
Data Type |
Description |
---|---|---|
deviceTypes |
Metadata Struct Array |
The information of device type. |
Metadata Struct¶
Name |
Data Type |
Description |
---|---|---|
identifier |
String |
The identifier of the device type. |
name |
StringI18n |
The name of the device type. |
type |
String |
The business object category of the device: DEVICE. |
Error Codes¶
Code |
Message |
Description |
---|---|---|
99500 |
Internal server error |
Internal server error. Contact EnOS support. |
99400 |
topologyId is missing |
The topologyId is missing. |
99400 |
topologyId is invalid |
The topologyId is invalid. Check the request parameters. |
98404 |
topologyId does not exist |
The topologyId does not exist. |
Samples¶
Request Sample¶
URL: https://{apigw-address}/amc/v1.0/topology?action=getDefinition&orgId=yourOrgId&topologyId=yourTopologyId
method: GET
Response Sample¶
{
"code":0,
"msg":"OK",
"requestId":"40f8fe15-cb52-436c-8e71-b7217023efd3",
"data":{
"name":{
"defaultValue":"Soiling Group",
"i18nValue":{
}
},
"description":{
"defaultValue":"If you are not using the Ensight Solar application for this site, you can skip the configuration of the Soiling Group topology.",
"i18nValue":{
"en_US":"If you are not using the Ensight Solar application for this site, you can skip the configuration of the Soiling Group topology.",
"zh_CN":"如果该场站不接入 Ensight Solar,可跳过灰尘组的拓扑配置"
}
},
"topologyMetaData":{
"deviceTypes":[
{
"identifier":"Inverter",
"name":{
"defaultValue":"Inverter",
"i18nValue":{
"en_US":"Inverter",
"zh_CN":"逆变器"
}
},
"type":"Device"
},
{
"identifier":"WeatherStation",
"name":{
"defaultValue":"Weather Station",
"i18nValue":{
"en_US":"Weather Station",
"zh_CN":"气象站"
}
},
"type":"Device"
}
]
}
}
}