Skip to main content
POST
Upsert cable inventory projection (internal)

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

Write contract for the cable projection upsert endpoint.

netbox_cable_id is the natural key. Exactly one payload group must be supplied, matching link_kind — validated here so a mismatch fails the request instead of tripping the DB check constraint.

netbox_cable_id
integer
required
Required range: x >= 1
  • ethernet - Ethernet
  • infiniband - InfiniBand
Available options:
ethernet,
infiniband
site_netbox_id
integer
required
Required range: x >= 1
site_slug
string
required
Maximum string length: 100
Pattern: ^[-a-zA-Z0-9_]+$
source_updated_at
string<date-time>
required
ethernet
object | null

Resolved ethernet/console link payload (mirrors EthInterfaceLink).

String fields that the legacy transforms can emit as "" (region/code parsing, asset-type extraction) allow blank; everything else is required non-empty because the transforms validate it before emitting a record.

infiniband
object | null

Resolved InfiniBand link payload (mirrors IbSwitchLink).

Port names are already transposed / RDMA-normalized by the legacy transform; rack units and U-heights are NetBox decimals exposed as JSON numbers (same convention as the device projection's u_height).

far_datacenter
object | null

Cross-DC far-end site's DataCenter attributes (spec 0036 cross-DC links).

Present only on a cross-datacenter ethernet row: the far (end-side) site has no projected devices, so the connector emits its DataCenter from these NetBox site attributes. region / description allow null/blank because NetBox omits them for some sites — but description is what the connector parses into DCRegionCode, so a far site missing it fails loud at emit time (transform_far_datacenter) rather than silently shipping a link whose far datacenter cannot be rendered.

Response

Response contract for a cable projection upsert.

Carries the row id and site scope so the agent can build the NATS cable postcard (spec 0036 §3.5) without re-reading the row.

id
string<uuid>
required
changed
boolean
required
content_hash
string
required
last_synced_at
string<date-time>
required
site_netbox_id
integer
required
site_slug
string
required