# NetBox

> Keep NetBox, your network's source of truth, up to date from workflows: find devices and who has an IP address, add and update devices and virtual machines, take the next free IP address in a prefix and give it back, and add journal notes. Start a workflow when a device or IP address is added, or a record changes.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/netbox

## Actions

### Add journal entry

Add a note to a device's, virtual machine's, IP address's, prefix's or site's journal in NetBox, such as a ticket reference or a change made.

**Inputs**

- Add it to (`object_type`, text): What kind of record it's about. One of: `device`, `virtual_machine` (Virtual machine), `ip_address` (IP address), `prefix`, `site`. Default: `device`.
- Record (`record`, text, required): Which one: its ID, link or name (a device also its asset tag or serial number, an IP address the address itself, a prefix its CIDR).
- Comments (`comments`, text, required): What the entry says, in Markdown, such as Replaced a failed disk (CHG-1042).
- Kind (`entry_kind`, text): How NetBox colours it. Defaults to Info. One of: `info`, `success`, `warning`, `danger`. Default: `info`.

**Outputs**

- `comments` (text): What it says
- `created` (text): When it was added
- `id` (number): The journal entry's ID
- `kind` (text): Its kind: info, success, warning or danger
- `link` (text): A link to it in NetBox
- `object` (text): The record it's on, as NetBox shows it
- `object_id` (number): The ID of the record it's on
- `object_type` (text): What it's on, as NetBox names it, such as dcim.device

**Example output**

```json
{
  "comments": "Replaced a failed disk (CHG-1042).",
  "created": "2026-11-06T18:30:00.000000Z",
  "id": 4,
  "kind": "info",
  "link": "https://netbox.example.com/extras/journal-entries/4/",
  "object": "ams-web-01 (A-10002)",
  "object_id": 2,
  "object_type": "dcim.device"
}
```

### Create device

Add a device at a site, with its type, role, status, serial number, asset tag, tenant and rack, such as from a provisioning workflow.

**Inputs**

- Name (`name`, text, required): The device's name, such as ams-web-02.
- Device type (`device_type`, text, required): Its make and model, such as PowerEdge R650.
- Device role (`role`, text, required): What it does, such as Server or Core switch.
- Site (`site`, text, required): Where it is.
- Status (`status`, text): Its status. Defaults to Active. One of: `offline`, `active`, `planned`, `staged`, `failed`, `inventory`, `decommissioning`. Default: `active`.
- Serial number (`serial`, text): Its serial number.
- Asset tag (`asset_tag`, text): Its asset tag, which no other device may have.
- Tenant (`tenant`, text): Who it belongs to.
- Rack (`rack`, text): The rack it's in, at that site. Leave blank if it isn't racked.
- Description (`description`, text): A short description.
- Comments (`comments`, text): Longer notes, in Markdown.

**Outputs**

- `asset_tag` (text): Its asset tag
- `comments` (text): Its comments
- `created` (text): When it was added
- `description` (text): Its description
- `device_type` (text): Its device type (model), such as PowerEdge R650
- `device_type_id` (number): The device type's ID
- `id` (number): The device's ID, for other NetBox steps
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `location` (text): Its location within the site, if set
- `manufacturer` (text): The device type's manufacturer
- `name` (text): Its name
- `platform` (text): Its platform, such as Ubuntu 24.04, if set
- `position` (number): Its position in the rack (U); 0 if not racked
- `primary_ip` (text): Its primary IP address, with its mask, such as 10.10.20.10/24
- `primary_ip4` (text): Its primary IPv4 address, with its mask
- `primary_ip6` (text): Its primary IPv6 address, with its mask
- `rack` (text): The rack it's in, if any
- `role` (text): Its role, such as Server or Core switch
- `role_id` (number): The role's ID
- `serial` (text): Its serial number
- `site` (text): The site it's at
- `site_id` (number): The site's ID
- `status` (text): Its status, such as active, offline or decommissioning
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none

**Example output**

