Sign inSign up

gaieges/flexget

By gaieges

•Updated almost 7 years ago

Configures and enables flexget as a daemon on target

Image
0

1.7K

gaieges/flexget repository overview

⁠Flexget API docker image

This is intended to spin up a flexget process with an exposed API port purely for that purpose

⁠Intro

This image is configured to utilize environment vars for most of the configuration.

See available env vars down below.

⁠Getting started

To start up a new api, run:

docker run -it -p 5050:5050 -e FLEXGET_PASSWORD="my super password" -d gaieges/flexget 

And then simply connect to it as follows:

curl http://localhost:5050/api/auth/login/ -H content-type:application/json -i -d '{"username":"flexget", "password": "my super password"}'

You can also use the username and password directly in calls to other endpoints:

curl http://localhost:5050/api/tasks/ --user "flexget:my super password"

⁠Available env vars

At the moment, these are the only available env vars, however it utilizes confd so future env args can be easily added.

  • FLEXGET_PASSWORD: Password you want to use with flexget api. Username is flexget.
  • FLEXGET_PORT: Port you want the instance running on. Default is 5050

⁠Getting token from user

Using the above request to the /auth/login/ endpoint, you'll get a token in a cookie that looks like this:

Set-Cookie: session=BIG_STRING_HERE; HttpOnly; Path=/

This is your session token. To use the standard token calls that the api uses, get the token by doing the following:

curl localhost:5050/api/user/token/ -H "Cookie:session=BIG_STRING_HERE"

And then use the token response value as requests going forward:

curl localhost:5050/api/tasks/ -H "Authorization: Token TOKEN_FROM_RESPONSE"

Tag summary

Content type

Image

Digest

Size

54.1 MB

Last updated

almost 7 years ago

docker pull gaieges/flexget