Search Topology Path


Get the node path of topologies from root to end and return the information of all nodes. Supports the 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

Device Management

Read

Asset Tree Administrator

Read

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


POST https://{apigw-address}/amc/v1.0/topology?action=searchTopologyPath

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

The prganization ID which the topology belongs to. How to get orgId>>

topologyId

Query

Required

String

The topology ID.

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

pagination

Optional

Pagination request struct

Lists the paging requirements in a request. The max records per page is 200. The default records per page is 100. Supports only pageNo and pageSize. The earlier the device was created, the higher the results displayed.

Response Parameters


Name

Data Type

Description

data

TopologyPath Struct

The node path of the topology from root to end and the information of the nodes.

pagination

EnosPageDataV2 struct

The number of the nodes.

TopologyPath Struct


Name

Data Type

Description

assetPaths

List<List<String>>

The node path of the topology from root to end, and the asset IDs of each node.

assets

Map (Key is of String type, Value is the asset struct)

The information of the assets that mounted in the topology. Key is the asset ID, Value is the information of the asset.

EnosPageDataV2 Struct


Name

Data Type

Description

pageNo

Integer

The number of pages in a request.

pageSize

Integer

The number of records in a page.

totalSize

Integer

The number of all records.

Asset Struct

Name

Data Type

Description

assetId

String

The asset ID that mounted in the node.

name

StringI18n

The name of the node.(also the name of the mounted asset).

modelId

String

The model ID of the object.

timezone

String

The timezone of the object.

description

String

The description of the object.

attributes

Map (Key is of String, Value is the object)

The attributes of the object.

Key is the attribute ID, Value is the value of the attribute.

tags

Map (Key and Value are both of String)

The tags of the object.

Key is the key of the tag, Value is the value of the tag.

typeInfo

Metadata Struct

The type of the object.

Metadata Struct


Name

Data Type

Description

identifier

String

The identifier of site type, device type, or group type.

name

StringI18n

The name of site type, device type, or group type.

type

String

The object category: NODE, DEVICE, SITE.

Error Codes


Code

Message

Description

99500

Internal server error

Internal server error. Contact EnOS support.

99400

Invalid pagination parameters

Pagination parameters are invalid. Please check the request parameters.

99400

pageSize value cannot exceed 200

The value of pageSize parameter in pagination can not exceed 200.

Samples

Request Sample

URL: https://{apigw-address}/amc/v1.0/topology?action=searchTopologyPath&orgId=yourOrgId&topologyId=yourTopologyId

method: POST

requestBody:
{
    "pagination":{
        "pageNo":1,
        "pageSize":1
    }
}

Response Sample

{
    "code":0,
    "msg":"OK",
    "requestId":"f1b464f9-d014-4b1a-95a8-a9747c968570",
    "data":{
        "assetPaths":[
            [
                "HnfxM8Rc",
                "GUPUw1bM"
            ],
            [
                "HnfxM8Rc",
                "0Wyf0SwT"
            ]
        ],
        "assets":{
            "0Wyf0SwT":{
                "assetId":"0Wyf0SwT",
                "name":{
                    "defaultValue":"1",
                    "i18nValue":{

                    }
                },
                "modelId":"EnOS_Solar_OMT_Generic",
                "timezone":"+08:00",
                "description":null,
                "attributes":{
                    "connectMode":"R",
                    "joinDate":"2021-03-09",
                    "scale":1,
                    "slope":1
                },
                "tags":{
                    "amc_assetGroup_HnfxM8Rc":"HnfxM8Rc",
                    "AMC_MOUNTED_hxaSSfM5":"hxaSSfM5",
                    "amc_modelNo":"Others6",
                    "amc_source":"amc",
                    "amc_manufacturer":"ID099",
                    "amc_deviceType":"OtherMeter",
                    "amc_classType":"Device",
                    "AMC_MOUNTED_LyQOvJa3":"LyQOvJa3"
                },
                "typeInfo":{
                    "identifier":"OtherMeter",
                    "name":{
                        "defaultValue":"Other Meter",
                        "i18nValue":{
                            "en_US":"Other Meter",
                            "zh_CN":"其他表"
                        }
                    },
                    "type":"Device"
                }
            },
            "GUPUw1bM":{
                "assetId":"GUPUw1bM",
                "name":{
                    "defaultValue":"1",
                    "i18nValue":{

                    }
                },
                "modelId":"EnOS_Solar_WST_Generic",
                "timezone":"+08:00",
                "description":"",
                "attributes":{
                    "calcMode":"A"
                },
                "tags":{
                    "amc_assetGroup_HnfxM8Rc":"HnfxM8Rc",
                    "AMC_MOUNTED_hxaSSfM5":"hxaSSfM5",
                    "amc_modelNo":"Others7",
                    "amc_source":"amc",
                    "amc_manufacturer":"ID099",
                    "amc_deviceType":"WeatherStation",
                    "amc_classType":"Device",
                    "AMC_MOUNTED_LyQOvJa3":"LyQOvJa3"
                },
                "typeInfo":{
                    "identifier":"WeatherStation",
                    "name":{
                        "defaultValue":"Weather Station",
                        "i18nValue":{
                            "en_US":"Weather Station",
                            "zh_CN":"气象站"
                        }
                    },
                    "type":"Device"
                }
            },
            "HnfxM8Rc":{
                "assetId":"HnfxM8Rc",
                "name":{
                    "defaultValue":"123",
                    "i18nValue":{

                    }
                },
                "modelId":"EnOS_Solar_Site",
                "timezone":"+08:00",
                "description":null,
                "attributes":{
                    "altitude":123,
                    "latitude":123,
                    "combinerBoxAmount":1,
                    "capacity":123,
                    "omtAmount":1,
                    "bxtfAmount":1,
                    "emtAmount":1,
                    "wstAmount":1,
                    "acCbxAmount":2,
                    "equipmentAmount":1,
                    "gmtAmount":1,
                    "strInvAmount":0,
                    "longitude":123
                },
                "tags":{
                    "amc_source":"amc",
                    "amc_deviceType":"SolarSite",
                    "amc_classType":"Site"
                },
                "typeInfo":{
                    "identifier":"SolarSite",
                    "name":{
                        "defaultValue":"Solar Site",
                        "i18nValue":{
                            "en_US":"Solar Site",
                            "zh_CN":"光伏场站"
                        }
                    },
                    "type":"Site"
                }
            }
        }
    },
    "pagination":{
        "sortedBy":null,
        "pageNo":1,
        "pageSize":2,
        "totalSize":3
    }
}