Create a basic flask server that:
- Has a database of unique users with usernames and passwords and access levels (user/admin)
- Has a database of workflows with specified user access.
- Generates unique API keys for each user
- Create stub REST endpoints with controlled access:
| call |
action |
access |
| /api/v1/status |
get the status of the Orchestrator |
public |
| /api/v1/workflow/get |
download the selected workflow |
user |
| /api/v1/workflow/publish |
upload the selected workflow |
user |
| /api/v1/workflow/execute |
execute the selected workflow |
user |
| /api/v1/workflow/cancel |
stop execution of the selected workflow |
user |
| /api/v1/workflow/status |
get the status of the selected workflow |
user |
| /api/v1/workflow/history |
get the git history of the selected workflow |
user |
| /api/v1/workflow/delete |
delete the selected workflow |
user |
| /api/v1/queue/status |
get the status of the queue |
user |
| /api/v1/queue/clear |
remove all tasks from the queue |
user |
| /api/v1/runners/status |
get the status of the runners |
user |
| /api/v1/runners/register |
register a runner |
user |
| /api/v1/runners/cancel |
cancel runner job |
user |
| /api/v1/runners/shutdown |
shutdown a runner |
user |
| /api/v1/events/status |
get the status of events |
user |
| /api/v1/events/push |
push a new event |
user |
| /api/v1/timers/status |
get the status of a timer |
user |
| /api/v1/timers/start |
start a new timer |
user |
| /api/v1/admin/cancel_all |
cancel all workflows, clear all tasks from the queue |
admin |
| /api/v1/admin/shutdown |
cancel all workflows and shutdown |
admin |
Create a basic flask server that: