Error "Invalid value for custom field 'Server_IP': Required field cannot be empty." when creating ipaddress via API #10646

Closed
opened 2025-12-29 21:34:08 +01:00 by adam · 5 comments
Owner

Originally created by @arnaudvre on GitHub (Jan 13, 2025).

Deployment Type

NetBox Cloud

Triage priority

N/A

NetBox Version

v4.2.0

Python Version

3.10

Steps to Reproduce

  1. POST to https://demo.netbox.dev/api/ipam/ip-addresses/ the following JSON:

{"display": "172.16.19.28/24",
"address": "172.16.19.28/24",
"tenant": {"id": 15},
"status": "active",
"assigned_object_type": "dcim.interface",
"assigned_object_id": 1640,
"assigned_object": {"id": 1640},
"description": "ONB0/3 of KVM-HOST-01"
}

Expected Behavior

Expected the IP address to be created but it resulted in this error.

Observed Behavior

The error "Invalid value for custom field 'Server_IP': Required field cannot be empty."

Originally created by @arnaudvre on GitHub (Jan 13, 2025). ### Deployment Type NetBox Cloud ### Triage priority N/A ### NetBox Version v4.2.0 ### Python Version 3.10 ### Steps to Reproduce 1. POST to https://demo.netbox.dev/api/ipam/ip-addresses/ the following JSON: {"display": "172.16.19.28/24", "address": "172.16.19.28/24", "tenant": {"id": 15}, "status": "active", "assigned_object_type": "dcim.interface", "assigned_object_id": 1640, "assigned_object": {"id": 1640}, "description": "ONB0/3 of KVM-HOST-01" } ### Expected Behavior Expected the IP address to be created but it resulted in this error. ### Observed Behavior The error "Invalid value for custom field 'Server_IP': Required field cannot be empty."
adam closed this issue 2025-12-29 21:34:08 +01:00
Author
Owner

@bctiemann commented on GitHub (Jan 14, 2025):

Thank you for opening a bug report. 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.

@bctiemann commented on GitHub (Jan 14, 2025): Thank you for opening a bug report. 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

@arnaudvre commented on GitHub (Jan 15, 2025):

Tenant id 15 and interface id1640 are not existing objects, they are ones I'm creating and getting the ids for in the POST response to then use in the POST which I've given the json data for in the steps to reproduce above. This failed consistently over the length of half a day where all I was changing were minor things in the POST json_data to create the ipaddress, then without any other change on my side it's started working as you'd expect. I've given you all the steps to reproduce, you should have been able to find errors in your logs when this happened. It suits me that the error is gone now but it's everyone's loss that we won't know what caused it until it potentially happens again.

@arnaudvre commented on GitHub (Jan 15, 2025): Tenant id 15 and interface id1640 are not existing objects, they are ones I'm creating and getting the ids for in the POST response to then use in the POST which I've given the json data for in the steps to reproduce above. This failed consistently over the length of half a day where all I was changing were minor things in the POST json_data to create the ipaddress, then without any other change on my side it's started working as you'd expect. I've given you all the steps to reproduce, you should have been able to find errors in your logs when this happened. It suits me that the error is gone now but it's everyone's loss that we won't know what caused it until it potentially happens again.
Author
Owner

@arnaudvre commented on GitHub (Jan 15, 2025):

on subsequent reruns, when an object is already created(in this case tenant and interface), I GET the object ids and I've verified that the ids being returned are the correct ones.

@arnaudvre commented on GitHub (Jan 15, 2025): on subsequent reruns, when an object is already created(in this case tenant and interface), I GET the object ids and I've verified that the ids being returned are the correct ones.
Author
Owner

@jeremystretch commented on GitHub (Jan 17, 2025):

The error "Invalid value for custom field 'Server_IP': Required field cannot be empty."

The error is telling you exactly that the problem is. You have a custom field named Server_IP on the IP address model, which is required to have a value, and you haven't provided one.

@jeremystretch commented on GitHub (Jan 17, 2025): > The error "Invalid value for custom field 'Server_IP': Required field cannot be empty." The error is telling you exactly that the problem is. You have a custom field named `Server_IP` on the IP address model, which is required to have a value, and you haven't provided one.
Author
Owner

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

ok I realize that someone on your dev instance must have been customizing the device type or something similar, my bad, thanks.

@arnaudvre commented on GitHub (Jan 20, 2025): ok I realize that someone on your dev instance must have been customizing the device type or something similar, my bad, thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10646