```json
{
  "asset_tag": "A-10002",
  "comments": "",
  "created": "2026-11-06T18:18:17.737707Z",
  "description": "",
  "device_type": "PowerEdge R650",
  "device_type_id": 2,
  "id": 2,
  "last_updated": "2026-11-06T18:18:19.132036Z",
  "link": "https://netbox.example.com/dcim/devices/2/",
  "location": "",
  "manufacturer": "Dell",
  "name": "ams-web-01",
  "platform": "Ubuntu 24.04",
  "position": 20.0,
  "primary_ip": "10.10.20.10/24",
  "primary_ip4": "10.10.20.10/24",
  "primary_ip6": "",
  "rack": "R101",
  "role": "Server",
  "role_id": 2,
  "serial": "7XK2M33",
  "site": "Amsterdam DC1",
  "site_id": 1,
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1
}
```

### Create virtual machine

Add a virtual machine on a cluster or at a site, with its status, role, tenant, VCPUs, memory and disk.

**Inputs**

- Name (`name`, text, required): The virtual machine's name, such as ams-app-vm02.
- Cluster (`cluster`, text): The cluster it runs on. Give this, a site, or both.
- Site (`site`, text): The site it's at. Give this, a cluster, or both.
- Status (`status`, text): Its status. Defaults to Active. One of: `offline`, `active`, `planned`, `staged`, `failed`, `decommissioning`, `paused`. Default: `active`.
- Role (`role`, text): What it does, such as Server.
- Tenant (`tenant`, text): Who it belongs to.
- VCPUs (`vcpus`, number): How many virtual CPUs. At least 0.
- Memory (MB) (`memory_mb`, number): Its memory in MB, such as 8192 for 8 GB. At least 0.
- Disk (MB) (`disk_mb`, number): Its disk space in MB, such as 100000 for 100 GB. At least 0.
- Description (`description`, text): A short description.
- Comments (`comments`, text): Longer notes, in Markdown.

**Outputs**

- `cluster` (text): The cluster it runs on, if set
- `cluster_id` (number): The cluster's ID; 0 if none
- `comments` (text): Its comments
- `created` (text): When it was added
- `description` (text): Its description
- `disk_mb` (number): Its disk space in MB; 0 if not set
- `id` (number): The virtual machine's ID, for other NetBox steps
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `memory_mb` (number): Its memory in MB; 0 if not set
- `name` (text): Its name
- `platform` (text): Its platform, such as Ubuntu 24.04, if set
- `primary_ip` (text): Its primary IP address, with its mask
- `role` (text): Its role, if set
- `role_id` (number): The role's ID; 0 if none
- `site` (text): The site it's at, if set
- `site_id` (number): The site's ID; 0 if none
- `status` (text): Its status, such as active, offline or decommissioning
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none
- `vcpus` (number): How many virtual CPUs it has; 0 if not set

**Example output**

```json
{
  "cluster": "AMS-Cluster-1",
  "cluster_id": 1,
  "comments": "",
  "created": "2026-11-06T18:18:20.100000Z",
  "description": "",
  "disk_mb": 81920,
  "id": 1,
  "last_updated": "2026-11-06T18:18:20.260158Z",
  "link": "https://netbox.example.com/virtualization/virtual-machines/1/",
  "memory_mb": 8192,
  "name": "ams-app-vm01",
  "platform": "Ubuntu 24.04",
  "primary_ip": "10.10.20.50/24",
  "role": "Server",
  "role_id": 2,
  "site": "Amsterdam DC1",
  "site_id": 1,
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1,
  "vcpus": 4.0
}
```

### Delete device

Delete a device from NetBox, with its interfaces and journal, such as once it has left the building. Its IP addresses stay, unassigned.

**Inputs**

- Device (`device`, text, required): The device: its ID (from a trigger or an earlier step), link, name, asset tag or serial number.

**Outputs**

- `deleted` (true/false): True once it's deleted
- `id` (number): The deleted record's ID
- `name` (text): The name it had

**Example output**

```json
{
  "deleted": true,
  "id": 7,
  "name": "ams-web-02"
}
```

### Delete IP address

Delete an IP address from NetBox, so it's free again, such as when a server is retired.

**Inputs**

- IP address (`ip_address`, text, required): The address, such as 10.10.20.5 or 10.10.20.5/24, or its ID or link.

**Outputs**

- `address` (text): The address it had, with its mask
- `deleted` (true/false): True once it's deleted
- `dns_name` (text): The DNS name it had
- `id` (number): The deleted IP address's ID

**Example output**

```json
{
  "address": "10.10.20.2/24",
  "deleted": true,
  "dns_name": "ams-web-02.ams.example.net",
  "id": 7
}
```

### Delete virtual machine

Delete a virtual machine from NetBox, with its interfaces and journal, such as once it has been destroyed. Its IP addresses stay, unassigned.

**Inputs**

- Virtual machine (`virtual_machine`, text, required): The virtual machine: its ID (from a trigger or an earlier step), link or name.

**Outputs**

- `deleted` (true/false): True once it's deleted
- `id` (number): The deleted record's ID
- `name` (text): The name it had

**Example output**

```json
{
  "deleted": true,
  "id": 2,
  "name": "ams-app-vm02"
}
```

### Find devices

Find devices by name, serial number, asset tag or other words, at a site, with a role, status or tenant, with their primary IP address.

**Inputs**

- Search (`search`, text): Words in the name, serial number, asset tag or description, such as ams-web or 7XK2M33. Leave blank to list every device.
- Site (`site`, text): Only devices at this site.
- Device role (`role`, text): Only devices with this role.
- Status (`status`, text): Only devices with this status. One of: `offline`, `active`, `planned`, `staged`, `failed`, `inventory`, `decommissioning`.
- Tenant (`tenant`, text): Only devices of this tenant.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `devices` (list): The devices found, by name
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "devices": [
    {
      "asset_tag": "A-10002",
      "comments": "",
      "created": "2026-11-06T18:18:17.737707Z",
      "description": "",
      "device_type": "PowerEdge R650",
      "device_type_id": 2,
      "id": 2,
      "last_updated": "2026-11-06T18:18:19.132036Z",
      "link": "https://netbox.example.com/dcim/devices/2/",
      "location": "",
      "manufacturer": "Dell",
      "name": "ams-web-01",
      "platform": "Ubuntu 24.04",
      "position": 20.0,
      "primary_ip": "10.10.20.10/24",
      "primary_ip4": "10.10.20.10/24",
      "primary_ip6": "",
      "rack": "R101",
      "role": "Server",
      "role_id": 2,
      "serial": "7XK2M33",
      "site": "Amsterdam DC1",
      "site_id": 1,
      "status": "active",
      "tenant": "Platform team",
      "tenant_id": 1
    }
  ],
  "total": 1
}
```

### Find IP addresses

Look up who has an IP address, or find addresses by DNS name or words, in a prefix, with a status, of a tenant or on a device.

**Inputs**

- Address or words (`search`, text): An address, such as 10.10.20.5, or words in the DNS name or description. Leave blank to list every address.
- Prefix (`prefix`, text): Only addresses in this prefix.
- Status (`status`, text): Only addresses with this status. One of: `active`, `reserved`, `deprecated`, `dhcp`, `slaac`.
- Tenant (`tenant`, text): Only addresses of this tenant.
- Device (`device`, text): Only addresses on this device: its ID, name, asset tag or serial number.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `ip_addresses` (list): The IP addresses found, in address order
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "ip_addresses": [
    {
      "address": "10.10.20.10/24",
      "assigned_to": "ams-web-01 eth0",
      "created": "2026-11-06T18:18:18.986440Z",
      "description": "",
      "device": "ams-web-01",
      "device_id": 2,
      "dns_name": "ams-web-01.ams.example.net",
      "family": 4,
      "id": 2,
      "interface": "eth0",
      "ip": "10.10.20.10",
      "last_updated": "2026-11-06T18:18:18.986453Z",
      "link": "https://netbox.example.com/ipam/ip-addresses/2/",
      "prefix_length": 24,
      "role": "",
      "status": "active",
      "tenant": "Platform team",
      "tenant_id": 1,
      "virtual_machine": "",
      "virtual_machine_id": 0,
      "vrf": ""
    }
  ],
  "total": 1
}
```

### Find prefixes

Find prefixes by words, the address they contain, site, status or tenant, with their VLAN.

**Inputs**

