unable to create a mac-address linked to a virtual machine interface via api #10563

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

Originally created by @leelists on GitHub (Dec 10, 2024).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.7

Python Version

3.12

Steps to Reproduce

POST to http://netbox:8000/api//dcim/mac-addresses/
with body :
{
"assigned_object_id" : 9,
"assigned_object_type" : "virtualization.vminterface",
"mac_address" : "BC:24:11:10:2E:1F"
}

returns {"assigned_object_id":["This field cannot be null."]}

the same action via the gui works :

tags: []
comments: ""
description: ""
mac_address: "BC:24:11:10:2E:1F"
custom_fields: {}
assigned_object_id: 9
assigned_object_type: 127

Expected Behavior

linking mac adresse to virtual interface should work via api

Observed Behavior

{"assigned_object_id":["This field cannot be null."]}

Originally created by @leelists on GitHub (Dec 10, 2024). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.1.7 ### Python Version 3.12 ### Steps to Reproduce POST to http://netbox:8000/api//dcim/mac-addresses/ with body : { "assigned_object_id" : 9, "assigned_object_type" : "virtualization.vminterface", "mac_address" : "BC:24:11:10:2E:1F" } returns {"assigned_object_id":["This field cannot be null."]} the same action via the gui works : tags: [] comments: "" description: "" mac_address: "BC:24:11:10:2E:1F" custom_fields: {} assigned_object_id: 9 assigned_object_type: 127 ### Expected Behavior linking mac adresse to virtual interface should work via api ### Observed Behavior {"assigned_object_id":["This field cannot be null."]}
adam added the type: bugpending closurestatus: revisions neededseverity: low labels 2025-12-29 21:33:09 +01:00
adam closed this issue 2025-12-29 21:33:09 +01:00
Author
Owner

@bctiemann commented on GitHub (Dec 12, 2024):

@leelists This will likely change behavior in v4.2 as MAC addresses are now handled as discrete objects in the schema rather than fields on interfaces. Could you please revisit this after 4.2 is available (or in the beta)?

@bctiemann commented on GitHub (Dec 12, 2024): @leelists This will likely change behavior in v4.2 as MAC addresses are now handled as discrete objects in the schema rather than fields on interfaces. Could you please revisit this after 4.2 is available (or in the beta)?
Author
Owner

@github-actions[bot] commented on GitHub (Dec 19, 2024):

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 (Dec 19, 2024): 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

@leelists commented on GitHub (Dec 19, 2024):

I will give the beta a try, thanks

@leelists commented on GitHub (Dec 19, 2024): I will give the beta a try, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10563