Issue when adding VLANs to an interface (tagged mode) #11508

Closed
opened 2025-12-29 21:46:09 +01:00 by adam · 4 comments
Owner

Originally created by @aseques on GitHub (Aug 20, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.3.1

Python Version

3.10

Steps to Reproduce

I am trying to add the vlans to an interface, my desire would be to add them using the VID (instead of the internal ID number)

With the following query (extracted from the swagger sample) i ge

curl -X 'PATCH' \
  'https://netbox.example.com/api/dcim/interfaces/890/' \
  -H 'accept: application/json' \
  -H 'Authorization: 90b2c577da4bbd9bfbfb650c18e0a2a4d7e811d6' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFTOKEN: kv9maAk6k8CAhJbWrF8IXyy8JAYzIoYbARAPdEqQ80BzaozAc3q7hXCNhtGQ0Rrh' \
  -d '{
  "tagged_vlans": [
    32  ]
}'

I get this reply, becase the VLAN32 has the internal ID 22 (different from this one)

{
  "tagged_vlans": [
    "Invalid pk \"32\" - object does not exist."
  ]
}

Is there any way to PATCH the interface with the proper VLAN but using the VIDs?

Expected Behavior

VLAN 32 should be added to the interface

Observed Behavior

There's an error about the wrong ID for the VLAN given

Originally created by @aseques on GitHub (Aug 20, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.3.1 ### Python Version 3.10 ### Steps to Reproduce I am trying to add the vlans to an interface, my desire would be to add them using the VID (instead of the internal ID number) With the following query (extracted from the swagger sample) i ge ``` curl -X 'PATCH' \ 'https://netbox.example.com/api/dcim/interfaces/890/' \ -H 'accept: application/json' \ -H 'Authorization: 90b2c577da4bbd9bfbfb650c18e0a2a4d7e811d6' \ -H 'Content-Type: application/json' \ -H 'X-CSRFTOKEN: kv9maAk6k8CAhJbWrF8IXyy8JAYzIoYbARAPdEqQ80BzaozAc3q7hXCNhtGQ0Rrh' \ -d '{ "tagged_vlans": [ 32 ] }' ``` I get this reply, becase the VLAN32 has the internal ID 22 (different from this one) ``` { "tagged_vlans": [ "Invalid pk \"32\" - object does not exist." ] } ``` Is there any way to PATCH the interface with the proper VLAN but using the VIDs? ### Expected Behavior VLAN 32 should be added to the interface ### Observed Behavior There's an error about the wrong ID for the VLAN given
adam added the type: bugpending closurestatus: revisions needed labels 2025-12-29 21:46:09 +01:00
adam closed this issue 2025-12-29 21:46:09 +01:00
Author
Owner

@arthanson commented on GitHub (Aug 20, 2025):

@aseques It sounds like you are asking a question or asking for a feature change not an actual bug? If so, please close this and open either a discussion or feature request.

Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@arthanson commented on GitHub (Aug 20, 2025): @aseques It sounds like you are asking a question or asking for a feature change not an actual bug? If so, please close this and open either a discussion or feature request. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 28, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Aug 28, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@aseques commented on GitHub (Aug 31, 2025):

Hi @arthanson it might be a feature or a documentation I couldn't find, I will try to make a reproducible case as you request.

@aseques commented on GitHub (Aug 31, 2025): Hi @arthanson it might be a feature or a documentation I couldn't find, I will try to make a reproducible case as you request.
Author
Owner

@jeremystretch commented on GitHub (Sep 29, 2025):

Closing this out due to inactivity.

@jeremystretch commented on GitHub (Sep 29, 2025): Closing this out due to inactivity.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11508