Expose kind attribute in the interfaces API #8885

Closed
opened 2025-12-29 20:42:30 +01:00 by adam · 1 comment
Owner

Originally created by @RasmusThing on GitHub (Nov 27, 2023).

NetBox version

v3.6.5

Feature type

Data model extension

Proposed functionality

Expose the kind attribute to the interfaces API endpoint (/api/dcim/interfaces/).

Use case

Currently, we can filter on the interface kind (physical, virtual, wireless) in the web interface and through the API.
(/api/dcim/interfaces/?kind=physical)
We cannot however, see the kind attribute in the API JSON data.

It would be ideal to expose this attribute for each interface in the API.

Database changes

No response

External dependencies

No response

Originally created by @RasmusThing on GitHub (Nov 27, 2023). ### NetBox version v3.6.5 ### Feature type Data model extension ### Proposed functionality Expose the `kind` attribute to the interfaces API endpoint (/api/dcim/interfaces/). ### Use case Currently, we can filter on the interface **kind** (physical, virtual, wireless) in the web interface and through the API. (/api/dcim/interfaces/?kind=physical) We cannot however, see the **kind** attribute in the API JSON data. It would be ideal to expose this attribute for each interface in the API. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 20:42:30 +01:00
adam closed this issue 2025-12-29 20:42:30 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 27, 2023):

There is no kind attribute on interfaces; this is merely a convention for filtering. It's a mechanism for grouping certain types of interfaces, e.g. physical or virtual, as you can see in the code. Type is already conveyed in the API representation of an interface.

@jeremystretch commented on GitHub (Nov 27, 2023): There is no `kind` attribute on interfaces; this is merely a convention for filtering. It's a mechanism for grouping certain types of interfaces, e.g. physical or virtual, as you can see [in the code](https://github.com/netbox-community/netbox/blob/d52a6d3b1090f408882e0875e04fb739fb492b75/netbox/dcim/filtersets.py#L1547-L1553). Type is already conveyed in the API representation of an interface.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8885