NetBox icon

NetBox

Consume NetBox API

Actions243

Cable → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new cable resource within the DCIM domain. It is useful for network administrators and engineers who want to automate the process of adding cable connections between devices or interfaces in their network infrastructure. For example, it can be used to programmatically define physical cable connections between network devices, specifying details such as cable type, status, length, and terminations on both ends.

Use Case Examples

  1. Creating a new CAT5e cable connecting two interfaces on different devices, with a label and color for easy identification.
  2. Automating the addition of cables in bulk by providing JSON arrays of terminations and additional cable attributes.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to interact with, here it is set to 'dcim' for data center infrastructure management.
A Terminations JSON array of A-side termination objects representing one end of the cable, e.g., interfaces or other objects to connect.
B Terminations JSON array of B-side termination objects representing the other end of the cable.
Additional Fields Optional additional fields to specify cable attributes such as type, status, label, color, length, length unit, tenant ID, description, tags, and custom fields.

Output

JSON

  • id - Unique identifier of the created cable.
  • type - Physical type of the cable.
  • status - Operational status of the cable.
  • label - Label assigned to the cable.
  • color - Color of the cable in hex format.
  • length - Length of the cable.
  • length_unit - Unit of measurement for the cable length.
  • tenant - Tenant ID associated with the cable.
  • description - Description of the cable.
  • tags - Tags associated with the cable.
  • a_terminations - Array of termination objects on the A side of the cable.
  • b_terminations - Array of termination objects on the B side of the cable.
  • custom_fields - Custom fields metadata for the cable.

Dependencies

  • NetBox API with appropriate API key credentials

Troubleshooting

  • Ensure the JSON arrays for A Terminations and B Terminations are correctly formatted and valid JSON strings.
  • Verify that the API credentials for NetBox are correctly configured and have permissions to create cables.
  • Check that required fields such as domain, resource, operation, and terminations are provided and valid.
  • Common error messages may include authentication errors, invalid JSON format errors, or missing required fields. Resolving these involves correcting credentials, JSON syntax, or input parameters.

Links

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

Discussion