- Search (`search`, text): Words in the prefix or description, such as 10.10. or servers.
- Contains (`contains`, text): Only prefixes holding this address or prefix, such as 10.10.20.5.
- Site (`site`, text): Only prefixes for this site.
- Status (`status`, text): Only prefixes with this status. One of: `container`, `active`, `reserved`, `deprecated`.
- Tenant (`tenant`, text): Only prefixes of this tenant.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `prefixes` (list): The prefixes found, in address order
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "prefixes": [
    {
      "description": "AMS server network",
      "id": 2,
      "is_pool": false,
      "link": "https://netbox.example.com/ipam/prefixes/2/",
      "prefix": "10.10.20.0/24",
      "role": "",
      "scope": "Amsterdam DC1",
      "site": "Amsterdam DC1",
      "status": "active",
      "tenant": "Platform team",
      "tenant_id": 1,
      "vlan": "Servers (20)",
      "vlan_vid": 20,
      "vrf": ""
    }
  ],
  "total": 1
}
```

### Find virtual machines

Find virtual machines by name or words, site, cluster, status, role or tenant, with their primary IP address.

**Inputs**

- Search (`search`, text): Words in the name or description. Leave blank to list every virtual machine.
- Site (`site`, text): Only virtual machines at this site.
- Cluster (`cluster`, text): Only virtual machines on this cluster.
- Status (`status`, text): Only virtual machines with this status. One of: `offline`, `active`, `planned`, `staged`, `failed`, `decommissioning`, `paused`.
- Role (`role`, text): Only virtual machines with this role.
- Tenant (`tenant`, text): Only virtual machines of this tenant.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `total` (number): How many match in all
- `virtual_machines` (list): The virtual machines found, by name

**Example output**

```json
{
  "count": 1,
  "total": 1,
  "virtual_machines": [
    {
      "cluster": "AMS-Cluster-1",
      "cluster_id": 1,
      "comments": "",
      "created": "2026-11-06T18:18:20.100000Z",
      "description": "",
      "disk_mb": 81920,
      "id": 1,
      "last_updated": "2026-11-06T18:18:20.260158Z",
      "link": "https://netbox.example.com/virtualization/virtual-machines/1/",
      "memory_mb": 8192,
      "name": "ams-app-vm01",
      "platform": "Ubuntu 24.04",
      "primary_ip": "10.10.20.50/24",
      "role": "Server",
      "role_id": 2,
      "site": "Amsterdam DC1",
      "site_id": 1,
      "status": "active",
      "tenant": "Platform team",
      "tenant_id": 1,
      "vcpus": 4.0
    }
  ]
}
```

### Get device

Look up a device by its name, serial number or asset tag: its site, rack, role, type, status and tenant, its interfaces and its IP addresses.

**Inputs**

- Device (`device`, text, required): The device: its ID (from a trigger or an earlier step), link, name, asset tag or serial number.

**Outputs**

- `asset_tag` (text): Its asset tag
- `comments` (text): Its comments
- `created` (text): When it was added
- `description` (text): Its description
- `device_type` (text): Its device type (model), such as PowerEdge R650
- `device_type_id` (number): The device type's ID
- `id` (number): The device's ID, for other NetBox steps
- `interfaces` (list): Its interfaces, with the IP addresses on each
- `ip_addresses` (list): Every IP address on its interfaces
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `location` (text): Its location within the site, if set
- `manufacturer` (text): The device type's manufacturer
- `name` (text): Its name
- `platform` (text): Its platform, such as Ubuntu 24.04, if set
- `position` (number): Its position in the rack (U); 0 if not racked
- `primary_ip` (text): Its primary IP address, with its mask, such as 10.10.20.10/24
- `primary_ip4` (text): Its primary IPv4 address, with its mask
- `primary_ip6` (text): Its primary IPv6 address, with its mask
- `rack` (text): The rack it's in, if any
- `role` (text): Its role, such as Server or Core switch
- `role_id` (number): The role's ID
- `serial` (text): Its serial number
- `site` (text): The site it's at
- `site_id` (number): The site's ID
- `status` (text): Its status, such as active, offline or decommissioning
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none

**Example output**

```json
{
  "asset_tag": "A-10002",
  "comments": "",
  "created": "2026-11-06T18:18:17.737707Z",
  "description": "",
  "device_type": "PowerEdge R650",
  "device_type_id": 2,
  "id": 2,
  "interfaces": [
    {
      "description": "",
      "enabled": true,
      "id": 1,
      "ip_addresses": [
        "10.10.20.10/24"
      ],
      "mac_address": "",
      "name": "eth0",
      "type": "SFP+ (10GE)"
    }
  ],
  "ip_addresses": [
    {
      "address": "10.10.20.10/24",
      "assigned_to": "ams-web-01 eth0",
      "created": "2026-11-06T18:18:18.986440Z",
      "description": "",
      "device": "ams-web-01",
      "device_id": 2,
      "dns_name": "ams-web-01.ams.example.net",
      "family": 4,
      "id": 2,
      "interface": "eth0",
      "ip": "10.10.20.10",
      "last_updated": "2026-11-06T18:18:18.986453Z",
      "link": "https://netbox.example.com/ipam/ip-addresses/2/",
      "prefix_length": 24,
      "role": "",
      "status": "active",
      "tenant": "Platform team",
      "tenant_id": 1,
      "virtual_machine": "",
      "virtual_machine_id": 0,
      "vrf": ""
    }
  ],
  "last_updated": "2026-11-06T18:18:19.132036Z",
  "link": "https://netbox.example.com/dcim/devices/2/",
  "location": "",
  "manufacturer": "Dell",
  "name": "ams-web-01",
  "platform": "Ubuntu 24.04",
  "position": 20.0,
  "primary_ip": "10.10.20.10/24",
  "primary_ip4": "10.10.20.10/24",
  "primary_ip6": "",
  "rack": "R101",
  "role": "Server",
  "role_id": 2,
  "serial": "7XK2M33",
  "site": "Amsterdam DC1",
  "site_id": 1,
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1
}
```

### Get next free IP address

Take the next free IP address in a prefix and reserve it in NetBox, with its DNS name, description, status and tenant, such as for a new server. Or only look at which one it would be.

**Inputs**

- Prefix (`prefix`, text, required): The prefix to take it from, such as 10.10.20.0/24.
- Reserve it (`reserve`, true/false): Save the address in NetBox, so nothing else gets it. Turn off to only look at which address is next. Default: `true`.
- DNS name (`dns_name`, text): Its DNS name, such as ams-web-02.example.net.
- Description (`description`, text): What it's for, such as the ticket.
- Status (`status`, text): Its status. Defaults to Active. One of: `active`, `reserved`, `deprecated`, `dhcp`, `slaac`. Default: `active`.
- Tenant (`tenant`, text): Who it belongs to.

**Outputs**

- `address` (text): The address with its mask, such as 10.10.20.5/24
- `assigned_to` (text): The device or virtual machine and interface it's on
- `created` (text): When it was added
- `description` (text): Its description
- `device` (text): The device it's on, if any
- `device_id` (number): That device's ID; 0 if none
- `dns_name` (text): Its DNS name
- `family` (number): 4 for IPv4, 6 for IPv6
- `id` (number): The IP address's ID, for other NetBox steps
- `interface` (text): The interface it's on, if any
- `ip` (text): The address without its mask, such as 10.10.20.5
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `prefix` (text): The prefix it came from, such as 10.10.20.0/24
- `prefix_length` (number): Its mask length, such as 24
- `reserved` (true/false): True when it was saved in NetBox; false when it was only looked up, with an ID of 0
- `role` (text): Its role, such as vip or loopback, if set
- `status` (text): Its status, such as active, reserved or deprecated
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none
- `virtual_machine` (text): The virtual machine it's on, if any
- `virtual_machine_id` (number): That virtual machine's ID; 0 if none
- `vrf` (text): Its VRF, if any

**Example output**

```json
{
  "address": "10.10.20.2/24",
  "assigned_to": "",
  "created": "2026-11-06T18:18:18.986440Z",
  "description": "",
  "device": "",
  "device_id": 0,
  "dns_name": "ams-web-02.ams.example.net",
  "family": 4,
  "id": 7,
  "interface": "",
  "ip": "10.10.20.2",
  "last_updated": "2026-11-06T18:18:18.986453Z",
  "link": "https://netbox.example.com/ipam/ip-addresses/7/",
  "prefix": "10.10.20.0/24",
  "prefix_length": 24,
  "reserved": true,
  "role": "",
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1,
  "virtual_machine": "",
  "virtual_machine_id": 0,
  "vrf": ""
}
```

### List sites

List the sites in NetBox, by name, with their status, facility and region.

**Inputs**

- Search (`search`, text): Words in the name, facility or address.
- Status (`status`, text): Only sites with this status. One of: `planned`, `staging`, `active`, `decommissioning`, `retired`.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `sites` (list): The sites found, by name
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "sites": [
    {
      "description": "",
      "facility": "Equinix AM3",
      "group": "",
      "id": 1,
      "link": "https://netbox.example.com/dcim/sites/1/",
      "name": "Amsterdam DC1",
      "physical_address": "",
      "region": "",
      "slug": "ams-dc1",
      "status": "active",
      "tenant": "Platform team",
      "time_zone": ""
    }
  ],
  "total": 1
}
```

