Data Source custom fields are not available through REST API #9123

Closed
opened 2025-12-29 20:45:54 +01:00 by adam · 0 comments
Owner

Originally created by @amyasnikov on GitHub (Jan 20, 2024).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.10

Steps to Reproduce

  1. Create custom field and assign it to Data Source.
  2. Create Data Source and fill out respective custom field via GUI.
  3. Try to get the information about created Data Source through REST API - there will be no "custom_fields" field.
  4. If you try to create Data Source through REST API "custom_fields" field will be ignored.

Expected Behavior

There should be consistency in interaction with Data Sources (or any other model). If a user can assign custom fields to this model through web GUI, then the same opportunity should also exist for REST API.

All that's required to do for this issue is just add "custom_fields" here
https://github.com/netbox-community/netbox/blob/develop/netbox/core/api/serializers.py#L37

Observed Behavior

Neither reading nor changing "custom_fields" value for a Data Source is available through REST API.

Originally created by @amyasnikov on GitHub (Jan 20, 2024). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.7.1 ### Python Version 3.10 ### Steps to Reproduce 1. Create custom field and assign it to Data Source. 2. Create Data Source and fill out respective custom field via GUI. 3. Try to get the information about created Data Source through REST API - there will be no "custom_fields" field. 4. If you try to create Data Source through REST API "custom_fields" field will be ignored. ### Expected Behavior There should be consistency in interaction with Data Sources (or any other model). If a user can assign custom fields to this model through web GUI, then the same opportunity should also exist for REST API. All that's required to do for this issue is just add "custom_fields" here https://github.com/netbox-community/netbox/blob/develop/netbox/core/api/serializers.py#L37 ### Observed Behavior Neither reading nor changing "custom_fields" value for a Data Source is available through REST API.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 20:45:54 +01:00
adam closed this issue 2025-12-29 20:45:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9123