Unable to add a Device Interface without specifying the VDC ID #10675

Closed
opened 2025-12-29 21:34:36 +01:00 by adam · 1 comment
Owner

Originally created by @codrinb93 on GitHub (Jan 20, 2025).

Discussed in https://github.com/netbox-community/netbox/discussions/18440

Originally posted by codrinb93 January 20, 2025
I am running the following API Call at /api/dcim/interfaces/ and I am unable to specify the VDC by name and device name
When running the same API Call using the VDC id, everything works perfectly.

{
"name": "INTERFACE_NAME",
"type": "virtual",
"device": { "name": "DEVICE_NAME" },
"vdcs": [
{
"name": "VDC_NAME",
"device": { "name": "VDC_DEVICE" }
}
],
"parent": { "name": "PARENT_INTERFACE" }
}

I get the following error

{
"vdcs": [
"Incorrect type. Expected pk value, received dict."
]
}

I could run a query to find the VDC ID, but then I am also unable to filter by DEVICE NAME. I have VDCs with identical names but on different devices, so I always get multiple answers to my query.

Originally created by @codrinb93 on GitHub (Jan 20, 2025). ### Discussed in https://github.com/netbox-community/netbox/discussions/18440 <div type='discussions-op-text'> <sup>Originally posted by **codrinb93** January 20, 2025</sup> I am running the following API Call at /api/dcim/interfaces/ and I am unable to specify the VDC by name and device name When running the same API Call using the VDC id, everything works perfectly. _{ "name": "INTERFACE_NAME", "type": "virtual", "device": { "name": "DEVICE_NAME" }, "vdcs": [ { "name": "VDC_NAME", "device": { "name": "VDC_DEVICE" } } ], "parent": { "name": "PARENT_INTERFACE" } }_ I get the following error **{ "vdcs": [ "Incorrect type. Expected pk value, received dict." ] }** I could run a query to find the VDC ID, but then I am also unable to filter by DEVICE NAME. I have VDCs with identical names but on different devices, so I always get multiple answers to my query.</div>
adam closed this issue 2025-12-29 21:34:36 +01:00
Author
Owner

@DanSheps commented on GitHub (Jan 20, 2025):

This issue is being closed as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).

@DanSheps commented on GitHub (Jan 20, 2025): This issue is being closed as it does not conform to one of the [provided templates](https://github.com/netbox-community/netbox/issues/new/choose) as required by the [contributing guide](https://github.com/netbox-community/netbox/blob/master/CONTRIBUTING.md). If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10675