Archive workers
Refs https://redmine.teklia.com/issues/4717
Depends #1644 (closed)
An API user with admin rights on a worker should be able to archive/unarchive a worker.
We will add an archived
nullable datetime that will be set/unset to represent the worker state.
The update endpoint for worker (from #1644 (closed) ) must allow setting an archived
boolean field (when the user is admin on that worker). We do not want to set the date directly: the backend will update it instead.
We need a date to be stored to build later on an auto-deletion feature that will run asynchronously and will delete workers archived a while ago.
Only ListWorkers
endpoint must be updated to filter out the worker when archived.
You must check that an archived worker is not usable in a new worker run, or when starting a process.
We will not support the archived state on retrieve & update endpoints, only on lists, so that API users can still update them to restore them.
The ListWorkers
endpoint must support an optional query parameter archived=true|false
to allow users to list archived workers. By default, this is set to false to view unarchived workers.