Skip to content

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

Description

@leelists

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."]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending closureRequires immediate attention to avoid being closed for inactivityseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: revisions neededThis issue requires additional information to be actionabletype: bugA confirmed report of unexpected behavior in the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions