1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

24 Commits

Author SHA1 Message Date
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
7848beedce adds additional parameters for token provision api #12870 2023-09-01 12:33:02 -04:00
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
be2b24a155 fixes the swagger schema for token provisioning #13557 2023-08-25 09:45:03 -04:00
07f68ae579 Closes #13038: Establish DEFAULT_PERMISSIONS config parameter (#13308)
* Introduce the DEFAULT_PERMISSIONS config parameter

* Establish default permissions for user token management
2023-07-30 15:04:58 -04:00
518fd8cca6 12794 change User ref to get_user_model (#12905)
* 12794 change User ref to get_user_model

* 12794 call get_user_model once in tests

* 12794 call get_user_model once in tests

* 12794 use settings.AUTH_USER_MODEL for FK reference
2023-06-22 08:26:50 -04:00
ecd0c56554 Closes #9608: Move from drf-yasg to spectacular
Co-authored-by: arthanson <worldnomad@gmail.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-30 14:32:59 -04:00
816fedb78d 8853 Prevent the retrieval of API tokens after creation (#10645)
* 8853 hide api token

* 8853 hide key on edit

* 8853 add key display

* 8853 cleanup html

* 8853 make token view accessible only once on POST

* Clean up display of tokens in views

* Honor ALLOW_TOKEN_RETRIEVAL in API serializer

* Add docs & tweak default setting

* Include token key when provisioning with user credentials

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-02 12:45:00 -04:00
876251c1cf Fixes #9948: Fix TypeError exception when requesting API tokens list as non-authenticated user 2022-08-08 12:22:01 -04:00
36ac83a319 Fixes #9949: Fix KeyError exception resulting from invalid API token provisioning request 2022-08-08 11:43:27 -04:00
efd5a73a18 Refactor API views 2022-03-09 11:27:42 -05:00
4c4fe80697 Fix schema generation for tokens endpoint 2021-06-14 08:52:22 -04:00
b038b1f613 Add a REST API endpoint to provision new tokens using username & password 2021-06-11 15:54:31 -04:00
48b4bf1683 Initial work on REST API endpoint for tokens 2021-06-11 15:14:19 -04:00
1024782b9e Rename FilterSet modules 2021-04-29 16:48:24 -04:00
a43361170c Fix overwriting of existing preferences 2020-10-29 14:15:38 -04:00
2845dd488e Add a REST API endpoint for updating user preferences 2020-10-21 09:05:33 -04: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
46ebeba28f Set default ordering for user and group API endpoints 2020-07-23 13:46:40 -04:00
380d30e612 Add filters for ObjectPermissions 2020-07-22 16:34:16 -04:00
2cc4f032b0 Correct FilterSet naming 2020-07-22 13:48:04 -04:00
1ac215bf87 Introduce API endpoints for Users and Groups 2020-07-22 11:21:51 -04:00
3084d58da1 Add REST API endpoint for ObjectPermissions 2020-06-03 13:08:04 -04:00