Skip to content

NetBox inventory

Bind OLAV_NETBOX_ORIGIN to the authorized HTTPS origin and OLAV_NETBOX_TOKEN to a read-only NetBox token in the tool process environment. Loopback HTTP is supported for isolated tests. The script only reads the service schema and the sites, devices or interfaces list. It checks requested filters against the served OpenAPI operation and checks pagination scope, counts and duplicate IDs.

Run olav-skills run api-query query_netbox with one JSON object on stdin, for example {"resource":"interfaces","filters":{"device_id":123},"page_size":25}. Page sizes are 1–100 and the page budget is 1–100. Results include projected records, supported filters, read interval and schema digest. Exactness applies to the visible account scope over the read interval. Concurrent changes can affect offset-based pagination.

For historical comparison, bind OLAV_HOME to the authorized native project and set OLAV_NETBOX_COMPLETE_DEVICE_SCOPE=1 only when the account sees the entire device inventory intended for comparison. Run olav-skills run api-query reconcile_assets with {"snapshot_id":"<exact ID>"}. The result includes the database digest, persisted source tables and exact name sets. Up to 1000 distinct snapshot names are supported. Duplicate or missing names preserve identity uncertainty. A missing name on one side makes unmatched names on the other side uncertain. Absent rows establish a gap in recorded evidence only.