Skip to content

API responses missing read-only fields (e.g., family) upon creation #21533

@chbndrhnns

Description

@chbndrhnns

NetBox Edition

NetBox Community

NetBox Version

v4.5.3

Python Version

3.12

Steps to Reproduce

When creating IP-related objects (Prefix, IPAddress, Aggregate, IPRange) via the REST API, read-only fields like family are unexpectedly omitted from the returned JSON response.

  1. Submit a POST request to create a new Prefix (e.g., {"prefix": "192.168.0.0/24"}).
  2. Inspect the HTTP 201 response payload.
  3. Note that the family attribute is missing from the response, even though it should be a read-only field included in the serialized output.

Expected Behavior

The API response should contain the family attribute (and any other similarly calculated fields) immediately upon object creation.

Observed Behavior

The API response is missing family attribute (and any other similarly calculated fields) immediately upon object creation.

Metadata

Metadata

Assignees

Labels

netboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions