Skip to main content
On this page

Inventory

Manage devices, virtual machines, and their related records through the Piping UI or API, or sync them from NetBox. Session launches use targets from this inventory.

Entity model

The hierarchy is loosely physical → logical. Browse and edit everything under Inventory → Resources. All entity lists are server-paginated with server-side search; sorting, filtering, and page size are query parameters on each list endpoint.

Organisation

EntityPurpose
Region, SiteGroupGeographic grouping above the site level
SiteA physical or logical location (data centre, office, cloud region)
LocationA floor, room, or zone inside a site
Tenant, TenantGroupOrganisational ownership — cross-cut all other entities
Rack, RackType, RackRole, RackReservationPhysical rack tracking within a site/location

Devices

EntityPurpose
Manufacturer, DeviceTypeHardware vendor and model template
DeviceRole, PlatformFunctional role and OS/software platform
DeviceA physical device with a site, rack, role, type, and optional tenant
Module, ModuleType, ModuleBay, DeviceBayModular expansion slots and installed modules

Virtual infrastructure

EntityPurpose
ClusterGroup, ClusterType, ClusterVM cluster grouping and classification
VirtualMachineA VM with CPU, memory, disk, and cluster assignment
VirtualDisk, VirtualDeviceContextVM storage and logical sub-contexts

Networking

EntityPurpose
Interface, VMInterfacePhysical and virtual interfaces on devices and VMs
IPAddress, Prefix, IPRangeIP address management (IPAM)
ASN, ASNRange, RIR, AggregateInternet registry objects and address aggregates
VRF, RouteTargetVirtual routing and forwarding
MACAddressTracked MAC entries
VLAN, VLANGroupLayer-2 segmentation
CablePhysical cabling between ports
VirtualChassisStacked or chassis-based device groups

VPN

VPNTunnel, VPNTunnelGroup, VPNTunnelTermination, VPNIKEPolicy, VPNIKEProposal, VPNIPSecPolicy, VPNIPSecProposal, VPNIPSecProfile

Circuits

Provider, ProviderAccount, ProviderNetwork, Circuit, CircuitGroup, CircuitType, CircuitTermination, VirtualCircuit, VirtualCircuitType

Ports and power

ConsolePort, ConsoleServerPort, FrontPort, RearPort, PowerPort, PowerOutlet, PowerFeed, PowerPanel

Metadata

EntityPurpose
Contact, ContactGroup, ContactRole, ContactAssignmentPeople and teams associated with assets
InventoryItem, InventoryItemRolePhysical components tracked on a device
Service, ServiceTemplateSoftware services running on a device or VM
ConfigContext, ConfigContextBindingJSON configuration overlays applied by scope — see Config contexts

Repeatable object shapes — a rack with its devices, a VM with its interfaces — can be stamped out from object templates (Inventory → Templates).

Editing in place

Open the nested editor from the inventory or connections inspector. Edit the device, its interfaces and IP addresses in one form; create related records and set the primary IP there. Relation fields show object names or addresses, including tunnel terminations, rack reservations, virtual device contexts, modules and owners.

Connection targets

Alongside the full entity model, Piping exposes a connection targets endpoint (/api/v1/connections/targets) — a single view over both devices and virtual machines that can be launched into a session. The target list is the entry point for launching connections in Connections → Workspace.

Each target entry includes:

  • Inventory metadata: site, role, platform, tenant, IP addresses.
  • Connection state: which protocols are configured and which credential accounts are available.
  • Policy state: whether the requesting user has the connect action on the target.
GET /api/v1/connections/targets/{id}/launch-options

This endpoint runs the full connection-config resolver for the target and returns the effective launch options. See Connection configuration for how the resolver works and Connections for the session-launch flow.

CCTV devices

A camera or recorder is an ordinary inventory device — there is no separate entity type for it. What makes a device CCTV-managed is the NAPALM Driver field on the Platform record it is assigned to, edited under Inventory → Resources → Platforms.

That field doubles as the CCTV family selector. Alongside network-automation slugs such as ios or junos it accepts four device families:

