Get Topology Graph
cnc_get_topologyRetrieve a paginated, read-only logical topology graph with nodes and links to inspect node-to-node adjacency, such as finding what a device connects to.
Instructions
Get the topology graph: one page of nodes plus one page of links (edges).
Read-only. Crosswork returns the whole graph (up to maxLogicalNodes,
5000 on the lab instance) in one response with no server-side paging,
so this tool re-downloads the graph on every call and pages BOTH lists
client-side: page/page_size window the links, node_page/
node_page_size window the nodes. Each link carries both endpoints
resolved (node UUID, node name, interface), so a links page is
self-contained — you do not need the nodes page to read adjacency.
Use it for node-to-node adjacency (e.g. "what is PE1 connected to?");
for tabular attributes (IPs, reachability, link status/utilisation)
prefer cnc_list_topology_nodes / cnc_list_topology_links. Keep page
sizes modest: the response is capped at the configured size limit.
Args: map_type: 'logical' only ('geo' is rejected with an explanation). page_size: links per page (1-500). page: 0-based page of links. node_page_size: nodes per page (1-1000). node_page: 0-based page of nodes. response_format: markdown (default) or json.
Returns:
str: Markdown listing nodes then "A:ifA <-> B:ifB" per link, or JSON:
{"map_type": "LOGICAL", "attributes": {"totalNodes": int, ...},
"nodes": {"total": int, "count": int, "page": int, "page_size": int,
"items": [{"uuid": str, "name": str}],
"has_more": bool, "next_page": int|null, ...},
"links": {"total": int, "count": int, "page": int, "page_size": int,
"items": [{"uuid": str, "name": "-",
"source": {"node_uuid": str, "node_name": str,
"interface": str},
"target": {"node_uuid": str, "node_name": str,
"interface": str}}],
"has_more": bool, "next_page": int|null, ...}}
Node icon/checksum attributes and edge decoration attributes (the
only attributes the platform returns on /data) are dropped.
On failure: "Error: ". An HTTP 500 "Internal Server
Error" from /v1/topology-service/... means the service rejected the
request body (mapType/viewId/params) — deterministic, do NOT retry.
(It is not the inventory's "NATS request failed" signal.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 0-based page of links. | |
| map_type | No | Map to read. Only 'logical' (default; wire value 'LOGICAL') is supported — 'geo' is rejected because the platform answers HTTP 500 for it. | logical |
| node_page | No | 0-based page of nodes. | |
| page_size | No | Links per page (client-side paging). | |
| node_page_size | No | Nodes per page (client-side paging). | |
| response_format | No | 'markdown' for human-readable output, 'json' for complete data. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |