7abb2b2ab5
Closes #15131 : Dynamic queryset annotations for REST API endpoints ( #15152 )
...
* Introduce RelatedObjectCountField
* Introduce get_annotations_for_serializer() and enable dynamic annotations
* Add RelatedObjectCountFields to serializers; remove static annotations from querysets
* Remove annotations cleanup logic from BriefModeMixin
* Annotate type for RelatedObjectCountField
* Remove redundant field on TagSerializer
* Add missing reverse relationship for power feeds to rack
* Refactor RelatedObjectCountField to take a single relationship name
2024-02-15 14:49:27 -05:00
b3f25a400b
Closes #15087 : Support for specifying a subset of API serializer fields ( #15122 )
...
* Enable dynamic field inclusion for REST API serializers
* Recurse through nested serializer when resolving prefetches
* Remove obsolete calls to prefetch_related() for API views
* Remove support for brief_prefetch_fields viewset attribute
* Rename query parameter
* Fixes #15133 : Fix FHRP group representation on assignments endpoint under brief mode (#15134 )
* Fixes #15133 : Fix FHRP group representation on assignments endpoint under brief mode
* Update API test
* Restore get_queryset() on BriefModeMixin, minus prefetch logic
* get_prefetches_for_serializer() should reference serializer field source if set
2024-02-14 09:28:37 -05:00
5de2dea8a6
Fixes #14816 : Ensure default contact assignment ordering is consistent
2024-01-17 13:29:04 -05:00
d77d45e795
12336 make region API calls atomic ( #13942 )
...
* 12336 make region API calls atomic
* 12336 switch to pg locks
* 12336 add locks to all views using mptt models
* 12336 fix ADVISORY_LOCK_KEYS reference
* 12336 review changes
* Tweak advisory lock numbering
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-17 10:35:01 -04:00
bbdeae0ed9
Move CustomFieldModelViewSet functionality into NetBoxModelViewSet
2022-03-09 11:44:55 -05:00
5a4fb0323b
Merge pull request #8286 from jasonyates/8285-cluster-count-tenant
...
Fixes #8285 tenant cluster count
2022-01-10 08:34:02 -05:00
e84a282aa6
Revert REST API changes from #8284
2022-01-10 08:24:45 -05:00
184b1055dc
Fixes #8285 - Cluster count missing from tenant api output
2022-01-07 20:17:43 +00:00
eaec25e6c2
Fixes #8262 - Add Cable stat for Tenant
2022-01-07 20:02:45 +00:00
8bb9f4b8a2
#1344 : Add missing object field to ContactAssignmentSerializer
2021-11-03 16:27:43 -04:00
cfb3897047
Add tags to organizational & nested group models
2021-10-21 10:51:02 -04:00
2e78568d4d
Initial work on contacts
2021-10-18 13:59:05 -04:00
1024782b9e
Rename FilterSet modules
2021-04-29 16:48:24 -04:00
664a39911c
Add custom field support for organizational models to API serializers
2021-02-25 15:58:13 -05:00
4a066a1913
Rename get_subquery() to count_related()
2020-12-17 14:47:49 -05:00
91083fd6c5
Call Coalesce() inside get_queryset()
2020-12-17 14:45:50 -05:00
3c2b2f26b9
Fixes : #5450 - Added Coalesce to viewsets for the _count functions
2020-12-15 12:50:28 -06:00
c0c5f52ed9
Reorganize REST API components under netbox app
2020-10-13 15:57:21 -04:00
fd139a77f5
Closes #4997 : Introduce OrderedDefaultRouter; move root API views to views.py
2020-08-13 12:49:49 -04:00
0f679e1f03
Closes #4871 : Specify ordering for querysets using annotate() to count related objects
2020-07-20 12:07:19 -04:00
ea9de37dd1
Remove FieldChoicesViewSet
2020-03-12 10:48:17 -04:00
a77fadd114
Renamed tenancy FilterSets
2020-01-09 20:40:32 -05:00
ade844f7a7
fixes #3428 - caching invalidation issues
...
Mitgate invalidation issues by using prefetch_related instead of select_related.
Also use invalidated_update instead of just update.
2019-08-19 01:53:39 -04:00
017a5011ec
Added '*_count' fields for child objects
2019-04-19 16:50:42 -04:00
a46b43bff6
Added child counts to API serializers (WIP)
2019-04-12 17:07:56 -04:00
29d546a3f1
Upgraded django-filter to 2.0.0
2018-11-02 13:46:28 -04:00
364bbdeab8
Merged release v2.4.5
2018-10-03 11:23:21 -04:00
aed2a3cd1b
Closes #2438 : API optimizations for tagged objects
2018-09-28 16:44:05 -04:00
980d62d579
Removed Python 2 string compatibility
2018-08-14 11:58:42 -04:00
7241783249
Started merging writable serializers (WIP)
2018-04-04 17:01:24 -04:00
198170ca48
Closes #1553 : Introduced support for bulk object creation via the API
2017-11-07 15:36:10 -05:00
f824d1eb3b
Closes #1556 : Added API endpoints listing static field choices for each app
2017-10-10 16:41:35 -04:00
87e5687d03
Closes #1203 : Implemented query filters for all models
2017-06-19 16:10:18 -04:00
f21c6bca00
Import unicode_literals
2017-05-24 11:33:11 -04:00
bb1f97abc2
Implemented static writable ModelSerializers for all models
2017-01-31 15:35:09 -05:00
12d263999b
Introduced WritableSerializerMixin
2017-01-27 14:36:13 -05:00
acfba410dd
Standardized implementation of nested ViewSets
2017-01-26 17:58:36 -05:00
062a5bfe8d
Initial work on API v2.0
2017-01-24 17:12:16 -05:00
f0a85b1dd3
Optimized API performance
2016-08-22 15:16:49 -04:00
76f0463290
Extended API to include custom fields
2016-08-22 13:20:30 -04:00
fa2ccc1c18
Initial multitenancy implementation
2016-07-26 14:58:37 -04:00