Skip to content

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

@amyasnikov

Description

@amyasnikov

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.

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