aces / cbrain

CBRAIN is a flexible Ruby on Rails framework for accessing and processing of large data on high-performance computing infrastructures.
GNU General Public License v3.0
71 stars 43 forks source link

Implement API support for 'destroy task'. #1437

Open prioux opened 14 hours ago

prioux commented 14 hours ago

It's missing in our controller.

We need a way to delete individual tasks, or sets of them.

We also need to document it in the swagger specification, so that python and ruby (and other languages) can build clients that support the action.

prioux commented 14 hours ago

So some observations. There is no def destroy (it's explicitly removed in the routes file) , instead there is def operation which receives a parameter operation=delete.

The code has error handling and results that all assume the client is a browser (so with redirects etc).

We probably can just open up the 'operation' action to API request and make sure we return proper JSON all the time.