Skip to content

cant create vm mac-address via api #18363

@ITJamie

Description

@ITJamie

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.2.1

Python Version

3.10

Steps to Reproduce

  1. create an interface on a vm
  2. attempt to use the api to create a mac address linked to the interface id (curl example from swagger)
curl -X 'POST' \
  'https://netbox.dev.domain/api/dcim/mac-addresses/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFTOKEN:{removed}' \
  -d '{
  "mac_address": "BC:24:11:7E:0E:BF",
  "assigned_object_type": "virtualization.vminterface",
  "assigned_object_id": 1
}'

Expected Behavior

mac address gets created

Observed Behavior

400 response:

Error: Bad Request

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

Metadata

Metadata

Assignees

Labels

severity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: 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