NetBox icon

NetBox

Consume NetBox API

Actions243

MAC Address → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new MAC Address entry within the specified domain (default is DCIM). It is useful for network administrators or IT professionals who want to automate the management of MAC addresses in their infrastructure. For example, it can be used to add a MAC address to a device interface programmatically, including optional details like assigned object type, status, description, tags, and custom fields.

Use Case Examples

  1. Creating a MAC address entry for a network interface in the DCIM domain.
  2. Adding a MAC address with a description and tags for inventory tracking.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to target (e.g., DCIM, IPAM, Tenancy). This determines the API endpoint domain used for the operation.
MAC Address The MAC address value to create, in the format XX:XX:XX:XX:XX:XX.
Additional Fields Optional additional fields to specify more details about the MAC address, such as assigned object type and ID, status (active or inactive), description, tags, and custom JSON fields.

Output

JSON

  • id - Unique identifier of the created MAC address entry.
  • mac - The MAC address value created.
  • status - Status of the MAC address (active or inactive).
  • description - Description of the MAC address if provided.
  • assigned_object_type - Content type of the assigned object if specified.
  • assigned_object_id - ID of the assigned object if specified.
  • tags - Tags associated with the MAC address.
  • custom_fields - Custom fields associated with the MAC address.

Dependencies

  • NetBox API with appropriate API key credentials

Troubleshooting

  • Ensure the MAC address is in the correct format (XX:XX:XX:XX:XX:XX) to avoid validation errors.
  • Verify that the assigned object type and ID exist in NetBox to prevent assignment errors.
  • Check API credentials and permissions if authentication errors occur.
  • If the node throws an error, enabling 'Continue on Fail' will output the error message as JSON instead of stopping execution.

Links

  • NetBox API Documentation - Official documentation for the NetBox API, useful for understanding resource schemas and operations.

Discussion