Anyone interested in developing the webui should feel free to input here.
Will either be a component of webui, or a separately enablable module that webui depends on. Webui can be rewritten as a responsive app that uses this api to interact with FlexGet. All of these endpoints will be under /api or somesuch.
When returning a list of "things" it should be formatted as
{
"items": [list of items]
}
When returning an object it should be formatted as
{
"object": {object}
}
Executions would be represented with a data structure something like this.
{
"id": <id in queue>,
"status": "running|pending",
"current_phase": "input",
"current_plugin": "rss",
}
GET
Return a list of running/pending executions.
POST
Adds an execution to the queue. Accepts options as JSON (maybe also url parameters).
Returns a stream of the log
GET
Get status of execution with given id.
GET Streams the log for execution with given id.
GET list of configured tasks
POST Add a new task
GET get config for task (other info too? e.g. last run time?)
DELETE remove task (what should happen when there are e.g. schedules using it? we probably need events python side scheduler could listen to)
PUT update task config
PATCH can be used to rename task by sending data {"name": "thenewname"}
Not quite sure how this one should go yet. I'm thinking core only provides a way to edit root level config keys (tasks, schedules, etc.) and if we need more granular editing, the plugin would be responsible for the endpoints (e.g. editing individual schedules would be handled by scheduler plugin)
This would likely be redundant, and mostly useful if plugins didn't provide better endpoints themselves
GET List all root elements in config (tasks, schedules, templates, etc.)
POST Add config for new root level config section
GET Get config under root level config section
DELETE Remove root level config section
POST Replace root level config section
GET List configured schedules
POST Add a schedule
GET Details of schedule (tasks to run, last run, next run)
PUT Modify schedule
DELETE Remove schedule
id for movie will be primary key from our database, not online provider id.
Currently movie_queue keeps downloaded movies in its database. Either we'll have to change that, or change this api a bit to have 2 endpoints for pending and grabbed lists. I think I prefer the former.
GET Return list of movies in the queue
POST Add a movie to the queue.
GET Return details for movie in queue (not metainfo from imdb etc.)
DELETE Remove movie from queue.
PUT Change details for movie in queue
GET Get list of items in history