### Update device

Change a device's status (such as to Offline or Decommissioning), name, serial number, asset tag, tenant, role, description or comments. Blank fields stay as they are.

**Inputs**

- Device (`device`, text, required): The device: its ID (from a trigger or an earlier step), link, name, asset tag or serial number.
- Status (`status`, text): A new status. Leave blank to keep it. One of: `offline`, `active`, `planned`, `staged`, `failed`, `inventory`, `decommissioning`.
- Name (`name`, text): A new name. Leave blank to keep it.
- Serial number (`serial`, text): A new serial number. Leave blank to keep it.
- Asset tag (`asset_tag`, text): A new asset tag. Leave blank to keep it.
- Tenant (`tenant`, text): A new tenant. Leave blank to keep it.
- Device role (`role`, text): A new role. Leave blank to keep it.
- Description (`description`, text): A new description. Leave blank to keep it.
- Comments (`comments`, text): New comments, which replace the old ones. Leave blank to keep it.

**Outputs**

- `asset_tag` (text): Its asset tag
- `comments` (text): Its comments
- `created` (text): When it was added
- `description` (text): Its description
- `device_type` (text): Its device type (model), such as PowerEdge R650
- `device_type_id` (number): The device type's ID
- `id` (number): The device's ID, for other NetBox steps
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `location` (text): Its location within the site, if set
- `manufacturer` (text): The device type's manufacturer
- `name` (text): Its name
- `platform` (text): Its platform, such as Ubuntu 24.04, if set
- `position` (number): Its position in the rack (U); 0 if not racked
- `primary_ip` (text): Its primary IP address, with its mask, such as 10.10.20.10/24
- `primary_ip4` (text): Its primary IPv4 address, with its mask
- `primary_ip6` (text): Its primary IPv6 address, with its mask
- `rack` (text): The rack it's in, if any
- `role` (text): Its role, such as Server or Core switch
- `role_id` (number): The role's ID
- `serial` (text): Its serial number
- `site` (text): The site it's at
- `site_id` (number): The site's ID
- `status` (text): Its status, such as active, offline or decommissioning
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none

