Skip to main content

External Synchronization API Reference

info

This reference is for developers and integration engineers implementing an external synchronization endpoint. It defines pagination, topology models, node and edge constraints, and interface-to-service drill-down bindings. For the setup workflow, complete Synchronize External Business Traces first.

Prerequisites

  • Provide an HTTP API that ONE can access from its deployment environment.
  • Configure the external synchronization URL in ONE. If authentication is required, configure network access and authentication as agreed for the deployment.
  • Assign a stable unique ID to every topology and node. The same object must return the same ID in every synchronization batch.
  • To support drill-down from an interface topology to a service subgraph, prepare a matching interface topology, service topology, and relationBindings data.

API Request

Method

POST /api/topology/list HTTP/1.1
Content-Type: application/json

/api/topology/list is the path used in this protocol example. Use the URL configured for the deployment.

Request Body

{
"pageNo": 1,
"pageSize": 1000,
"uniqueTopologys": ["APPRegist-interface", "APPRegist-service"],
"topologyName": "APP"
}
FieldTypeRequiredDescription
pageNoIntegerNoPage number, starting at 1. The default is 1.
pageSizeIntegerNoNumber of topologies per page. Support a value of 1000; preview and apply operations commonly fetch 1000 records per page.
uniqueTopologysString[]NoExact-match filter for external topology IDs. An empty array, null, or an omitted field means no ID filtering.
topologyNameStringNoFuzzy-match filter for the topology name.

API Response

Response Wrapper

{
"code": "200",
"msg": "success",
"data": {
"totalRecord": 40000,
"pageNo": 1,
"pageSize": 1000,
"results": []
}
}
FieldTypeRequiredDescription
codeStringYesResponse code. "200" indicates success.
msgStringYesResponse message. A successful response can return "success".
dataObjectYesPagination data.
data.totalRecordlongYesTotal number of filtered topology slots. Interface and service topologies each count as one record.
data.pageNointYesCurrent page number. It must match the requested page.
data.pageSizeintYesCurrent page size.
data.resultsTopologyItem[]YesTopologies on the current page. Return [] when the page has no data.

TopologyItem

Each element in data.results represents one independently synchronized topology.

FieldTypeRequiredDescription
uniqueTopologyStringYesGlobally unique and stable external topology ID, such as APPRegist-interface.
topologyNameStringYesDisplay name shown in ONE.
updateTimeStringYesSource-side modification time. If the source cannot provide a reliable value, always return an empty string "" so ONE fetches and compares the source data on every synchronization.
nodesNodeItem[]YesNodes in the topology. Return [] when empty.
edgesEdgeItem[]YesEdges in the topology. Return [] when empty. Every edge must include all four reference fields.
relationBindingsRelationBindingItem[]YesInterface-to-service drill-down relationships. Return [] when there is no binding. Do not return null or omit the field.

NodeItem

FieldTypeRequiredDescription
uniqueNodeStringYesExternal identifier unique within the same nodeType. Construct it according to the CMDB instance uniqueness rules below. ONE uses it to look up the instance and obtain its instance ID. It may contain a pipe character (|).
nodeNameStringYesNode display name.
nodeTypeStringYesONE modelKey, such as interface or service. It must not contain a pipe character (|).

A node is uniquely identified by the combination of nodeType and uniqueNode. Nodes of different types can therefore use the same uniqueNode.

Mapping uniqueNode to a CMDB Instance

ONE uses nodeType to identify the corresponding CMDB entity model, then queries an instance by matching uniqueNode against that model's instance uniqueness rule. After a match, ONE obtains and associates the CMDB instance ID.

Entity modelDefault uniqueNode construction ruleDefault unique identifier
Service (service)${detectedName}Service detected name.
Interface (interface)${detectedName}_${interfaceType}_${service.detectedName}Interface detected name + interface type + parent service ID.
warning

The table lists the default instance uniqueness rules for the service and interface models. Do not use an arbitrary business ID unrelated to the CMDB instance as uniqueNode. If a CMDB model's uniqueness rule has been customized in ONE, construct the value according to the actual configuration. Field values, letter case, and underscore separators must match exactly; otherwise, ONE cannot associate the instance or obtain its instance ID.

EdgeItem

FieldTypeRequiredDescription
fromNodeTypeStringYesSource node type. It must match the source node's nodeType.
fromUniqueNodeStringYesSource node ID. The referenced node must exist in this topology's nodes.
toNodeTypeStringYesTarget node type. It must match the target node's nodeType.
toUniqueNodeStringYesTarget node ID. The referenced node must exist in this topology's nodes.
warning

Every edge must provide fromNodeType, fromUniqueNode, toNodeType, and toUniqueNode. The legacy two-field format that contains only the source and target IDs is discarded and produces an incomplete topology.

RelationBindingItem

relationBindings describes which service nodes and edges are displayed when a user drills down from an interface node.

FieldTypeRequiredDescription
sourceUniqueTopologyStringYesID of the interface topology containing the drill-down entry node.
sourceNodeTypeStringYesEntry node type. Use interface for an interface topology. The value must not contain a pipe character (|).
sourceUniqueNodeStringYesuniqueNode of the entry node. It must match a node in the referenced interface topology.
associatedNodesNodeRefItem[]YesReferences to nodes in the current service topology. Return [] when empty.
associatedEdgesEdgeItem[]YesReferences to edges in the current service topology. Return [] when empty.

Each associatedNodes element uses the following structure:

FieldTypeRequiredDescription
nodeTypeStringYesAssociated node type, such as service.
uniqueNodeStringYesID of the associated node in the service topology.
warning

