NetBox icon

NetBox

Consume NetBox API

Actions243

Inventory Item → Create

AI-generated

Overview

This node interacts with the NetBox API to create a new inventory item within the DCIM domain. It is useful for automating the addition of inventory components to devices managed in NetBox, such as adding hardware parts or components to a device record. For example, it can be used to add a new memory module or network card to a device in an IT asset management workflow.

Use Case Examples

  1. Creating an inventory item for a device by specifying the device ID and the name of the inventory item.
  2. Adding additional details such as manufacturer ID, serial number, and asset tag to the inventory item during creation.

Properties

Name Meaning
Domain Specifies the domain of the NetBox API to use, here it is set to 'dcim' for data center infrastructure management.
Device ID The ID of the device to which the inventory item belongs.
Name The name of the inventory item to be created.
Additional Fields Optional additional properties for the inventory item such as parent ID, label, role ID, manufacturer ID, part ID, serial number, asset tag, discovered status, description, tags, and custom fields.

Output

JSON

  • id - The unique identifier of the created inventory item.
  • device_id - The ID of the device the inventory item belongs to.
  • name - The name of the inventory item.
  • parent - The ID of the parent inventory item, if any.
  • label - Physical label on the component.
  • role - The role ID of the inventory item.
  • manufacturer - The manufacturer ID of the inventory item.
  • part_id - Manufacturer-assigned part identifier.
  • serial - Serial number of the inventory item.
  • asset_tag - Unique asset tag assigned to the item.
  • discovered - Boolean indicating if the item was discovered automatically.
  • description - Description of the inventory item.
  • tags - Comma-separated list of tags associated with the item.
  • custom_fields - Custom fields as a JSON object.

Dependencies

  • NetBox API with appropriate credentials

Troubleshooting

  • Ensure the device ID provided exists in NetBox to avoid 'not found' errors.
  • Verify that the API credentials have permissions to create inventory items in the DCIM domain.
  • Check that required fields like device ID and inventory item name are provided to prevent validation errors.

Discussion