[PR #6592] [MERGED] Closes #5264: REST API endpoint for tokens #13145

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/6592
Author: @jeremystretch
Created: 6/11/2021
Status: Merged
Merged: 6/14/2021
Merged by: @jeremystretch

Base: featureHead: 5264-tokens-api-endpoint


📝 Commits (6)

  • 48b4bf1 Initial work on REST API endpoint for tokens
  • b038b1f Add a REST API endpoint to provision new tokens using username & password
  • 37c9340 Docs and release notes for #5264
  • c36b190 Omit REST API schema view from permissions enforcement
  • fdd8e33 Revert tweak to TokenPermissions.has_permission()
  • 4c4fe80 Fix schema generation for tokens endpoint

📊 Changes

10 files changed (+240 additions, -9 deletions)

View changed files

📝 docs/release-notes/version-3.0.md (+19 -0)
📝 docs/rest-api/authentication.md (+40 -2)
📝 netbox/netbox/urls.py (+1 -0)
📝 netbox/users/api/nested_serializers.py (+10 -1)
📝 netbox/users/api/serializers.py (+29 -1)
📝 netbox/users/api/urls.py (+9 -1)
📝 netbox/users/api/views.py (+54 -1)
📝 netbox/users/filtersets.py (+12 -1)
📝 netbox/users/models.py (+2 -1)
📝 netbox/users/tests/test_api.py (+64 -1)

📄 Description

Closes: #5264

  • Add a REST API endpoint for tokens (/api/users/tokens/)
  • Add a child endpoint provision/ to facilitate the provisioning of new tokens for users without an existing token

🔄 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/6592 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 6/11/2021 **Status:** ✅ Merged **Merged:** 6/14/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `5264-tokens-api-endpoint` --- ### 📝 Commits (6) - [`48b4bf1`](https://github.com/netbox-community/netbox/commit/48b4bf1683cc2575d0729a407c2596e7c0b5b235) Initial work on REST API endpoint for tokens - [`b038b1f`](https://github.com/netbox-community/netbox/commit/b038b1f613becb0298d276fa453fe844ba9e6f1e) Add a REST API endpoint to provision new tokens using username & password - [`37c9340`](https://github.com/netbox-community/netbox/commit/37c93404993d6ca3be0300ca76e8c45099e7cd60) Docs and release notes for #5264 - [`c36b190`](https://github.com/netbox-community/netbox/commit/c36b190d5d5b12dc547ccf6a6459cc317af45fae) Omit REST API schema view from permissions enforcement - [`fdd8e33`](https://github.com/netbox-community/netbox/commit/fdd8e33b58f8ffba50dff86931a47daf396903e8) Revert tweak to TokenPermissions.has_permission() - [`4c4fe80`](https://github.com/netbox-community/netbox/commit/4c4fe80697dea9960506fc7dbad2cda920e697d8) Fix schema generation for tokens endpoint ### 📊 Changes **10 files changed** (+240 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-3.0.md` (+19 -0) 📝 `docs/rest-api/authentication.md` (+40 -2) 📝 `netbox/netbox/urls.py` (+1 -0) 📝 `netbox/users/api/nested_serializers.py` (+10 -1) 📝 `netbox/users/api/serializers.py` (+29 -1) 📝 `netbox/users/api/urls.py` (+9 -1) 📝 `netbox/users/api/views.py` (+54 -1) 📝 `netbox/users/filtersets.py` (+12 -1) 📝 `netbox/users/models.py` (+2 -1) 📝 `netbox/users/tests/test_api.py` (+64 -1) </details> ### 📄 Description ### Closes: #5264 - Add a REST API endpoint for tokens (`/api/users/tokens/`) - Add a child endpoint `provision/` to facilitate the provisioning of new tokens for users without an existing token --- <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:25:39 +01:00
adam closed this issue 2025-12-29 22:25:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13145