%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
\ifdefined\pdfpxdimen
   \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=.75bp\relax

\PassOptionsToPackage{warn}{textcomp}
\usepackage[utf8]{inputenc}
\ifdefined\DeclareUnicodeCharacter
% support both utf8 and utf8x syntaxes
  \ifdefined\DeclareUnicodeCharacterAsOptional
    \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
  \else
    \let\sphinxDUC\DeclareUnicodeCharacter
  \fi
  \sphinxDUC{00A0}{\nobreakspace}
  \sphinxDUC{2500}{\sphinxunichar{2500}}
  \sphinxDUC{2502}{\sphinxunichar{2502}}
  \sphinxDUC{2514}{\sphinxunichar{2514}}
  \sphinxDUC{251C}{\sphinxunichar{251C}}
  \sphinxDUC{2572}{\textbackslash}
\fi
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amstext}
\usepackage{babel}



\usepackage{times}
\expandafter\ifx\csname T@LGR\endcsname\relax
\else
% LGR was declared as font encoding
  \substitutefont{LGR}{\rmdefault}{cmr}
  \substitutefont{LGR}{\sfdefault}{cmss}
  \substitutefont{LGR}{\ttdefault}{cmtt}
\fi
\expandafter\ifx\csname T@X2\endcsname\relax
  \expandafter\ifx\csname T@T2A\endcsname\relax
  \else
  % T2A was declared as font encoding
    \substitutefont{T2A}{\rmdefault}{cmr}
    \substitutefont{T2A}{\sfdefault}{cmss}
    \substitutefont{T2A}{\ttdefault}{cmtt}
  \fi
\else
% X2 was declared as font encoding
  \substitutefont{X2}{\rmdefault}{cmr}
  \substitutefont{X2}{\sfdefault}{cmss}
  \substitutefont{X2}{\ttdefault}{cmtt}
\fi


\usepackage[Bjarne]{fncychap}
\usepackage{sphinx}

\fvset{fontsize=\small}
\usepackage{geometry}


% Include hyperref last.
\usepackage{hyperref}
% Fix anchor placement for figures with captions.
\usepackage{hypcap}% it must be loaded after hyperref.
% Set up styles of URL: it should be placed after hyperref.
\urlstyle{same}


\usepackage{sphinxmessages}




\title{flower Documentation}
\date{Jul 14, 2020}
\release{1.0.1}
\author{Mher Movsisyan}
\newcommand{\sphinxlogo}{\vbox{}}
\renewcommand{\releasename}{Release}
\makeindex
\begin{document}

\pagestyle{empty}
\sphinxmaketitle
\pagestyle{plain}
\sphinxtableofcontents
\pagestyle{normal}
\phantomsection\label{\detokenize{index::doc}}


Flower is a web based tool for monitoring and administrating \sphinxhref{http://celeryproject.org}{Celery} clusters


\chapter{Features}
\label{\detokenize{index:features}}\begin{itemize}
\item {} 
Real\sphinxhyphen{}time monitoring using Celery Events
\begin{itemize}
\item {} 
Task progress and history

\item {} 
Ability to show task details (arguments, start time, runtime, and more)

\item {} 
Graphs and statistics

\end{itemize}

\item {} 
Remote Control
\begin{itemize}
\item {} 
View worker status and statistics

\item {} 
Shutdown and restart worker instances

\item {} 
Control worker pool size and autoscale settings

\item {} 
View and modify the queues a worker instance consumes from

\item {} 
View currently running tasks

\item {} 
View scheduled tasks (ETA/countdown)

\item {} 
View reserved and revoked tasks

\item {} 
Apply time and rate limits

\item {} 
Configuration viewer

\item {} 
Revoke or terminate tasks

\end{itemize}

\item {} 
Broker monitoring
\begin{itemize}
\item {} 
View statistics for all Celery queues

\item {} 
Queue length graphs

\end{itemize}

\item {} 
HTTP API

\item {} 
Basic Auth, GitHub OAuth2 and Google OpenID authentication

\item {} 
Prometheus integration

\end{itemize}


\section{Contents}
\label{\detokenize{index:contents}}

\subsection{Features}
\label{\detokenize{features:features}}\label{\detokenize{features::doc}}\begin{itemize}
\item {} 
Real\sphinxhyphen{}time monitoring using Celery Events
\begin{itemize}
\item {} 
Task progress and history

\item {} 
Ability to show task details (arguments, start time, runtime, and more)

\item {} 
Graphs and statistics

\end{itemize}

\item {} 
Remote Control
\begin{itemize}
\item {} 
View worker status and statistics

\item {} 
Shutdown and restart worker instances

\item {} 
Control worker pool size and autoscale settings

\item {} 
View and modify the queues a worker instance consumes from

\item {} 
View currently running tasks

\item {} 
View scheduled tasks (ETA/countdown)

\item {} 
View reserved and revoked tasks

\item {} 
Apply time and rate limits

\item {} 
Configuration viewer

\item {} 
Revoke or terminate tasks

\end{itemize}

\item {} 
Broker monitoring
\begin{itemize}
\item {} 
View statistics for all Celery queues

\item {} 
Queue length graphs

\end{itemize}

\item {} 
HTTP API

\item {} 
Basic Auth, GitHub OAuth2 and Google OpenID authentication

\item {} 
Prometheus integration

\end{itemize}


\subsection{Screenshots}
\label{\detokenize{screenshots:screenshots}}\label{\detokenize{screenshots::doc}}
Worker dashboard:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{dashboard}.png}

Task dashboard:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{tasks}.png}

Worker tasks:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{worker-tasks}.png}

Graphs:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{monitor}.png}

Worker info:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{pool}.png}

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{broker}.png}

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{limits}.png}

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{queues}.png}

Task info:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{task}.png}

Configuration viewer:

\noindent\sphinxincludegraphics[width=1.000\linewidth]{{config}.png}


\subsection{Installation}
\label{\detokenize{install:installation}}\label{\detokenize{install::doc}}
Installing \sphinxtitleref{flower} with \sphinxhref{http://www.pip-installer.org/}{pip} is simple

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} pip install flower
\end{sphinxVerbatim}

Development version can be installed with

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} pip install https://github.com/mher/flower/zipball/master\PYGZsh{}egg=flower
\end{sphinxVerbatim}


\subsubsection{Usage}
\label{\detokenize{install:usage}}
Launch the server and open \sphinxurl{http://localhost:5555}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} flower \PYGZhy{}A proj \PYGZhy{}\PYGZhy{}port=5555
\end{sphinxVerbatim}

Or, launch from Celery

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} celery flower \PYGZhy{}A proj \PYGZhy{}\PYGZhy{}address=127.0.0.1 \PYGZhy{}\PYGZhy{}port=5555
\end{sphinxVerbatim}

Broker URL and other configuration options can be passed through the standard Celery options

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} celery flower \PYGZhy{}A proj \PYGZhy{}\PYGZhy{}broker=amqp://guest:guest@localhost:5672//
\end{sphinxVerbatim}


\subsection{Configuration}
\label{\detokenize{config:configuration}}\label{\detokenize{config::doc}}
Flower can be configured from the command line:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} flower \PYGZhy{}\PYGZhy{}auto\PYGZus{}refresh=False
\end{sphinxVerbatim}

Using \sphinxcode{\sphinxupquote{flowerconfig.py}} configuration file:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{\PYGZsh{} RabbitMQ management api}
\PYG{n}{broker\PYGZus{}api} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{http://guest:guest@localhost:15672/api/}\PYG{l+s+s1}{\PYGZsq{}}

\PYG{c+c1}{\PYGZsh{} Enable debug logging}
\PYG{n}{logging} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{DEBUG}\PYG{l+s+s1}{\PYGZsq{}}
\end{sphinxVerbatim}

Or, using the environment variables. All flower options should be
prefixed with \sphinxtitleref{FLOWER\_}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} export FLOWER\PYGZus{}BASIC\PYGZus{}AUTH=foo:bar
\end{sphinxVerbatim}

Options passed through the command line have precedence over the options
defined in the configuration file. The configuration file name and path
can be changed with {\hyperref[\detokenize{config:conf}]{\sphinxcrossref{conf}}} option.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} flower \PYGZhy{}\PYGZhy{}conf=celeryconfig.py
\end{sphinxVerbatim}


\subsubsection{Options}
\label{\detokenize{config:options}}
Standard Celery configuration settings can be overridden in the configuration
file. See \sphinxhref{http://docs.celeryproject.org/en/latest/userguide/configuration.html}{Celery Configuration reference} for a complete listing of all
the available settings, and their default values.

Celery command line options also can be passed to Flower. For example
the \sphinxtitleref{\textendash{}broker} sets the default broker URL:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} flower \PYGZhy{}A proj \PYGZhy{}\PYGZhy{}broker=amqp://guest:guest@localhost:5672//
\end{sphinxVerbatim}

For a full list of options see:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} celery \PYGZhy{}\PYGZhy{}help
\end{sphinxVerbatim}

\begin{sphinxShadowBox}
\begin{itemize}
\item {} 
\phantomsection\label{\detokenize{config:id27}}{\hyperref[\detokenize{config:address}]{\sphinxcrossref{address}}}

\item {} 
\phantomsection\label{\detokenize{config:id28}}{\hyperref[\detokenize{config:auth}]{\sphinxcrossref{auth}}}

\item {} 
\phantomsection\label{\detokenize{config:id29}}{\hyperref[\detokenize{config:auto-refresh}]{\sphinxcrossref{auto\_refresh}}}

\item {} 
\phantomsection\label{\detokenize{config:id30}}{\hyperref[\detokenize{config:basic-auth}]{\sphinxcrossref{basic\_auth}}}

\item {} 
\phantomsection\label{\detokenize{config:id31}}{\hyperref[\detokenize{config:broker-api}]{\sphinxcrossref{broker\_api}}}

\item {} 
\phantomsection\label{\detokenize{config:id32}}{\hyperref[\detokenize{config:ca-certs}]{\sphinxcrossref{ca\_certs}}}

\item {} 
\phantomsection\label{\detokenize{config:id33}}{\hyperref[\detokenize{config:certfile}]{\sphinxcrossref{certfile}}}

\item {} 
\phantomsection\label{\detokenize{config:id34}}{\hyperref[\detokenize{config:conf}]{\sphinxcrossref{conf}}}

\item {} 
\phantomsection\label{\detokenize{config:id35}}{\hyperref[\detokenize{config:db}]{\sphinxcrossref{db}}}

\item {} 
\phantomsection\label{\detokenize{config:id36}}{\hyperref[\detokenize{config:debug}]{\sphinxcrossref{debug}}}

\item {} 
\phantomsection\label{\detokenize{config:id37}}{\hyperref[\detokenize{config:enable-events}]{\sphinxcrossref{enable\_events}}}

\item {} 
\phantomsection\label{\detokenize{config:id38}}{\hyperref[\detokenize{config:format-task}]{\sphinxcrossref{format\_task}}}

\item {} 
\phantomsection\label{\detokenize{config:id39}}{\hyperref[\detokenize{config:inspect-timeout}]{\sphinxcrossref{inspect\_timeout}}}

\item {} 
\phantomsection\label{\detokenize{config:id40}}{\hyperref[\detokenize{config:keyfile}]{\sphinxcrossref{keyfile}}}

\item {} 
\phantomsection\label{\detokenize{config:id41}}{\hyperref[\detokenize{config:max-workers}]{\sphinxcrossref{max\_workers}}}

\item {} 
\phantomsection\label{\detokenize{config:id42}}{\hyperref[\detokenize{config:max-tasks}]{\sphinxcrossref{max\_tasks}}}

\item {} 
\phantomsection\label{\detokenize{config:id43}}{\hyperref[\detokenize{config:natural-time}]{\sphinxcrossref{natural\_time}}}

\item {} 
\phantomsection\label{\detokenize{config:id44}}{\hyperref[\detokenize{config:persistent}]{\sphinxcrossref{persistent}}}

\item {} 
\phantomsection\label{\detokenize{config:id45}}{\hyperref[\detokenize{config:port}]{\sphinxcrossref{port}}}

\item {} 
\phantomsection\label{\detokenize{config:id46}}{\hyperref[\detokenize{config:xheaders}]{\sphinxcrossref{xheaders}}}

\item {} 
\phantomsection\label{\detokenize{config:id47}}{\hyperref[\detokenize{config:tasks-columns}]{\sphinxcrossref{tasks\_columns}}}

\item {} 
\phantomsection\label{\detokenize{config:id48}}{\hyperref[\detokenize{config:url-prefix}]{\sphinxcrossref{url\_prefix}}}

\item {} 
\phantomsection\label{\detokenize{config:id49}}{\hyperref[\detokenize{config:unix-socket}]{\sphinxcrossref{unix\_socket}}}

\item {} 
\phantomsection\label{\detokenize{config:id50}}{\hyperref[\detokenize{config:cookie-secret}]{\sphinxcrossref{cookie\_secret}}}

\item {} 
\phantomsection\label{\detokenize{config:id51}}{\hyperref[\detokenize{config:auth-provider}]{\sphinxcrossref{auth\_provider}}}

\item {} 
\phantomsection\label{\detokenize{config:id52}}{\hyperref[\detokenize{config:purge-offline-workers}]{\sphinxcrossref{purge\_offline\_workers}}}

\end{itemize}
\end{sphinxShadowBox}


\paragraph{address}
\label{\detokenize{config:address}}\label{\detokenize{config:id1}}
Run the http server on a given address


\paragraph{auth}
\label{\detokenize{config:auth}}\label{\detokenize{config:id2}}
Enables authentication. \sphinxtitleref{auth} is a regexp of emails to grant access.
For more info see \DUrole{xref,std,std-ref}{authentication}.


\paragraph{auto\_refresh}
\label{\detokenize{config:auto-refresh}}\label{\detokenize{config:id3}}
Refresh dashboards automatically (by default, \sphinxtitleref{auto\_refresh=True})


\paragraph{basic\_auth}
\label{\detokenize{config:basic-auth}}\label{\detokenize{config:id4}}
Enables HTTP Basic authentication. \sphinxtitleref{basic\_auth} is a comma separated list
of \sphinxtitleref{username:password}. See {\hyperref[\detokenize{auth:basic-auth}]{\sphinxcrossref{\DUrole{std,std-ref}{HTTP Basic Authentication}}}} for more info.


\paragraph{broker\_api}
\label{\detokenize{config:broker-api}}\label{\detokenize{config:id5}}
Flower uses \sphinxhref{https://www.rabbitmq.com/management.html}{RabbitMQ Management Plugin} to get info about queues.
\sphinxtitleref{broker\_api} is a URL of RabbitMQ HTTP API including user credentials.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} flower \PYGZhy{}A proj \PYGZhy{}\PYGZhy{}broker\PYGZus{}api=http://username:password@rabbitmq\PYGZhy{}server\PYGZhy{}name:15672/api/
\end{sphinxVerbatim}

\begin{sphinxadmonition}{note}{Note:}
By default the management plugin is not enabled. To enable it run:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} rabbitmq\PYGZhy{}plugins enable rabbitmq\PYGZus{}management
\end{sphinxVerbatim}
\end{sphinxadmonition}

\begin{sphinxadmonition}{note}{Note:}
The port number for RabbitMQ versions prior to 3.0 is 55672.
\end{sphinxadmonition}


\paragraph{ca\_certs}
\label{\detokenize{config:ca-certs}}\label{\detokenize{config:id6}}
A path to \sphinxtitleref{ca\_certs} file. The \sphinxtitleref{ca\_certs} file contains a set of concatenated “certification authority”
certificates, which are used to validate certificates passed from the other end of the connection.
For more info see \sphinxhref{https://docs.python.org/3.4/library/ssl.html}{Python SSL}


\paragraph{certfile}
\label{\detokenize{config:certfile}}\label{\detokenize{config:id7}}
A path to SSL certificate file


\paragraph{conf}
\label{\detokenize{config:conf}}\label{\detokenize{config:id8}}
A path to the configuration file (by default, \sphinxcode{\sphinxupquote{flowerconfig.py}})


\paragraph{db}
\label{\detokenize{config:db}}\label{\detokenize{config:id9}}
A database file to use if persistent mode is enabled
(by default, \sphinxtitleref{db=flower})


\paragraph{debug}
\label{\detokenize{config:debug}}\label{\detokenize{config:id10}}
Enable the debug mode (by default, \sphinxtitleref{debug=False})


\paragraph{enable\_events}
\label{\detokenize{config:enable-events}}\label{\detokenize{config:id11}}
Periodically enable Celery events by using \sphinxtitleref{enable\_events} command
(by default, \sphinxtitleref{enable\_event=True})


\paragraph{format\_task}
\label{\detokenize{config:format-task}}\label{\detokenize{config:id12}}
Modifies the default task formatting. \sphinxtitleref{format\_task} function should be
defined in the \sphinxtitleref{flowerconfig.py} configuration file. It accepts a task
object and returns the modified version.

\sphinxtitleref{format\_task} is useful for filtering out sensitive information.

The example below shows how to filter arguments and limit display lengths:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kn}{from} \PYG{n+nn}{flower}\PYG{n+nn}{.}\PYG{n+nn}{utils}\PYG{n+nn}{.}\PYG{n+nn}{template} \PYG{k+kn}{import} \PYG{n}{humanize}

\PYG{k}{def} \PYG{n+nf}{format\PYGZus{}task}\PYG{p}{(}\PYG{n}{task}\PYG{p}{)}\PYG{p}{:}
    \PYG{n}{task}\PYG{o}{.}\PYG{n}{args} \PYG{o}{=} \PYG{n}{humanize}\PYG{p}{(}\PYG{n}{task}\PYG{o}{.}\PYG{n}{args}\PYG{p}{,} \PYG{n}{length}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)}
    \PYG{n}{task}\PYG{o}{.}\PYG{n}{kwargs}\PYG{o}{.}\PYG{n}{pop}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{credit\PYGZus{}card\PYGZus{}number}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}
    \PYG{n}{task}\PYG{o}{.}\PYG{n}{result} \PYG{o}{=} \PYG{n}{humanize}\PYG{p}{(}\PYG{n}{task}\PYG{o}{.}\PYG{n}{result}\PYG{p}{,} \PYG{n}{length}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{)}
    \PYG{k}{return} \PYG{n}{task}
\end{sphinxVerbatim}


\paragraph{inspect\_timeout}
\label{\detokenize{config:inspect-timeout}}\label{\detokenize{config:id13}}
Sets worker inspect timeout (by default, \sphinxtitleref{inspect\_timeout=1000}
in milliseconds)


\paragraph{keyfile}
\label{\detokenize{config:keyfile}}\label{\detokenize{config:id14}}
A path to SSL key file


\paragraph{max\_workers}
\label{\detokenize{config:max-workers}}\label{\detokenize{config:id15}}
Maximum number of workers to keep in memory (by default, \sphinxtitleref{max\_workers=5000})


\paragraph{max\_tasks}
\label{\detokenize{config:max-tasks}}\label{\detokenize{config:id16}}
Maximum number of tasks to keep in memory (by default, \sphinxtitleref{max\_tasks=10000})


\paragraph{natural\_time}
\label{\detokenize{config:natural-time}}\label{\detokenize{config:id17}}
Show time relative to the refresh time (by default, \sphinxtitleref{natural\_time=True})


\paragraph{persistent}
\label{\detokenize{config:persistent}}\label{\detokenize{config:id18}}
Enable persistent mode. If the persistent mode is enabled Flower saves
the current state and reloads on restart (by default, \sphinxtitleref{persistent=False})


\paragraph{port}
\label{\detokenize{config:port}}\label{\detokenize{config:id19}}
Run the http server on a given port (by default, \sphinxtitleref{port=5555})


\paragraph{xheaders}
\label{\detokenize{config:xheaders}}\label{\detokenize{config:id20}}
Enable support of \sphinxtitleref{X\sphinxhyphen{}Real\sphinxhyphen{}Ip} and \sphinxtitleref{X\sphinxhyphen{}Scheme} headers
(by default, \sphinxtitleref{xheaders=False})


\paragraph{tasks\_columns}
\label{\detokenize{config:tasks-columns}}\label{\detokenize{config:id21}}
Specifies list of comma\sphinxhyphen{}delimited columns on \sphinxtitleref{/tasks/} page. \sphinxtitleref{all} value
enables all columns. Columns on the page can be reordered using drag and drop.

(by default, \sphinxtitleref{tasks\_columns=”name,uuid,state,args,kwargs,result,received,started,runtime,worker”})

Available columns are:
\begin{itemize}
\item {} 
\sphinxtitleref{name}

\item {} 
\sphinxtitleref{uuid}

\item {} 
\sphinxtitleref{state}

\item {} 
\sphinxtitleref{args}

\item {} 
\sphinxtitleref{kwargs}

\item {} 
\sphinxtitleref{result}

\item {} 
\sphinxtitleref{received}

\item {} 
\sphinxtitleref{started}

\item {} 
\sphinxtitleref{runtime}

\item {} 
\sphinxtitleref{worker}

\item {} 
\sphinxtitleref{retries}

\item {} 
\sphinxtitleref{revoked}

\item {} 
\sphinxtitleref{exception}

\item {} 
\sphinxtitleref{expires}

\item {} 
\sphinxtitleref{eta}

\end{itemize}


\paragraph{url\_prefix}
\label{\detokenize{config:url-prefix}}\label{\detokenize{config:id22}}
Enables deploying Flower on non\sphinxhyphen{}root URL

For example to access Flower on \sphinxurl{http://example.com/flower} run it with:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} flower \PYGZhy{}\PYGZhy{}url\PYGZus{}prefix=flower
\end{sphinxVerbatim}

NOTE: The old \sphinxtitleref{nginx} rewrite is no longer needed


\paragraph{unix\_socket}
\label{\detokenize{config:unix-socket}}\label{\detokenize{config:id23}}
Run flower using UNIX socket file


\paragraph{cookie\_secret}
\label{\detokenize{config:cookie-secret}}\label{\detokenize{config:id24}}
Set a secret key for signing cookies


\paragraph{auth\_provider}
\label{\detokenize{config:auth-provider}}\label{\detokenize{config:id25}}
Sets authentication provider
\begin{itemize}
\item {} 
Google \sphinxtitleref{flower.views.auth.GoogleAuth2LoginHandler}

\item {} 
GitHub \sphinxtitleref{flower.views.auth.GithubLoginHandler}

\item {} 
GitLab \sphinxtitleref{flower.views.auth.GitLabLoginHandler}

\end{itemize}

See \sphinxtitleref{Authentication} for usage examples


\paragraph{purge\_offline\_workers}
\label{\detokenize{config:purge-offline-workers}}\label{\detokenize{config:id26}}
Time (in seconds) after which offline workers are automatically removed from dashboard.

If omitted, offline workers remain on the dashboard.


\subsection{Tasks filtering}
\label{\detokenize{tasks_filter:tasks-filtering}}\label{\detokenize{tasks_filter::doc}}
By now, tasks can be filtered by worker, type, state, received and started datetime.
Also, filtering by args/kwargs/result/state value available.


\subsubsection{Task filter syntax}
\label{\detokenize{tasks_filter:task-filter-syntax}}
Flower uses github\sphinxhyphen{}style syntax for args/kwargs/result filtering.
\begin{itemize}
\item {} 
\sphinxtitleref{foo} find all tasks containing foo in args, kwargs or result

\item {} 
\sphinxtitleref{args:foo} find all tasks containing foo in arguments

\item {} 
\sphinxtitleref{kwargs:foo=bar} find all tasks containing foo=bar keyword

\item {} 
\sphinxtitleref{result:foo} find all tasks containing foo in result

\item {} 
\sphinxtitleref{state:FAILURE} find all failed tasks

\end{itemize}

If the search term contains spaces it should be enclosed in ” (e.g. \sphinxtitleref{args:”hello world”}).

For examples, see \sphinxtitleref{tests/utils/test\_search.py}.


\subsection{API Reference}
\label{\detokenize{api:api-reference}}\label{\detokenize{api::doc}}

\begin{fulllineitems}
\phantomsection\label{\detokenize{api:get--api-workers}}\pysigline{\sphinxbfcode{\sphinxupquote{GET~}}\sphinxbfcode{\sphinxupquote{/api/workers}}}
List workers

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{GET} \PYG{n+nn}{/api/workers} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{1526}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}
\PYG{n+na}{Date}\PYG{o}{:} \PYG{l}{Tue, 28 Jul 2015 01:32:38 GMT}
\PYG{n+na}{Etag}\PYG{o}{:} \PYG{l}{\PYGZdq{}fcdd75d85a82b4052275e28871d199aac1ece21c\PYGZdq{}}
\PYG{n+na}{Server}\PYG{o}{:} \PYG{l}{TornadoServer/4.0.2}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}celery@worker1\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
        \PYG{n+nt}{\PYGZdq{}active\PYGZus{}queues\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
            \PYG{p}{\PYGZob{}}
                \PYG{n+nt}{\PYGZdq{}alias\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}auto\PYGZus{}delete\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}binding\PYGZus{}arguments\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}bindings\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}durable\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{true}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}exchange\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                    \PYG{n+nt}{\PYGZdq{}arguments\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}auto\PYGZus{}delete\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}delivery\PYGZus{}mode\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}durable\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{true}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery\PYGZdq{}}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}passive\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}type\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}direct\PYGZdq{}}
                \PYG{p}{\PYGZcb{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}exclusive\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery\PYGZdq{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}no\PYGZus{}ack\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}queue\PYGZus{}arguments\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}routing\PYGZus{}key\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery\PYGZdq{}}
            \PYG{p}{\PYGZcb{}}
        \PYG{p}{]}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}conf\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
            \PYG{n+nt}{\PYGZdq{}CELERYBEAT\PYGZus{}SCHEDULE\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{p}{\PYGZcb{}}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}CELERY\PYGZus{}INCLUDE\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
                \PYG{l+s+s2}{\PYGZdq{}celery.app.builtins\PYGZdq{}}\PYG{p}{,}
                \PYG{l+s+s2}{\PYGZdq{}\PYGZus{}\PYGZus{}main\PYGZus{}\PYGZus{}\PYGZdq{}}
            \PYG{p}{]}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}CELERY\PYGZus{}SEND\PYGZus{}TASK\PYGZus{}SENT\PYGZus{}EVENT\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{true}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}CELERY\PYGZus{}TIMEZONE\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}UTC\PYGZdq{}}
        \PYG{p}{\PYGZcb{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}registered\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
            \PYG{l+s+s2}{\PYGZdq{}tasks.add\PYGZdq{}}\PYG{p}{,}
            \PYG{l+s+s2}{\PYGZdq{}tasks.echo\PYGZdq{}}\PYG{p}{,}
            \PYG{l+s+s2}{\PYGZdq{}tasks.error\PYGZdq{}}\PYG{p}{,}
            \PYG{l+s+s2}{\PYGZdq{}tasks.retry\PYGZdq{}}\PYG{p}{,}
            \PYG{l+s+s2}{\PYGZdq{}tasks.sleep\PYGZdq{}}
        \PYG{p}{]}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}stats\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
            \PYG{n+nt}{\PYGZdq{}broker\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                \PYG{n+nt}{\PYGZdq{}alternates\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}connect\PYGZus{}timeout\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}heartbeat\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}hostname\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}127.0.0.1\PYGZdq{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}insist\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}login\PYGZus{}method\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}AMQPLAIN\PYGZdq{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}port\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{5672}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}ssl\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}transport\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}amqp\PYGZdq{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}transport\PYGZus{}options\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{p}{\PYGZcb{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}uri\PYGZus{}prefix\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}userid\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}guest\PYGZdq{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}virtual\PYGZus{}host\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}/\PYGZdq{}}
            \PYG{p}{\PYGZcb{}}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}clock\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}918\PYGZdq{}}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}pid\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{90494}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}pool\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                \PYG{n+nt}{\PYGZdq{}max\PYGZhy{}concurrency\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}max\PYGZhy{}tasks\PYGZhy{}per\PYGZhy{}child\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}N/A\PYGZdq{}}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}processes\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
                    \PYG{l+m+mi}{90499}\PYG{p}{,}
                    \PYG{l+m+mi}{90500}\PYG{p}{,}
                    \PYG{l+m+mi}{90501}\PYG{p}{,}
                    \PYG{l+m+mi}{90502}
                \PYG{p}{]}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}put\PYGZhy{}guarded\PYGZhy{}by\PYGZhy{}semaphore\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{false}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}timeouts\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
                    \PYG{l+m+mi}{0}\PYG{p}{,}
                    \PYG{l+m+mi}{0}
                \PYG{p}{]}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}writes\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                    \PYG{n+nt}{\PYGZdq{}all\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}100.00\PYGZpc{}\PYGZdq{}}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}avg\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}100.00\PYGZpc{}\PYGZdq{}}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}inqueues\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                        \PYG{n+nt}{\PYGZdq{}active\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
                        \PYG{n+nt}{\PYGZdq{}total\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4}
                    \PYG{p}{\PYGZcb{}}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}raw\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}1\PYGZdq{}}\PYG{p}{,}
                    \PYG{n+nt}{\PYGZdq{}total\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1}
                \PYG{p}{\PYGZcb{}}
            \PYG{p}{\PYGZcb{}}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}prefetch\PYGZus{}count\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{16}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}rusage\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                \PYG{n+nt}{\PYGZdq{}idrss\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}inblock\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{211}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}isrss\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}ixrss\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}majflt\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}maxrss\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{26996736}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}minflt\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{11450}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}msgrcv\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{4968}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}msgsnd\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1227}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}nivcsw\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1367}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}nsignals\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}nswap\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}nvcsw\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1855}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}oublock\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{93}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}stime\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{0.414564}\PYG{p}{,}
                \PYG{n+nt}{\PYGZdq{}utime\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{0.975726}
            \PYG{p}{\PYGZcb{}}\PYG{p}{,}
            \PYG{n+nt}{\PYGZdq{}total\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
                \PYG{n+nt}{\PYGZdq{}tasks.add\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1}
            \PYG{p}{\PYGZcb{}}
        \PYG{p}{\PYGZcb{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}timestamp\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1438049312.073402}
    \PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{refresh}} \textendash{} run inspect to get updated list of workers

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{workername}} \textendash{} get info for workername

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{status}} \textendash{} only get worker status info

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-shutdown-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/shutdown/(.+)}}}
Shut down a worker

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/worker/shutdown/celery@worker2} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{0}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{29}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Shutting down!\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-pool-restart-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/pool/restart/(.+)}}}
Restart worker’s pool

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/worker/pool/restart/celery@worker2} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{0}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{56}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Restarting \PYGZsq{}celery@worker2\PYGZsq{} worker\PYGZsq{}s pool\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.4}{403 Forbidden} \textendash{} pool restart is not enabled (see CELERYD\_POOL\_RESTARTS)

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-pool-grow-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/pool/grow/(.+)}}}
Grow worker’s pool

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/worker/pool/grow/celery@worker2?n=3} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{0}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{58}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Growing \PYGZsq{}celery@worker2\PYGZsq{} worker\PYGZsq{}s pool by 3\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{n}} \textendash{} number of pool processes to grow, default is 1

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.4}{403 Forbidden} \textendash{} failed to grow

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-pool-shrink-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/pool/shrink/(.+)}}}
Shrink worker’s pool

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/worker/pool/shrink/celery@worker2} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{0}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{60}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Shrinking \PYGZsq{}celery@worker2\PYGZsq{} worker\PYGZsq{}s pool by 1\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{n}} \textendash{} number of pool processes to shrink, default is 1

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.4}{403 Forbidden} \textendash{} failed to shrink

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-pool-autoscale-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/pool/autoscale/(.+)}}}
Autoscale worker pool

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/worker/pool/autoscale/celery@worker2?min=3\PYGZam{}max=10} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{0}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/x\PYGZhy{}www\PYGZhy{}form\PYGZhy{}urlencoded; charset=utf\PYGZhy{}8}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{66}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Autoscaling \PYGZsq{}celery@worker2\PYGZsq{} worker (min=3, max=10)\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{min}} \textendash{} minimum number of pool processes

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{max}} \textendash{} maximum number of pool processes

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.4}{403 Forbidden} \textendash{} autoscaling is not enabled (see CELERYD\_AUTOSCALER)

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-queue-add-consumer-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/queue/add\sphinxhyphen{}consumer/(.+)}}}
Start consuming from a queue

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
POST /api/worker/queue/add\PYGZhy{}consumer/celery@worker2?queue=sample\PYGZhy{}queue
Content\PYGZhy{}Length: 0
Content\PYGZhy{}Type: application/x\PYGZhy{}www\PYGZhy{}form\PYGZhy{}urlencoded; charset=utf\PYGZhy{}8
Host: localhost:5555
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{40}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}add consumer sample\PYGZhy{}queue\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{queue}} \textendash{} the name of a new queue

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.4}{403 Forbidden} \textendash{} failed to add consumer

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-worker-queue-cancel-consumer-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/worker/queue/cancel\sphinxhyphen{}consumer/(.+)}}}
Stop consuming from a queue

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
POST /api/worker/queue/cancel\PYGZhy{}consumer/celery@worker2?queue=sample\PYGZhy{}queue
Content\PYGZhy{}Length: 0
Content\PYGZhy{}Type: application/x\PYGZhy{}www\PYGZhy{}form\PYGZhy{}urlencoded; charset=utf\PYGZhy{}8
Host: localhost:5555
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{52}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}no longer consuming from sample\PYGZhy{}queue\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{queue}} \textendash{} the name of queue

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.4}{403 Forbidden} \textendash{} failed to cancel consumer

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:get--api-tasks}}\pysigline{\sphinxbfcode{\sphinxupquote{GET~}}\sphinxbfcode{\sphinxupquote{/api/tasks}}}
List tasks

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{GET} \PYG{n+nn}{/api/tasks} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\PYG{n+na}{User\PYGZhy{}Agent}\PYG{o}{:} \PYG{l}{HTTPie/0.8.0}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{1109}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}
\PYG{n+na}{Etag}\PYG{o}{:} \PYG{l}{\PYGZdq{}b2478118015c8b825f7b88ce6b660e5449746c37\PYGZdq{}}
\PYG{n+na}{Server}\PYG{o}{:} \PYG{l}{TornadoServer/3.1.1}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}e42ceb2d\PYGZhy{}8730\PYGZhy{}47b5\PYGZhy{}8b4d\PYGZhy{}8e0d2a1ef7c9\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
        \PYG{n+nt}{\PYGZdq{}args\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}[3, 4]\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}client\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}clock\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1079}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}eta\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}exception\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}exchange\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}expires\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}failed\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}kwargs\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}\PYGZob{}\PYGZcb{}\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}tasks.add\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}received\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505411.107885}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}result\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}\PYGZsq{}7\PYGZsq{}\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}retried\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}retries\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}revoked\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}routing\PYGZus{}key\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}runtime\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{0.01610181899741292}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}sent\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}started\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505411.108985}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}SUCCESS\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}succeeded\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505411.124802}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}timestamp\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505411.124802}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}traceback\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}uuid\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}e42ceb2d\PYGZhy{}8730\PYGZhy{}47b5\PYGZhy{}8b4d\PYGZhy{}8e0d2a1ef7c9\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}worker\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery@worker1\PYGZdq{}}
    \PYG{p}{\PYGZcb{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}f67ea225\PYGZhy{}ae9e\PYGZhy{}42a8\PYGZhy{}90b0\PYGZhy{}5de0b24507e0\PYGZdq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}
        \PYG{n+nt}{\PYGZdq{}args\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}[1, 2]\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}client\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}clock\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{1042}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}eta\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}exception\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}exchange\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}expires\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}failed\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}kwargs\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}\PYGZob{}\PYGZcb{}\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}tasks.add\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}received\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505395.327208}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}result\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}\PYGZsq{}3\PYGZsq{}\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}retried\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}retries\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}revoked\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}routing\PYGZus{}key\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}runtime\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{0.012884548006695695}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}sent\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}started\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505395.3289}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}SUCCESS\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}succeeded\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505395.341089}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}timestamp\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1398505395.341089}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}traceback\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}uuid\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}f67ea225\PYGZhy{}ae9e\PYGZhy{}42a8\PYGZhy{}90b0\PYGZhy{}5de0b24507e0\PYGZdq{}}\PYG{p}{,}
        \PYG{n+nt}{\PYGZdq{}worker\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery@worker1\PYGZdq{}}
    \PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{limit}} \textendash{} maximum number of tasks

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{workername}} \textendash{} filter task by workername

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{taskname}} \textendash{} filter tasks by taskname

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{state}} \textendash{} filter tasks by state

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{received\_start}} \textendash{} filter tasks by received date (must be greater than) format \%Y\sphinxhyphen{}\%m\sphinxhyphen{}\%d \%H:\%M

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{received\_end}} \textendash{} filter tasks by received date (must be less than) format \%Y\sphinxhyphen{}\%m\sphinxhyphen{}\%d \%H:\%M

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:get--api-task-types}}\pysigline{\sphinxbfcode{\sphinxupquote{GET~}}\sphinxbfcode{\sphinxupquote{/api/task/types}}}
List (seen) task types

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{GET} \PYG{n+nn}{/api/task/types} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{44}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}task\PYGZhy{}types\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
        \PYG{l+s+s2}{\PYGZdq{}tasks.add\PYGZdq{}}\PYG{p}{,}
        \PYG{l+s+s2}{\PYGZdq{}tasks.sleep\PYGZdq{}}
    \PYG{p}{]}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:get--api-queues-length}}\pysigline{\sphinxbfcode{\sphinxupquote{GET~}}\sphinxbfcode{\sphinxupquote{/api/queues/length}}}
