NetBox icon

NetBox

Consume NetBox API

Actions243

Site → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new site within the DCIM domain. It is useful for automating the addition of site information into NetBox, which is a popular infrastructure resource modeling tool. For example, users can create new physical or logical sites with detailed attributes such as name, status, location, contact information, and custom fields, streamlining infrastructure management workflows.

Use Case Examples

  1. Creating a new data center site with specific geographic coordinates and contact details.
  2. Adding a planned site with a description and tags for future infrastructure expansion.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is 'dcim' for data center infrastructure management.
Name The name of the site to be created.
Status The operational status of the site, such as active or planned.
Additional Fields A collection of optional fields to provide more detailed information about the site, including slug, region ID, site group ID, tenant info, facility code, ASN, time zone, description, physical and shipping addresses, GPS coordinates, contact details, comments, tags, and custom fields.

Output

JSON

  • id - Unique identifier of the created site.
  • name - Name of the created site.
  • status - Status of the created site.
  • slug - URL-friendly slug of the site.
  • region - Region ID associated with the site.
  • group - Site group ID.
  • tenant - Tenant information related to the site.
  • facility - Facility code or ID.
  • asn - Autonomous System Number.
  • time_zone - Time zone of the site.
  • description - Description of the site.
  • physical_address - Physical address of the site.
  • shipping_address - Shipping address of the site.
  • latitude - Latitude coordinate of the site.
  • longitude - Longitude coordinate of the site.
  • contact_name - Name of the contact person for the site.
  • contact_phone - Phone number of the contact person.
  • contact_email - Email address of the contact person.
  • comments - Additional comments about the site.
  • tags - Tags associated with the site.
  • custom_fields - Custom fields defined for the site.

Dependencies

  • NetBox API with appropriate authentication credentials

Troubleshooting

  • Common issues include authentication failures due to invalid API credentials, which can be resolved by verifying and updating the API key or token.
  • Validation errors may occur if required fields like 'Name' are missing or if field values do not meet NetBox API requirements; ensure all mandatory fields are correctly filled and formatted.
  • Network connectivity issues can prevent the node from reaching the NetBox API endpoint; check network settings and API URL configuration.

Links

  • NetBox API Documentation - Official documentation for the NetBox API, useful for understanding available endpoints and data models.

Discussion