[PR #3068] [MERGED] Add child objects counts to API serializers #12495

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3068
Author: @jeremystretch
Created: 4/12/2019
Status: Merged
Merged: 4/12/2019
Merged by: @jeremystretch

Base: develop-2.6Head: 1863-api-child-counts


📝 Commits (3)

📊 Changes

26 files changed (+226 additions, -94 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 netbox/circuits/api/nested_serializers.py (+4 -2)
📝 netbox/circuits/api/serializers.py (+5 -2)
📝 netbox/circuits/api/views.py (+7 -2)
📝 netbox/circuits/tests/test_api.py (+2 -2)
📝 netbox/dcim/api/nested_serializers.py (+22 -10)
📝 netbox/dcim/api/serializers.py (+25 -12)
📝 netbox/dcim/api/views.py (+52 -11)
📝 netbox/dcim/tests/test_api.py (+10 -10)
📝 netbox/ipam/api/nested_serializers.py (+9 -4)
📝 netbox/ipam/api/serializers.py (+9 -4)
📝 netbox/ipam/api/views.py (+25 -5)
📝 netbox/ipam/tests/test_api.py (+4 -4)
📝 netbox/netbox/api.py (+3 -7)
📝 netbox/secrets/api/nested_serializers.py (+2 -1)
📝 netbox/secrets/api/serializers.py (+2 -1)
📝 netbox/secrets/api/views.py (+4 -1)
📝 netbox/secrets/tests/test_api.py (+1 -1)
📝 netbox/tenancy/api/nested_serializers.py (+2 -1)
📝 netbox/tenancy/api/serializers.py (+3 -1)

...and 6 more files

📄 Description

Closes #1863

Add child object counts to organizational objects


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/3068 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 4/12/2019 **Status:** ✅ Merged **Merged:** 4/12/2019 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.6` ← **Head:** `1863-api-child-counts` --- ### 📝 Commits (3) - [`a46b43b`](https://github.com/netbox-community/netbox/commit/a46b43bff6181856ff1a62c522d9e1ca1cfb6993) Added child counts to API serializers (WIP) - [`ad4d23f`](https://github.com/netbox-community/netbox/commit/ad4d23fa202c07c0d405dd6f2c32e4d54b568322) Replace distinct annotations with subqueries for much better performance - [`04c1945`](https://github.com/netbox-community/netbox/commit/04c1945abcb9ca652a06585c8b142b52a3f9c192) Changelog for #1863 ### 📊 Changes **26 files changed** (+226 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `netbox/circuits/api/nested_serializers.py` (+4 -2) 📝 `netbox/circuits/api/serializers.py` (+5 -2) 📝 `netbox/circuits/api/views.py` (+7 -2) 📝 `netbox/circuits/tests/test_api.py` (+2 -2) 📝 `netbox/dcim/api/nested_serializers.py` (+22 -10) 📝 `netbox/dcim/api/serializers.py` (+25 -12) 📝 `netbox/dcim/api/views.py` (+52 -11) 📝 `netbox/dcim/tests/test_api.py` (+10 -10) 📝 `netbox/ipam/api/nested_serializers.py` (+9 -4) 📝 `netbox/ipam/api/serializers.py` (+9 -4) 📝 `netbox/ipam/api/views.py` (+25 -5) 📝 `netbox/ipam/tests/test_api.py` (+4 -4) 📝 `netbox/netbox/api.py` (+3 -7) 📝 `netbox/secrets/api/nested_serializers.py` (+2 -1) 📝 `netbox/secrets/api/serializers.py` (+2 -1) 📝 `netbox/secrets/api/views.py` (+4 -1) 📝 `netbox/secrets/tests/test_api.py` (+1 -1) 📝 `netbox/tenancy/api/nested_serializers.py` (+2 -1) 📝 `netbox/tenancy/api/serializers.py` (+3 -1) _...and 6 more files_ </details> ### 📄 Description ## Closes #1863 Add child object counts to organizational objects --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:21:54 +01:00
adam closed this issue 2025-12-29 22:21:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12495