Enable "brief" mode on all REST API endpoints #3756

Closed
opened 2025-12-29 18:31:05 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Jun 5, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.9
  • NetBox version: 2.8.5

Steps to Reproduce

  1. Perform a REST API request: GET /api/dcim/console-port-templates/?brief=1

Expected Behavior

Because the brief query parameter has been passed, the response should include only the id, name, and url fields for the objects.

Observed Behavior

The brief query parameter has no effect. This is because no nested serializer has been created for the model. The following models/endpoints are affected:

  • ConsolePortTemplate
  • ConsoleServerPortTemplate
  • DeviceBayTemplate
  • InterfaceTemplate
  • InventoryItem
  • PowerOutletTemplate
  • RackReservation
  • ConfigContext
  • ExportTemplate
  • Graph
  • Tag
  • Service
Originally created by @jeremystretch on GitHub (Jun 5, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.6.9 * NetBox version: 2.8.5 ### Steps to Reproduce 1. Perform a REST API request: `GET /api/dcim/console-port-templates/?brief=1` ### Expected Behavior Because the `brief` query parameter has been passed, the response should include only the `id`, `name`, and `url` fields for the objects. ### Observed Behavior The `brief` query parameter has no effect. This is because no nested serializer has been created for the model. The following models/endpoints are affected: - ConsolePortTemplate - ConsoleServerPortTemplate - DeviceBayTemplate - InterfaceTemplate - InventoryItem - PowerOutletTemplate - RackReservation - ConfigContext - ExportTemplate - Graph - Tag - Service
adam added the type: bugstatus: accepted labels 2025-12-29 18:31:05 +01:00
adam closed this issue 2025-12-29 18:31:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3756