NetBox icon

NetBox

Consume NetBox API

Actions243

Location → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new Location resource within the DCIM domain. It is useful for network administrators or IT professionals who want to automate the management of physical locations in their infrastructure. For example, it can be used to add a new data center location or a new office site location programmatically.

Use Case Examples

  1. Creating a new location in a data center management system by specifying site ID, name, slug, and optional additional fields like parent location, status, tenant ID, facility, description, tags, and custom fields.
  2. Automating the addition of new physical locations in NetBox to keep the inventory up to date without manual entry.

Properties

Name Meaning
Domain The domain of the NetBox API to interact with, here it is 'dcim' for data center infrastructure management.
Site ID ID of the site to which the new location belongs.
Name Name of the new location.
Slug URL-friendly slug for the new location.
Additional Fields Optional additional fields for the location such as parent location ID, status, tenant ID, facility description, location description, tags, and custom fields.

Output

JSON

  • id - Unique identifier of the created location.
  • name - Name of the created location.
  • slug - Slug of the created location.
  • site_id - ID of the site the location belongs to.
  • parent - ID of the parent location, if any.
  • status - Operational status of the location.
  • tenant - ID of the tenant associated with the location.
  • facility - Facility description or ID.
  • description - Description of the location.
  • tags - Tags associated with the location.
  • custom_fields - Custom fields data in JSON format.

Dependencies

  • NetBox API with an API key credential for authentication

Troubleshooting

  • Common issues include authentication errors due to invalid or missing API credentials. Ensure the API key credential is correctly configured.
  • Validation errors may occur if required fields like site ID, name, or slug are missing or invalid. Verify all required inputs are provided and correctly formatted.
  • Network connectivity issues can prevent the node from reaching the NetBox API endpoint. Check network settings and API availability.
  • If the node throws errors related to resource or operation not supported, confirm that the domain, resource, and operation selections are correct and supported by the NetBox API version in use.

Links

  • NetBox API Documentation - Official documentation for the NetBox API, useful for understanding resource creation and available fields.

Discussion