Actions88
- Module Actions
- Platform Actions
- Device Actions
- Device Bay Actions
- Device Bay Template Actions
- Device Role Actions
- Device Type Actions
- Interface Actions
- Manufacturer Actions
- Module Bay Actions
- Module Bay Template Actions
- Module Type Actions
- Region Actions
- Site Actions
- Virtual Chassis Actions
- Virtual Device Context Actions
Overview
This node interacts with the NetBox API, specifically allowing users to update a Virtual Device Context within the DCIM domain. It is useful for network administrators or IT professionals who manage virtual device contexts in their infrastructure and want to automate updates such as changing names, statuses, IP addresses, or other metadata related to virtual device contexts.
Practical examples include:
- Updating the status of a virtual device context from "planned" to "active".
- Changing the primary IPv4 or IPv6 address associated with a virtual device context.
- Adding descriptive comments or tags to better organize virtual device contexts.
Properties
| Name | Meaning |
|---|---|
| Domain | The domain of the NetBox API; for this operation, it must be "DCIM". |
| Virtual Device Context ID | The unique numeric ID of the virtual device context to update. |
| Update Fields | Collection of fields to update on the virtual device context: |
| - Name | New name for the virtual device context (string). |
| - Device ID | Numeric ID of the device associated with the context. |
| - Status | Status of the virtual device context; options are "Active", "Planned", or "Offline". |
| - Identifier | Numeric identifier between 0 and 32767. |
| - Tenant ID | Numeric ID of the tenant associated with the context. |
| - Primary IPv4 Address ID | Numeric ID of the primary IPv4 address. |
| - Primary IPv6 Address ID | Numeric ID of the primary IPv6 address. |
| - Description | Text description of the virtual device context. |
| - Comments | Additional comments about the virtual device context. |
| - Tags | Comma-separated list of tag IDs to associate with the context. |
| - Custom Fields | JSON string representing custom fields for the virtual device context. |
Output
The node outputs the response from the NetBox API after attempting to update the virtual device context. This output is structured as JSON containing the updated resource data as returned by the API.
If an error occurs and "Continue on Fail" is enabled, the output will contain a JSON object with an error field describing the issue.
No binary data output is involved in this operation.
Dependencies
- Requires access to a NetBox instance with the appropriate API endpoint available.
- Requires an API authentication token credential configured in n8n to authorize requests to the NetBox API.
- The node depends on internal helper functions to execute the API operation but no external npm packages beyond those bundled.
Troubleshooting
Common issues:
- Invalid or missing Virtual Device Context ID will cause the update to fail.
- Providing invalid values for fields like status or IP address IDs may result in API errors.
- Network connectivity or authentication failures can prevent successful API calls.
Error messages:
- Errors from the NetBox API will be logged and, if "Continue on Fail" is disabled, will cause the node execution to stop.
- If "Continue on Fail" is enabled, errors are returned as part of the output JSON under the
errorkey.
Resolution tips:
- Verify that the Virtual Device Context ID exists in NetBox before updating.
- Ensure all required fields are correctly formatted and valid.
- Confirm that the API token has sufficient permissions to perform updates.
- Check network connectivity and API endpoint URL configuration.
Links and References
- NetBox API Documentation
- NetBox Virtual Device Contexts
- n8n documentation on creating and using credentials