Automation · NetBox
Sites
Cheat sheet · https://pcornel.dk/topic.php?topic=5874
Answer
Sites in NetBox are physical locations such as offices or data centres, grouped into regions and site groups, containing locations, racks and devices.
Remember
- Sites are physical locations.
- Regions and site groups organize them.
- Locations and racks sit inside sites.
First checks
curl -s -H 'Authorization: Token <t>' https://<netbox>/api/dcim/sites/ | jq '.results[].slug'— sites- Region/site group hierarchy — structure
- Site status and facility data — lifecycle
Verify in this order
region → site → racks/devices
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5874