associatedNodes must be an object array, for example [ {"nodeType":"service","uniqueNode":"node-A"} ]. Do not use a string array such as ["node-A"]; it can cause deserialization to fail or produce an empty binding.

Complete JSON Example

The following response returns matching interface and service topologies for the same business function. The interface node W12001214 is bound to a service subgraph, allowing users to drill down to the associated service nodes and edge.

{
"code": "200",
"msg": "success",
"data": {
"totalRecord": 40000,
"pageNo": 1,
"pageSize": 1000,
"results": [
{
"uniqueTopology": "APPRegist-interface",
"topologyName": "Mobile Number Registration - Function Topology",
"updateTime": "",
"nodes": [
{
"uniqueNode": "APPRegist",
"nodeName": "Mobile Number Registration",
"nodeType": "interface"
},
{
"uniqueNode": "W12001214",
"nodeName": "Mobile Number Validation and Activation",
"nodeType": "interface"
}
],
"edges": [
{
"fromNodeType": "interface",
"fromUniqueNode": "APPRegist",
"toNodeType": "interface",
"toUniqueNode": "W12001214"
}
],
"relationBindings": []
},
{
"uniqueTopology": "APPRegist-service",
"topologyName": "Mobile Number Registration - Component Topology",
"updateTime": "",
"nodes": [
{
"uniqueNode": "node11723473851691",
"nodeName": "node11723473851691",
"nodeType": "service"
},
{
"uniqueNode": "node01636960691574",
"nodeName": "node01636960691574",
"nodeType": "service"
}
],
"edges": [
{
"fromNodeType": "service",
"fromUniqueNode": "node11723473851691",
"toNodeType": "service",
"toUniqueNode": "node01636960691574"
}
],
"relationBindings": [
{
"sourceUniqueTopology": "APPRegist-interface",
"sourceNodeType": "interface",
"sourceUniqueNode": "W12001214",
"associatedNodes": [
{
"nodeType": "service",
"uniqueNode": "node11723473851691"
},
{
"nodeType": "service",
"uniqueNode": "node01636960691574"
}
],
"associatedEdges": [
{
"fromNodeType": "service",
"fromUniqueNode": "node11723473851691",
"toNodeType": "service",
"toUniqueNode": "node01636960691574"
}
]
}
]
}
]
}
}

Follow these pairing rules:

  • An interface topology always returns relationBindings: [].
  • A service topology uses relationBindings to describe drill-down relationships from interface nodes to service subgraphs.
  • One service topology can contain multiple bindings for different interface nodes.
  • associatedNodes and associatedEdges may reference only data already present in the current service topology's nodes and edges.
  • Return nodeType and uniqueNode as separate fields. Do not prepend internal composite strings such as service| or interface| to uniqueNode.

Common Data Patterns

PatternHow to represent it
Parallel root servicesReturn the service nodes in nodes; set both the topology edges and binding associatedEdges to [] when no ordering relationship exists.
Pipe character in uniqueNodeValues such as `svc
Same ID across node typesservice/pay and interface/pay are distinct nodes because node identity includes both nodeType and uniqueNode.
Multiple interface entry nodesAdd one relationBindings element for each interface node and reference the service subgraph associated with that entry node.

Validation Rules

ONE validates relationBindings before applying synchronized data.

IDRuleResult when invalid
C1Every NodeRef in associatedNodes must exist in the current service topology's nodes.ONE discards the invalid reference and records a warning. If apply validation fails, the topology is added to failedIds.
C2Every edge in associatedEdges must exist in the current service topology's edges, with all four fields matching.ONE discards the invalid edge and records a warning. If apply validation fails, the topology is added to failedIds.
C3sourceNodeType must not contain a pipe character (|).ONE discards the entire binding and records a warning.
C4sourceUniqueNode must match a node in the interface topology identified by sourceUniqueTopology.The drill-down entry is misplaced and cannot display the intended service subgraph.

Unsupported or Legacy Formats

ScenarioInvalid dataResult
Edge without node typesOnly fromUniqueNode and toUniqueNode are returned.The edge is discarded and the topology may be incomplete.
String array in associatedNodes"associatedNodes": ["node-A"]Deserialization can fail or the binding cannot be created.
Missing sourceNodeTypeThe field is omitted from a binding.The entire binding is discarded.
Duplicate node or edge referencesThe same key appears more than once.ONE deduplicates the data and records a warning.
Edge endpoint missing from nodesAn edge references an undeclared node.The edge is discarded and the topology may be incomplete.

Integration Checklist

Before a full synchronization, test with a small data set and verify the following:

  1. Confirm that a successful response returns the string "200" in code and that pagination metadata matches the request.
  2. Confirm that totalRecord is the total filtered topology count, not the current page size or business function count.
  3. Confirm that all empty list fields return [], especially nodes, edges, and relationBindings.
  4. Confirm that every uniqueNode follows the corresponding CMDB model's instance uniqueness rule and resolves to an instance ID.
  5. Confirm that every edge contains all four fields and references nodes declared in the current topology.
  6. Confirm that matching interface and service topologies use different, stable uniqueTopology values.
  7. Confirm that every binding references only nodes and edges in the current service topology.
  8. Confirm that page ordering and data remain stable during one synchronization task to prevent duplicate or missing records.
tip

During initial integration, use uniqueTopologys to return only one matching interface/service pair. After verifying nodes, edges, and drill-down behavior, expand the synchronization scope.

warning
  • External data synchronization can take a long time. Wait for the current task to finish before starting another one.
  • Do not leave the page or refresh the browser while synchronization is running.
  • Each account can run only one synchronization task at a time.
  • If a reliable updateTime is unavailable, always return an empty string. Do not return the current request time because it changes on every call.