This endoint manage all the module information:
GET methods:
/:id (get the module linked to the token)
/:id/actions (get the actions linked to the module)
POST
/ creates the module
PUT
/:id/register-action (creates an action for the module)
/:id/execute-action (requests the execution of an action)
/:id/request-status (acts like an execute action but with a default command for the modules ST)
/:id/disable (disables the module, this means it cannot execute commands)
/:id/enable (enables a disabled module)
DELETE
/:id/actions (deletes a selected action)
/:id (deletes a module and its actions)
Always consider pagination, query search (q[]), and scope filtering (using cancan maybe)
This endoint manage all the module information:
GET methods:
/:id (get the module linked to the token)
/:id/actions (get the actions linked to the module)
POST
/ creates the module
PUT
/:id/register-action (creates an action for the module)
/:id/execute-action (requests the execution of an action)
/:id/request-status (acts like an execute action but with a default command for the modules ST)
/:id/disable (disables the module, this means it cannot execute commands)
/:id/enable (enables a disabled module)
DELETE
/:id/actions (deletes a selected action)
/:id (deletes a module and its actions)
Always consider pagination, query search (q[]), and scope filtering (using cancan maybe)