NetBox icon

NetBox

Consume NetBox API

Actions243

Console Port → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new console port within the DCIM domain. It is useful for network administrators or IT professionals who want to automate the management of console ports on devices in their infrastructure. For example, it can be used to add a console port to a specific device by specifying the device ID, port name, and optional additional details such as module ID, label, port type, speed, and description.

Use Case Examples

  1. Creating a console port named 'Console1' on a device with ID 123, specifying the port type as RJ-45 and speed as 9600 bps.
  2. Adding a console port with a physical label and marking it as connected for a device in the DCIM domain.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is 'dcim' for device management.
Device ID The ID of the device to which the console port belongs.
Name The name of the console port to be created.
Additional Fields Optional additional properties for the console port such as module ID, label, type, speed, connection status, description, tags, and custom fields.

Output

JSON

  • id - Unique identifier of the created console port.
  • device_id - ID of the device the console port belongs to.
  • name - Name of the console port.
  • module - Module ID if specified.
  • label - Physical label of the port.
  • type - Physical type of the port connector.
  • speed - Port speed in baud rate.
  • mark_connected - Boolean indicating if the port is marked as connected.
  • description - Description of the console port.
  • tags - Tags associated with the console port.
  • custom_fields - Custom fields metadata as JSON.

Dependencies

  • NetBox API
  • An API key credential for authentication

Troubleshooting

  • Ensure the device ID exists in the NetBox instance; otherwise, the creation will fail.
  • Verify that the API key credential is valid and has permissions to create console ports.
  • Check that required fields like 'Device ID' and 'Name' are provided; missing these will cause errors.
  • If the node returns an error message, review the message for details such as invalid field values or network issues.

Links

Discussion