Return length of all active queues

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
GET /api/queues/length
Host: localhost:5555
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{94}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}active\PYGZus{}queues\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}
        \PYG{p}{\PYGZob{}}\PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery\PYGZdq{}}\PYG{p}{,} \PYG{n+nt}{\PYGZdq{}messages\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{0}\PYG{p}{\PYGZcb{}}\PYG{p}{,}
        \PYG{p}{\PYGZob{}}\PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}video\PYGZhy{}queue\PYGZdq{}}\PYG{p}{,} \PYG{n+nt}{\PYGZdq{}messages\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{\PYGZcb{}}
    \PYG{p}{]}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.5.4}{503 Service Unavailable} \textendash{} result backend is not configured

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:get--api-task-info-(.*)}}\pysigline{\sphinxbfcode{\sphinxupquote{GET~}}\sphinxbfcode{\sphinxupquote{/api/task/info/(.*)}}}
Get a task info

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{GET} \PYG{n+nn}{/api/task/info/91396550\PYGZhy{}c228\PYGZhy{}4111\PYGZhy{}9da4\PYGZhy{}9d88cfd5ddc6} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Accept}\PYG{o}{:} \PYG{l}{*/*}
\PYG{n+na}{Accept\PYGZhy{}Encoding}\PYG{o}{:} \PYG{l}{gzip, deflate, compress}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{575}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}args\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}[2, 2]\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}client\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}clock\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{25}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}eta\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}exception\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}exchange\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}expires\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}failed\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}kwargs\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}\PYGZob{}\PYGZcb{}\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}name\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}tasks.add\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}received\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1400806241.970742}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}result\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}\PYGZsq{}4\PYGZsq{}\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}retried\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}retries\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}revoked\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}routing\PYGZus{}key\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}runtime\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{2.0037889280356467}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}sent\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}started\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1400806241.972624}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}SUCCESS\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}succeeded\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1400806243.975336}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}task\PYGZhy{}id\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}91396550\PYGZhy{}c228\PYGZhy{}4111\PYGZhy{}9da4\PYGZhy{}9d88cfd5ddc6\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}timestamp\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mf}{1400806243.975336}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}traceback\PYGZdq{}}\PYG{p}{:} \PYG{k+kc}{null}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}worker\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}celery@worker1\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown task

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-apply-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/apply/(.+)}}}
Execute a task by name and wait results

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/task/apply/tasks.add} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Accept}\PYG{o}{:} \PYG{l}{application/json}
\PYG{n+na}{Accept\PYGZhy{}Encoding}\PYG{o}{:} \PYG{l}{gzip, deflate, compress}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{16}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=utf\PYGZhy{}8}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}args\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{71}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}SUCCESS\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}task\PYGZhy{}id\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}c60be250\PYGZhy{}fe52\PYGZhy{}48df\PYGZhy{}befb\PYGZhy{}ac66174076e6\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}result\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{3}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{args}} \textendash{} a list of arguments

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{kwargs}} \textendash{} a dictionary of arguments

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown task

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-async-apply-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/async\sphinxhyphen{}apply/(.+)}}}
Execute a task

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/task/async\PYGZhy{}apply/tasks.add} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Accept}\PYG{o}{:} \PYG{l}{application/json}
\PYG{n+na}{Accept\PYGZhy{}Encoding}\PYG{o}{:} \PYG{l}{gzip, deflate, compress}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{16}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=utf\PYGZhy{}8}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}args\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{71}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}
\PYG{n+na}{Date}\PYG{o}{:} \PYG{l}{Sun, 13 Apr 2014 15:55:00 GMT}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}PENDING\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}task\PYGZhy{}id\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}abc300c7\PYGZhy{}2922\PYGZhy{}4069\PYGZhy{}97b6\PYGZhy{}a635cc2ac47c\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{args}} \textendash{} a list of arguments

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{kwargs}} \textendash{} a dictionary of arguments

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{options}} \textendash{} a dictionary of \sphinxtitleref{apply\_async} keyword arguments

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown task

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-send-task-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/send\sphinxhyphen{}task/(.+)}}}
Execute a task by name (doesn’t require task sources)

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/task/send\PYGZhy{}task/tasks.add} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Accept}\PYG{o}{:} \PYG{l}{application/json}
\PYG{n+na}{Accept\PYGZhy{}Encoding}\PYG{o}{:} \PYG{l}{gzip, deflate, compress}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{16}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=utf\PYGZhy{}8}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}args\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{71}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}SUCCESS\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}task\PYGZhy{}id\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}c60be250\PYGZhy{}fe52\PYGZhy{}48df\PYGZhy{}befb\PYGZhy{}ac66174076e6\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{args}} \textendash{} a list of arguments

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{kwargs}} \textendash{} a dictionary of arguments

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown task

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:get--api-task-result-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{GET~}}\sphinxbfcode{\sphinxupquote{/api/task/result/(.+)}}}
Get a task result

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{GET} \PYG{n+nn}{/api/task/result/c60be250\PYGZhy{}fe52\PYGZhy{}48df\PYGZhy{}befb\PYGZhy{}ac66174076e6} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{84}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}result\PYGZdq{}}\PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}state\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}SUCCESS\PYGZdq{}}\PYG{p}{,}
    \PYG{n+nt}{\PYGZdq{}task\PYGZhy{}id\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}c60be250\PYGZhy{}fe52\PYGZhy{}48df\PYGZhy{}befb\PYGZhy{}ac66174076e6\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{timeout}} \textendash{} how long to wait, in seconds, before the operation times out

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.5.4}{503 Service Unavailable} \textendash{} result backend is not configured

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-abort-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/abort/(.+)}}}
Abort a running task

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/task/abort/c60be250\PYGZhy{}fe52\PYGZhy{}48df\PYGZhy{}befb\PYGZhy{}ac66174076e6} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{61}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Aborted \PYGZsq{}1480b55c\PYGZhy{}b8b2\PYGZhy{}462c\PYGZhy{}985e\PYGZhy{}24af3e9158f9\PYGZsq{}\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.5.4}{503 Service Unavailable} \textendash{} result backend is not configured

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-timeout-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/timeout/(.+)}}}
Change soft and hard time limits for a task

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/task/timeout/tasks.sleep} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{44}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/x\PYGZhy{}www\PYGZhy{}form\PYGZhy{}urlencoded; charset=utf\PYGZhy{}8}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}

soft=30\PYGZam{}hard=100\PYGZam{}workername=celery\PYGZpc{}40worker1
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{46}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}time limits set successfully\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{workername}} \textendash{} worker name

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown task/worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-rate-limit-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/rate\sphinxhyphen{}limit/(.+)}}}
Change rate limit for a task

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n+nf}{POST} \PYG{n+nn}{/api/task/rate\PYGZhy{}limit/tasks.sleep} \PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{41}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/x\PYGZhy{}www\PYGZhy{}form\PYGZhy{}urlencoded; charset=utf\PYGZhy{}8}
\PYG{n+na}{Host}\PYG{o}{:} \PYG{l}{localhost:5555}

ratelimit=200\PYGZam{}workername=celery\PYGZpc{}40worker1
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{61}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}new rate limit set successfully\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{workername}} \textendash{} worker name

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.5}{404 Not Found} \textendash{} unknown task/worker

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\begin{fulllineitems}
\phantomsection\label{\detokenize{api:post--api-task-revoke-(.+)}}\pysigline{\sphinxbfcode{\sphinxupquote{POST~}}\sphinxbfcode{\sphinxupquote{/api/task/revoke/(.+)}}}
Revoke a task

\sphinxstylestrong{Example request}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
POST /api/task/revoke/1480b55c\PYGZhy{}b8b2\PYGZhy{}462c\PYGZhy{}985e\PYGZhy{}24af3e9158f9?terminate=true
Content\PYGZhy{}Length: 0
Content\PYGZhy{}Type: application/x\PYGZhy{}www\PYGZhy{}form\PYGZhy{}urlencoded; charset=utf\PYGZhy{}8
Host: localhost:5555
\end{sphinxVerbatim}

\sphinxstylestrong{Example response}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{HTTP}\PYG{o}{/}\PYG{l+m}{1.1} \PYG{l+m}{200} \PYG{n+ne}{OK}
\PYG{n+na}{Content\PYGZhy{}Length}\PYG{o}{:} \PYG{l}{61}
\PYG{n+na}{Content\PYGZhy{}Type}\PYG{o}{:} \PYG{l}{application/json; charset=UTF\PYGZhy{}8}

\PYG{p}{\PYGZob{}}
    \PYG{n+nt}{\PYGZdq{}message\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}Revoked \PYGZsq{}1480b55c\PYGZhy{}b8b2\PYGZhy{}462c\PYGZhy{}985e\PYGZhy{}24af3e9158f9\PYGZsq{}\PYGZdq{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\begin{quote}\begin{description}
\item[{Query Parameters}] \leavevmode\begin{itemize}
\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{terminate}} \textendash{} terminate the task if it is running

\item {} 
\sphinxstyleliteralstrong{\sphinxupquote{signal}} \textendash{} name of signal to send to process if terminate (default: ‘SIGTERM’)

\end{itemize}

\item[{Request Headers}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{https://tools.ietf.org/html/rfc7235\#section-4.2}{Authorization} \textendash{} optional OAuth token to authenticate

\end{itemize}

\item[{Status Codes}] \leavevmode\begin{itemize}
\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.2.1}{200 OK} \textendash{} no error

\item {} 
\sphinxhref{http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\#sec10.4.2}{401 Unauthorized} \textendash{} unauthorized request

\end{itemize}

\end{description}\end{quote}

\end{fulllineitems}



\subsection{Authentication}
\label{\detokenize{auth:id1}}\label{\detokenize{auth::doc}}
Protecting your Flower instance from unwarranted access is important
if it runs in an untrusted environment. Below, we outline the various
forms of authentication supported by Flower.


\subsubsection{HTTP Basic Authentication}
\label{\detokenize{auth:http-basic-authentication}}\label{\detokenize{auth:basic-auth}}
Securing Flower with Basic Authentication is easy.

The \sphinxtitleref{\textendash{}basic\_auth} option accepts \sphinxtitleref{user:password} pairs separated by
a comma. If configured, any client trying to access this
Flower instance will be prompted to provide the credentials specified in
this argument:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} celery flower \PYGZhy{}\PYGZhy{}basic\PYGZus{}auth=user1:password1,user2:password2
\end{sphinxVerbatim}

See also {\hyperref[\detokenize{reverse-proxy:reverse-proxy}]{\sphinxcrossref{\DUrole{std,std-ref}{Running behind reverse proxy}}}}


\subsubsection{Google OAuth 2.0}
\label{\detokenize{auth:google-oauth-2-0}}\label{\detokenize{auth:google-oauth}}
Flower supports Google OAuth 2.0. This way you can authenticate any user
with a Google account. Google OAuth 2.0 authentication is enabled using the
\sphinxtitleref{\textendash{}auth}, \sphinxtitleref{\textendash{}oauth2\_key}, \sphinxtitleref{\textendash{}oauth2\_secret} and \sphinxtitleref{\textendash{}oauth2\_redirect\_uri} options.

\sphinxtitleref{\textendash{}auth} is a regular expression, for granting access only to the specified email pattern.
\sphinxtitleref{\textendash{}oauth2\_key} and \sphinxtitleref{\textendash{}oauth2\_secret} are your credentials from your \sphinxhref{https://console.developers.google.com}{Google Developer Console}.
\sphinxtitleref{\textendash{}oauth2\_redirect\_uri} is there to specify what is the redirect\_uri associated to your key and secret

For instance, if you want to grant access to \sphinxtitleref{me@gmail.com} and \sphinxtitleref{you@gmail.com}:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} celery flower \PYGZhy{}\PYGZhy{}auth=\PYGZdq{}me@gmail.com|you@gmail.com\PYGZdq{} \PYGZhy{}\PYGZhy{}oauth2\PYGZus{}key=... \PYGZhy{}\PYGZhy{}oauth2\PYGZus{}secret=... \PYGZhy{}\PYGZhy{}oauth2\PYGZus{}redirect\PYGZus{}uri=http://flower.example.com/login
\end{sphinxVerbatim}

Alternatively, you can set environment variables instead of command line arguments:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}KEY=...
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}SECRET=...
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}REDIRECT\PYGZus{}URI=http://flower.example.com/login
\PYGZdl{} celery flower \PYGZhy{}\PYGZhy{}auth=.*@example\PYGZbs{}.com
\end{sphinxVerbatim}


\subsubsection{Okta OAuth}
\label{\detokenize{auth:okta-oauth}}\label{\detokenize{auth:github-oauth}}
Flower also supports Okta OAuth. Flower should be registered in
\textless{}\sphinxurl{https://developer.okta.com/docs/guides/add-an-external-idp/openidconnect/register-app-in-okta/}\textgreater{}
before getting started. See \sphinxhref{https://developer.okta.com/docs/reference/api/oidc/}{Okta OAuth API} docs for more info.

Okta OAuth should be activated using \sphinxtitleref{\textendash{}auth\_provider} option.
The client id, secret and redirect uri should be provided using
\sphinxtitleref{\textendash{}oauth2\_key}, \sphinxtitleref{\textendash{}oauth2\_secret}, \sphinxtitleref{\textendash{}oauth2\_redirect\_uri} options or using
\sphinxtitleref{FLOWER\_OAUTH2\_KEY}, \sphinxtitleref{FLOWER\_OAUTH2\_SECRET}, \sphinxtitleref{FLOWER\_OAUTH2\_REDIRECT\_URI} environment variables.
\begin{quote}
\begin{description}
\item[{The URL from which OAuth2 API URLs will be built should be set using \sphinxtitleref{FLOWER\_OAUTH2\_OKTA\_BASE\_URL}}] \leavevmode
environment variable:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}KEY=7956724aafbf5e1a93ac
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}SECRET=f9155f764b7e466c445931a6e3cc7a42c4ce47be
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}REDIRECT\PYGZus{}URI=http://localhost:5555/login
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}OKTA\PYGZus{}BASE\PYGZus{}URL=https://my\PYGZhy{}company.okta.com/oauth2
\PYGZdl{} celery flower \PYGZhy{}\PYGZhy{}auth\PYGZus{}provider=flower.views.auth.OktaLoginHandler \PYGZhy{}\PYGZhy{}auth=.*@example\PYGZbs{}.com
\end{sphinxVerbatim}

\end{description}
\end{quote}


\subsubsection{GitHub OAuth}
\label{\detokenize{auth:id2}}
Flower also supports GitHub OAuth. Flower should be registered in
\textless{}\sphinxurl{https://github.com/settings/applications/new}\textgreater{} before getting started.
See \sphinxhref{https://developer.github.com/v3/oauth/}{GitHub OAuth API} docs for more info.

GitHub OAuth should be activated using \sphinxtitleref{\textendash{}auth\_provider} option.
The client id, secret and redirect uri should be provided using
\sphinxtitleref{\textendash{}oauth2\_key}, \sphinxtitleref{\textendash{}oauth2\_secret} and \sphinxtitleref{\textendash{}oauth2\_redirect\_uri} options or using
\sphinxtitleref{FLOWER\_OAUTH2\_KEY}, \sphinxtitleref{FLOWER\_OAUTH2\_SECRET} and \sphinxtitleref{FLOWER\_OAUTH2\_REDIRECT\_URI}
environment variables.

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}KEY=7956724aafbf5e1a93ac
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}SECRET=f9155f764b7e466c445931a6e3cc7a42c4ce47be
\PYGZdl{} export FLOWER\PYGZus{}OAUTH2\PYGZus{}REDIRECT\PYGZus{}URI=http://localhost:5555/login
\PYGZdl{} celery flower \PYGZhy{}\PYGZhy{}auth\PYGZus{}provider=flower.views.auth.GithubLoginHandler \PYGZhy{}\PYGZhy{}auth=.*@example\PYGZbs{}.com
\end{sphinxVerbatim}


\subsubsection{GitLab OAuth}
\label{\detokenize{auth:gitlab-oauth}}\label{\detokenize{auth:id3}}
Flower also supports GitLab OAuth. Flower should be registered in
\textless{}\sphinxurl{https://gitlab.com/profile/applications}\textgreater{} before getting started.
See \sphinxhref{https://docs.gitlab.com/ee/api/oauth2.html}{GitLab OAuth2 API} docs for more info.

GitLab OAuth should be activated using \sphinxtitleref{\textendash{}auth\_provider} option.
The client id, secret and redirect uri should be provided using
\sphinxtitleref{\textendash{}oauth2\_key}, \sphinxtitleref{\textendash{}oauth2\_secret} and \sphinxtitleref{\textendash{}oauth2\_redirect\_uri} options or using
\sphinxtitleref{FLOWER\_OAUTH2\_KEY}, \sphinxtitleref{FLOWER\_OAUTH2\_SECRET} and \sphinxtitleref{FLOWER\_OAUTH2\_REDIRECT\_URI}
environment variables.
\begin{description}
\item[{A list of allowed GitLab groups can be specified using the}] \leavevmode
\sphinxtitleref{FLOWER\_GITLAB\_AUTH\_ALLOWED\_GROUPS} environment variable (e.g. \sphinxcode{\sphinxupquote{group1,group2/subgroup}}).

\end{description}

The default minimum required group access level can be changes by
\sphinxtitleref{FLOWER\_GITLAB\_MIN\_ACCESS\_LEVEL} environment variable.
See \sphinxhref{https://docs.gitlab.com/ee/api/members.html}{Group and project members API} for details.
\begin{quote}

\$ export FLOWER\_OAUTH2\_KEY=7956724aafbf5e1a93ac
\$ export FLOWER\_OAUTH2\_SECRET=f9155f764b7e466c445931a6e3cc7a42c4ce47be
\$ export FLOWER\_OAUTH2\_REDIRECT\_URI=http://localhost:5555/login
\$ export FLOWER\_GITLAB\_AUTH\_ALLOWED\_GROUPS=group1,group2/subgroup
\$ celery flower \textendash{}auth\_provider=flower.views.auth.GitLabLoginHandler \textendash{}auth=.*@example.com
\end{quote}


\subsection{Running behind reverse proxy}
\label{\detokenize{reverse-proxy:running-behind-reverse-proxy}}\label{\detokenize{reverse-proxy:reverse-proxy}}\label{\detokenize{reverse-proxy::doc}}
To run \sphinxtitleref{Flower} behind a reverse proxy, remember to set the correct \sphinxtitleref{Host}
header to the request to make sure Flower can generate correct URLs.
The following is a minimal \sphinxtitleref{nginx} configuration:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k}{server} \PYG{p}{\PYGZob{}}
    \PYG{k+kn}{listen} \PYG{l+m+mi}{80}\PYG{p}{;}
    \PYG{k+kn}{server\PYGZus{}name} \PYG{l+s}{flower.example.com}\PYG{p}{;}
    \PYG{k+kn}{charset} \PYG{l+s}{utf\PYGZhy{}8}\PYG{p}{;}

    \PYG{k+kn}{location} \PYG{l+s}{/} \PYG{p}{\PYGZob{}}
        \PYG{k+kn}{proxy\PYGZus{}pass} \PYG{l+s}{http://localhost:5555}\PYG{p}{;}
        \PYG{k+kn}{proxy\PYGZus{}set\PYGZus{}header} \PYG{l+s}{Host} \PYG{n+nv}{\PYGZdl{}host}\PYG{p}{;}
        \PYG{k+kn}{proxy\PYGZus{}redirect} \PYG{n+no}{off}\PYG{p}{;}
        \PYG{k+kn}{proxy\PYGZus{}http\PYGZus{}version} \PYG{l+m+mi}{1}\PYG{l+s}{.1}\PYG{p}{;}
        \PYG{k+kn}{proxy\PYGZus{}set\PYGZus{}header} \PYG{l+s}{Upgrade} \PYG{n+nv}{\PYGZdl{}http\PYGZus{}upgrade}\PYG{p}{;}
        \PYG{k+kn}{proxy\PYGZus{}set\PYGZus{}header} \PYG{l+s}{Connection} \PYG{l+s}{\PYGZdq{}upgrade\PYGZdq{}}\PYG{p}{;}
    \PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

Note that you should not expose this site to the public internet without
any sort of authentication! If you have a \sphinxtitleref{htpasswd} file with user
credentials you can make \sphinxtitleref{nginx} use this file by adding the following
lines to the location block:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k}{auth\PYGZus{}basic} \PYG{l+s}{\PYGZdq{}Restricted\PYGZdq{}}\PYG{p}{;}
\PYG{k}{auth\PYGZus{}basic\PYGZus{}user\PYGZus{}file} \PYG{l+s}{htpasswd}\PYG{p}{;}
\end{sphinxVerbatim}


\subsection{Docker Usage}
\label{\detokenize{docker:docker-usage}}\label{\detokenize{docker::doc}}
To run Flower via Docker, you’ll need a broker running.  If you don’t
have one, you can fire up a simple Redis instance with Docker from the
official Redis image.
\begin{quote}

\$ docker run \textendash{}name localredis \sphinxhyphen{}p 6379:6379 \textendash{}rm \sphinxhyphen{}d redis
\end{quote}

Now, clone this repository, build flower from the Dockerfile, start the
container and open \sphinxurl{http://localhost:49555}

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYGZdl{} docker build \PYGZhy{}t \PYGZdq{}flower\PYGZdq{} .
\PYGZdl{} docker run \PYGZhy{}d \PYGZhy{}p=49555:5555 \PYGZhy{}\PYGZhy{}rm \PYGZhy{}\PYGZhy{}name flower \PYGZhy{}e CELERY\PYGZus{}BROKER\PYGZus{}URL=redis://0.0.0.0:6379/0 flower flower \PYGZhy{}\PYGZhy{}port=5555
\end{sphinxVerbatim}

For more information about running with Docker see
\sphinxurl{http://docs.docker.io/en/latest/}

Flower is Open Source and licensed under the \sphinxhref{http://www.opensource.org/licenses/BSD-3-Clause}{BSD License}.


\renewcommand{\indexname}{HTTP Routing Table}
\begin{sphinxtheindex}
\let\bigletter\sphinxstyleindexlettergroup
\bigletter{/api}
\item\relax\sphinxstyleindexentry{GET /api/queues/length}\sphinxstyleindexpageref{api:\detokenize{get--api-queues-length}}
\item\relax\sphinxstyleindexentry{GET /api/task/info/(.*)}\sphinxstyleindexpageref{api:\detokenize{get--api-task-info-(.*)}}
\item\relax\sphinxstyleindexentry{GET /api/task/result/(.+)}\sphinxstyleindexpageref{api:\detokenize{get--api-task-result-(.+)}}
\item\relax\sphinxstyleindexentry{GET /api/task/types}\sphinxstyleindexpageref{api:\detokenize{get--api-task-types}}
\item\relax\sphinxstyleindexentry{GET /api/tasks}\sphinxstyleindexpageref{api:\detokenize{get--api-tasks}}
\item\relax\sphinxstyleindexentry{GET /api/workers}\sphinxstyleindexpageref{api:\detokenize{get--api-workers}}
\item\relax\sphinxstyleindexentry{POST /api/task/abort/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-abort-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/task/apply/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-apply-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/task/async\sphinxhyphen{}apply/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-async-apply-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/task/rate\sphinxhyphen{}limit/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-rate-limit-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/task/revoke/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-revoke-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/task/send\sphinxhyphen{}task/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-send-task-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/task/timeout/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-task-timeout-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/pool/autoscale/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-pool-autoscale-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/pool/grow/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-pool-grow-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/pool/restart/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-pool-restart-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/pool/shrink/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-pool-shrink-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/queue/add\sphinxhyphen{}consumer/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-queue-add-consumer-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/queue/cancel\sphinxhyphen{}consumer/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-queue-cancel-consumer-(.+)}}
\item\relax\sphinxstyleindexentry{POST /api/worker/shutdown/(.+)}\sphinxstyleindexpageref{api:\detokenize{post--api-worker-shutdown-(.+)}}
\end{sphinxtheindex}

\renewcommand{\indexname}{Index}
\printindex
\end{document}