NetBox icon

NetBox

Consume NetBox API

Actions243

Site → Update

AI-generated

Overview

This node updates a Site resource in the NetBox API within the DCIM domain. It is useful for automating the modification of site details such as name, slug, status, region, tenant, contact information, GPS coordinates, and custom fields. For example, it can be used to update the status of a site from 'planned' to 'active' or to change the contact details for a site automatically based on external data.

Use Case Examples

  1. Updating the status and contact information of a site in NetBox.
  2. Modifying the GPS coordinates and description of a site for accurate location tracking.

Properties

Name Meaning
Domain The domain of the NetBox API to interact with, here it is 'dcim' for data center infrastructure management.
Site ID The unique identifier of the site to update.
Update Fields A collection of fields to update on the site, including name, slug, status, region ID, site group ID, tenant ID, facility, ASN, time zone, description, physical address, shipping address, latitude, longitude, contact name, contact phone, contact email, comments, tags, and custom fields.

Output

JSON

  • id - ID of the updated site record
  • name - Name of the updated site
  • slug - URL-friendly slug of the updated site
  • status - Status of the updated site
  • region - Region ID of the updated site
  • group - Site group ID of the updated site
  • tenant - Tenant ID associated with the updated site
  • facility - Facility code or ID of the updated site
  • asn - Autonomous System Number of the updated site
  • time_zone - Time zone of the updated site
  • description - Description of the updated site
  • physical_address - Physical address of the updated site
  • shipping_address - Shipping address of the updated site
  • latitude - Latitude GPS coordinate of the updated site
  • longitude - Longitude GPS coordinate of the updated site
  • contact_name - Contact person's name for the updated site
  • contact_phone - Contact person's phone number for the updated site
  • contact_email - Contact person's email for the updated site
  • comments - Additional comments for the updated site
  • tags - Tags associated with the updated site
  • custom_fields - Custom JSON fields for the updated site

Dependencies

  • NetBox API with appropriate credentials

Troubleshooting

  • Common issues include providing an invalid Site ID or missing required fields in the update collection, which may result in API errors.
  • Errors related to authentication can occur if the API credentials are incorrect or missing.
  • If the update fields contain invalid data types or values not accepted by NetBox, the API will return validation errors.

Links

Discussion