-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk device delete api #4209
Bulk device delete api #4209
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4209 +/- ##
==========================================
+ Coverage 78.64% 78.65% +0.01%
==========================================
Files 286 286
Lines 13119 13157 +38
Branches 2934 2948 +14
==========================================
+ Hits 10317 10349 +32
- Misses 2802 2808 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good. My only pause has been the choice of api endpoint - whether having /bulk
in the url is the right choice. I've spent some time researching other APIs to see how (and if) they support bulk operations.... and it's pretty inconclusive. Having a dedicated bulk endpoint (rather than overloading an existing api) does appear to be one common approach - so on the basis of that, lets roll with what's proposed here.
closes #4208
Description
Adds bulk operation for deleting multiple devices in a team.
Basic premise:
api/v1/devices/bulk
but there were difficulties withneedsPermission
and team membership validation (would have to be handled manually). It made sense at this time to have this as a team level API as it is to be initially implemented in the UI at the device browser component (happy to move to top level if deemed better/necessary)devices
body property must exist otherwise operation throwsdevices
body property must must be in the same team otherwise operation throwsdestroy
on whereid
inids
as a singular operationbilling.updateTeamDeviceCount
is licencedEndpoint
DELETE
/bulk
toforge/routes/api/teamDevices.js
/api/v1/team/:teamId/devices/bulk
/
e.g. DELETE/api/v1/team/:teamId/devices
devices
"team:device:bulk-delete"
Tests
Related Issue(s)
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label