---
title: "Get L2 (link layer) topology"
method: GET
path: "/v1/objects/{object-id}/topology/l2"
tags: ["Objects"]
---

# Get L2 (link layer) topology

`GET /v1/objects/{object-id}/topology/l2`

Build an ad-hoc Layer 2 topology map centered on the given node. Returns the set of discovered objects and the links between them.

## Path parameters

- `object-id` integer, required

## Query parameters

- `radius` integer
- `useL1Topology` boolean

## Response `200`

L2 topology retrieved successfully

- TopologyMap — Ad-hoc topology map containing discovered objects and the links between them
  - `objects` ObjectSummary[] — List of objects in the topology
    - `alias` string — Object alias
    - `category` integer — Object category ID
    - `class` 'AccessPoint' | 'AgentPolicyLogParser' | 'Asset' | 'AssetGroup' | 'AssetRoot' | 'BusinessService' | 'BusinessServiceProto' | 'BusinessServiceRoot' | 'Chassis' | 'Cluster' | 'Condition' | 'Container' | 'Dashboard' | 'DashboardGroup' | 'DashboardRoot' | 'Generic' | 'Interface' | 'MobileDevice' | 'Network' | 'NetworkMap' | 'NetworkMapGroup' | 'NetworkMapRoot' | 'NetworkService' | 'Node' | 'NodeLink' | 'Rack' | 'Report' | 'ReportGroup' | 'ReportRoot' | 'Sensor' | 'ServiceCheck' | 'ServiceRoot' | 'Subnet' | 'Template' | 'TemplateGroup' | 'TemplateRoot' | 'VPNConnector' | 'Zone'
    - `guid` string, uuid — Object GUID
    - `id` integer — Object ID
    - `ipAddress` InetAddress
      - `family` integer — IP address family
      - `address` integer — IP address
      - `prefixLength` integer — IP address prefix length
    - `isInMaintenanceMode` boolean — true if object is in maintenance mode
    - `isMaintenanceApplicable` boolean — true if object can be placed into maintenance mode
    - `isMaintenanceScheduled` boolean — true if object has pending scheduled maintenance
    - `name` string — Object name
    - `timestamp` string, date-time — Object last change timestamp
    - `status` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
  - `links` TopologyLink[] — Links between objects
    - `object1` integer — First object ID
    - `object2` integer — Second object ID
    - `interface1` integer — Interface ID on first object (0 if not applicable)
    - `interface2` integer — Interface ID on second object (0 if not applicable)
    - `type` integer — Link type (0=normal, 1=VPN, 2=multilink, 3=agent tunnel, 4=agent proxy, 5=SSH proxy, 6=SNMP proxy, 7=ICMP proxy, 8=sensor proxy, 9=zone proxy, 10=WiFi client)
    - `name` string — Link name
    - `port1` string — Port/connector name on first object
    - `port2` string — Port/connector name on second object
    - `flags` integer — Link flags

## Other responses

- `400` — Invalid object ID or object is not a node
- `401` — Unauthorized
- `403` — User does not have read access to given object
- `404` — Object with given ID does not exist
- `500` — Unable to build L2 topology

---

[API](https://skmtc.net/netxms/apis/netxms-api.md) · [All operations](https://skmtc.net/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netxms/netxms-api/versions/14d93e5115dd/schema)
