[PR #5163] [MERGED] #3436: Support for bulk deletion via REST API #12974

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5163
Author: @jeremystretch
Created: 9/22/2020
Status: Merged
Merged: 9/22/2020
Merged by: @jeremystretch

Base: develop-2.10Head: 3436-api-bulk-delete


📝 Commits (4)

  • 6694ec7 Implement support for bulk deletion of objects via a single REST API request
  • eba2ea0 Add test for bulk API deletions
  • c1b57af Monkey-patch DRF to treat bulk_destroy as a built-in operation
  • 54a4f84 Add REST API documentation for bulk object deletion

📊 Changes

5 files changed (+108 additions, -3 deletions)

View changed files

📝 docs/rest-api/overview.md (+14 -0)
📝 netbox/netbox/api.py (+11 -0)
📝 netbox/netbox/settings.py (+7 -0)
📝 netbox/utilities/api.py (+53 -3)
📝 netbox/utilities/testing/api.py (+23 -0)

📄 Description

Closes: #3436

  • Extend ModelViewSet with BulkDestroyModelMixin to support bulk deletion of objects
  • Modify OrderedDefaultRouter to accept DELETE operations on list routes
  • Monkey-patch DRF's is_custom_action() to avoid SwaggerValidationError resulting from duplicate operation IDs
  • Tests & documentation

🔄 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/5163 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 9/22/2020 **Status:** ✅ Merged **Merged:** 9/22/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.10` ← **Head:** `3436-api-bulk-delete` --- ### 📝 Commits (4) - [`6694ec7`](https://github.com/netbox-community/netbox/commit/6694ec78bc1723c2e339f53a1e26d936f541d5b0) Implement support for bulk deletion of objects via a single REST API request - [`eba2ea0`](https://github.com/netbox-community/netbox/commit/eba2ea06ffd58807e854df761884bac50a506e54) Add test for bulk API deletions - [`c1b57af`](https://github.com/netbox-community/netbox/commit/c1b57af7718f08bcef4108cb365d35a4fbd1bcbc) Monkey-patch DRF to treat bulk_destroy as a built-in operation - [`54a4f84`](https://github.com/netbox-community/netbox/commit/54a4f847081e8949717946434872b5a7fc4e1d0f) Add REST API documentation for bulk object deletion ### 📊 Changes **5 files changed** (+108 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/rest-api/overview.md` (+14 -0) 📝 `netbox/netbox/api.py` (+11 -0) 📝 `netbox/netbox/settings.py` (+7 -0) 📝 `netbox/utilities/api.py` (+53 -3) 📝 `netbox/utilities/testing/api.py` (+23 -0) </details> ### 📄 Description ### Closes: #3436 - Extend ModelViewSet with BulkDestroyModelMixin to support bulk deletion of objects - Modify OrderedDefaultRouter to accept `DELETE` operations on list routes - Monkey-patch DRF's `is_custom_action()` to avoid SwaggerValidationError resulting from duplicate operation IDs - Tests & documentation --- <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:24:40 +01:00
adam closed this issue 2025-12-29 22:24:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12974