SlugFamily
dvrip_sofiaDVRIP / Sofia (XMeye)
dahuaDahua
hikvisionHikvision
onvifONVIF

A recognised CCTV family slug adds a camera badge beside the target in the connections list and a CCTV launch button for its console. All devices assigned to that platform use the same family.

Credentials, the management port, and a per-scope family override come from a cctv connection-config record. Nothing else has to be enabled — there is no CCTV switch in instance settings. The console itself is documented on CCTV.

Prometheus service discovery

Piping exposes an HTTP service-discovery endpoint compatible with Prometheus's http_sd_configs. Point Prometheus at it and the inventory is scraped automatically as targets change:

scrape_configs:
  - job_name: piping_inventory
    http_sd_configs:
      - url: https://piping.example.com/api/v1/monitoring/sd
        authorization:
          credentials: <sd-token>

The endpoint is authenticated with a dedicated token (PIPING_MONITORING__SD_TOKEN), and discovered targets carry labels from the inventory. Label shaping, the preview panel, and the rest of the monitoring pipeline are covered in Observability.

NetBox sync

The sync context keeps the inventory aligned with an external NetBox. A provider record (managed under Inventory → Sync) holds the NetBox URL and API token (stored as a secret):

{
  "name": "netbox-main",
  "provider_type": "netbox",
  "is_enabled": true,
  "config": {
    "base_url": "https://netbox.example.com",
    "sync_mode": "pull_only"
  }
}

How sync works

  1. A sync job runs extract → map → diff → upsert for each entity mapping declared in a versioned mapping configuration.
  2. Orphans — records the source no longer returns — are handled per resource: ignore, report, or delete.
  3. Synced records carry the provider that owns them; records created directly in Piping have no provider attribution.
  4. sync_mode controls direction: pull_only (default) never writes back to NetBox; bidirectional pushes supported local changes back through an outbound queue.

Near-real-time updates via webhooks

A provider can bootstrap a webhook on the NetBox side automatically. NetBox then POSTs signed change events to /api/v1/webhooks/netbox/{provider_id}; Piping verifies the HMAC signature and applies supported events within seconds — no full re-import.

Triggering a sync

# Via API: start a mapping job
POST /api/v1/sync/jobs   { "provider_id": "...", "mapping_version": "..." }

# Via UI
Inventory → Sync → provider Status tab → Sync Now

Providers, mapping configurations, transforms, conflict policy, and the outbound flow are documented in full on Inventory sync.

Local-only records

You can create records directly in Piping alongside synced assets, for example cloud instances or hosts outside NetBox.

Backup and restore

A full-instance backup archive covers inventory, connections, settings, access control, secrets, automation, synchronisation, observability, assistant, licensing, and appearance. It can be restored into another instance:

POST /api/v1/admin/backup/export
POST /api/v1/admin/backup/import

The UI lives under Administration → Backup, gated on the BACKUP resource type rather than on inventory permissions. Section selection, restore preview and secret handling are configured in that workspace.

REST API reference (selected)

MethodPathPurpose
GET/api/v1/inventory/devicesList devices
GET/api/v1/inventory/devices/{id}Get device
GET/api/v1/inventory/virtual_machinesList VMs
GET/api/v1/inventory/virtual_machines/{id}Get VM
GET/api/v1/connections/targetsList connection targets (devices + VMs unified)
GET/api/v1/connections/targets/{id}/launch-optionsResolve launch options
GET/api/v1/inventory/ip-addressesList IP addresses
GET/api/v1/inventory/sitesList sites
GET/api/v1/inventory/prefixesList IP prefixes
GET/api/v1/inventory/vlansList VLANs
GET/api/v1/inventory/tenantsList tenants
POST/api/v1/admin/backup/exportExport a full-instance backup archive
POST/api/v1/admin/backup/importRestore a backup archive
GET / POST/api/v1/providersList / create sync providers
POST/api/v1/sync/jobsStart a sync job

Most entities also expose POST, PUT, DELETE, and /bulk routes; the authoritative list is in the API reference.