Is your feature request related to a problem? Please describe.
Currently, command execution is exposed through REST APIs only for individual devices. With the introduction of mass command execution, there will be a requirement for an API interface to resolve target devices, trigger batch command execution, or retrieve and manage previously executed mass command operations.
This limits mass command functionality to the admin interface and prevents external systems, automation workflows, and frontend integrations from interacting with the mass command execution pipeline programmatically.
Describe the solution I would implement
I would like to expose the mass command execution workflow through REST APIs, following the same backend execution flow as the admin interface.
-
Confirmation endpoint: A confirmation endpoint to resolve and preview affected devices before creating a MassCommand operation.
POST /api/v1/controller/batch-command/confirmation/
This endpoint will accept target filters such as organization, device group, location, manual device selection, and all devices.
This acts as a dry-run step before triggering the actual batch operation.
-
Mass command execution endpoint: An endpoint to create and execute a new MassCommand.
POST /api/v1/controller/batch-command/
This endpoint will validate the selected target devices, validate the command type, and create the MassCommand operation to create child Command objects that trigger the asynchronous execution pipeline.
Supported command types may include reboot, change password and custom command.
-
Mass command listing endpoint: An endpoint to retrieve all previously executed MassCommand operations.
GET /api/v1/controller/batch-command/
This endpoint will return the list of mass command operations with their execution metadata, aggregated status, targeted devices count, and timestamps, allowing administrators or API consumers to view the history of batch command executions.
-
Mass command detail endpoint: An endpoint to retrieve a specific MassCommand operation and its execution details.
GET /api/v1/controller/batch-command/{pk}/
This endpoint will return detailed information about the selected mass command operation, including operation metadata, targeted devices, per-device execution status, command outputs, and overall execution progress.
-
Mass command deletion endpoint: An endpoint to delete an existing MassCommand operation.
DELETE /api/v1/controller/batch-command/{pk}/
This endpoint will allow authorized users to delete a previously created mass command operation record while preserving proper permission checks and validation.
Is your feature request related to a problem? Please describe.
Currently, command execution is exposed through REST APIs only for individual devices. With the introduction of mass command execution, there will be a requirement for an API interface to resolve target devices, trigger batch command execution, or retrieve and manage previously executed mass command operations.
This limits mass command functionality to the admin interface and prevents external systems, automation workflows, and frontend integrations from interacting with the mass command execution pipeline programmatically.
Describe the solution I would implement
I would like to expose the mass command execution workflow through REST APIs, following the same backend execution flow as the admin interface.
Confirmation endpoint: A confirmation endpoint to resolve and preview affected devices before creating a MassCommand operation.
This endpoint will accept target filters such as organization, device group, location, manual device selection, and all devices.
This acts as a dry-run step before triggering the actual batch operation.
Mass command execution endpoint: An endpoint to create and execute a new MassCommand.
This endpoint will validate the selected target devices, validate the command type, and create the MassCommand operation to create child Command objects that trigger the asynchronous execution pipeline.
Supported command types may include reboot, change password and custom command.
Mass command listing endpoint: An endpoint to retrieve all previously executed MassCommand operations.
This endpoint will return the list of mass command operations with their execution metadata, aggregated status, targeted devices count, and timestamps, allowing administrators or API consumers to view the history of batch command executions.
Mass command detail endpoint: An endpoint to retrieve a specific MassCommand operation and its execution details.
This endpoint will return detailed information about the selected mass command operation, including operation metadata, targeted devices, per-device execution status, command outputs, and overall execution progress.
Mass command deletion endpoint: An endpoint to delete an existing MassCommand operation.
This endpoint will allow authorized users to delete a previously created mass command operation record while preserving proper permission checks and validation.