**Example output**

```json
{
  "asset_tag": "A-10002",
  "comments": "",
  "created": "2026-11-06T18:18:17.737707Z",
  "description": "",
  "device_type": "PowerEdge R650",
  "device_type_id": 2,
  "id": 2,
  "last_updated": "2026-11-06T18:18:19.132036Z",
  "link": "https://netbox.example.com/dcim/devices/2/",
  "location": "",
  "manufacturer": "Dell",
  "name": "ams-web-01",
  "platform": "Ubuntu 24.04",
  "position": 20.0,
  "primary_ip": "10.10.20.10/24",
  "primary_ip4": "10.10.20.10/24",
  "primary_ip6": "",
  "rack": "R101",
  "role": "Server",
  "role_id": 2,
  "serial": "7XK2M33",
  "site": "Amsterdam DC1",
  "site_id": 1,
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1
}
```

### Update IP address

Change an IP address's status, DNS name, description or tenant. Blank fields stay as they are.

**Inputs**

- IP address (`ip_address`, text, required): The address, such as 10.10.20.5 or 10.10.20.5/24, or its ID or link.
- Status (`status`, text): A new status. Leave blank to keep it. One of: `active`, `reserved`, `deprecated`, `dhcp`, `slaac`.
- DNS name (`dns_name`, text): A new DNS name. Leave blank to keep it.
- Description (`description`, text): A new description. Leave blank to keep it.
- Tenant (`tenant`, text): A new tenant. Leave blank to keep it.

**Outputs**

