NetBox icon

NetBox

Consume NetBox API

Actions243

Interface → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new network interface associated with a specific device within the DCIM domain. It is useful for network administrators and engineers who want to automate the management and provisioning of network interfaces in their infrastructure. For example, it can be used to add virtual or physical interfaces to devices programmatically, specifying details such as interface type, name, MAC address, VLAN settings, and other relevant attributes.

Use Case Examples

  1. Creating a virtual interface on a device for network segmentation.
  2. Adding a physical 10GBASE-T interface to a device with specific MTU and MAC address.
  3. Configuring an interface as management-only with a description and tags for easier identification.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to interact with, here it is 'dcim' for data center infrastructure management.
Device ID The unique identifier of the device to which the new interface will be associated.
Name The name of the interface being created, e.g., 'eth0' or 'GigabitEthernet1/0'.
Type The type of the interface, such as virtual, 1000BASE-T, SFP, IEEE 802.11 standards, or other types.
Additional Fields Optional additional parameters to configure the interface, including enabled status, LAG interface ID, MTU, MAC address, management-only flag, description, mode, VLAN settings, connection marking, tags, and custom fields.

Output

JSON

  • id - Unique identifier of the created interface
  • name - Name of the interface
  • type - Type of the interface
  • device_id - ID of the device the interface is associated with
  • enabled - Whether the interface is enabled
  • mac_address - MAC address of the interface
  • description - Description of the interface
  • mode - Mode of the interface (access, tagged, tagged-all)
  • untagged_vlan - ID of the untagged VLAN
  • tagged_vlans - List of tagged VLAN IDs
  • custom_fields - Custom fields associated with the interface

Dependencies

  • NetBox API
  • An API key credential for authentication

Troubleshooting

  • Common issues include invalid device ID or missing required fields such as 'type' or 'device_id'.
  • Errors may occur if the API key is invalid or lacks permissions to create interfaces.
  • Network connectivity issues to the NetBox server can cause failures.
  • Error messages typically indicate missing or invalid parameters; ensure all required fields are correctly set.
  • If 'continue on fail' is enabled, errors will be returned as output instead of stopping execution.

Links

Discussion