- `address` (text): The address with its mask, such as 10.10.20.5/24
- `assigned_to` (text): The device or virtual machine and interface it's on
- `created` (text): When it was added
- `description` (text): Its description
- `device` (text): The device it's on, if any
- `device_id` (number): That device's ID; 0 if none
- `dns_name` (text): Its DNS name
- `family` (number): 4 for IPv4, 6 for IPv6
- `id` (number): The IP address's ID, for other NetBox steps
- `interface` (text): The interface it's on, if any
- `ip` (text): The address without its mask, such as 10.10.20.5
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `prefix_length` (number): Its mask length, such as 24
- `role` (text): Its role, such as vip or loopback, if set
- `status` (text): Its status, such as active, reserved or deprecated
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none
- `virtual_machine` (text): The virtual machine it's on, if any
- `virtual_machine_id` (number): That virtual machine's ID; 0 if none
- `vrf` (text): Its VRF, if any

**Example output**

```json
{
  "address": "10.10.20.10/24",
  "assigned_to": "ams-web-01 eth0",
  "created": "2026-11-06T18:18:18.986440Z",
  "description": "",
  "device": "ams-web-01",
  "device_id": 2,
  "dns_name": "ams-web-01.ams.example.net",
  "family": 4,
  "id": 2,
  "interface": "eth0",
  "ip": "10.10.20.10",
  "last_updated": "2026-11-06T18:18:18.986453Z",
  "link": "https://netbox.example.com/ipam/ip-addresses/2/",
  "prefix_length": 24,
  "role": "",
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1,
  "virtual_machine": "",
  "virtual_machine_id": 0,
  "vrf": ""
}
```

### Update virtual machine

Change a virtual machine's status (such as to Decommissioning), name, role, tenant, VCPUs, memory, disk, description or comments. Blank fields stay as they are.

**Inputs**

- Virtual machine (`virtual_machine`, text, required): The virtual machine: its ID (from a trigger or an earlier step), link or name.
- Status (`status`, text): A new status. Leave blank to keep it. One of: `offline`, `active`, `planned`, `staged`, `failed`, `decommissioning`, `paused`.
- Name (`name`, text): A new name. Leave blank to keep it.
- Role (`role`, text): A new role. Leave blank to keep it.
- Tenant (`tenant`, text): A new tenant. Leave blank to keep it.
- VCPUs (`vcpus`, number): How many virtual CPUs. Leave blank to keep it. At least 0.
- Memory (MB) (`memory_mb`, number): Its memory in MB. Leave blank to keep it. At least 0.
- Disk (MB) (`disk_mb`, number): Its disk space in MB. Leave blank to keep it. At least 0.
- Description (`description`, text): A new description. Leave blank to keep it.
- Comments (`comments`, text): New comments, which replace the old ones. Leave blank to keep it.

**Outputs**

- `cluster` (text): The cluster it runs on, if set
- `cluster_id` (number): The cluster's ID; 0 if none
- `comments` (text): Its comments
- `created` (text): When it was added
- `description` (text): Its description
- `disk_mb` (number): Its disk space in MB; 0 if not set
- `id` (number): The virtual machine's ID, for other NetBox steps
- `last_updated` (text): When it last changed
- `link` (text): A link to it in NetBox
- `memory_mb` (number): Its memory in MB; 0 if not set
- `name` (text): Its name
- `platform` (text): Its platform, such as Ubuntu 24.04, if set
- `primary_ip` (text): Its primary IP address, with its mask
- `role` (text): Its role, if set
- `role_id` (number): The role's ID; 0 if none
- `site` (text): The site it's at, if set
- `site_id` (number): The site's ID; 0 if none
- `status` (text): Its status, such as active, offline or decommissioning
- `tenant` (text): The tenant it belongs to, if any
- `tenant_id` (number): The tenant's ID; 0 if none
- `vcpus` (number): How many virtual CPUs it has; 0 if not set

**Example output**

```json
{
  "cluster": "AMS-Cluster-1",
  "cluster_id": 1,
  "comments": "",
  "created": "2026-11-06T18:18:20.100000Z",
  "description": "",
  "disk_mb": 81920,
  "id": 1,
  "last_updated": "2026-11-06T18:18:20.260158Z",
  "link": "https://netbox.example.com/virtualization/virtual-machines/1/",
  "memory_mb": 8192,
  "name": "ams-app-vm01",
  "platform": "Ubuntu 24.04",
  "primary_ip": "10.10.20.50/24",
  "role": "Server",
  "role_id": 2,
  "site": "Amsterdam DC1",
  "site_id": 1,
  "status": "active",
  "tenant": "Platform team",
  "tenant_id": 1,
  "vcpus": 4.0
}
```
