-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.. _API Token: | ||
|
||
API Token | ||
===================== | ||
|
||
.. contents:: | ||
:local: | ||
|
||
To enable API token for Dagu, follow these steps: | ||
|
||
#. Set the environment variables to configure basic authentication: | ||
|
||
.. code-block:: bash | ||
export DAGU_IS_AUTHTOKEN=1 | ||
export DAGU_AUTHTOKEN="<arbitrary token string>" | ||
Replace ``<arbitrary token string>`` with a random string of your choice. This string will be used as the API token for Dagu. | ||
|
||
#. Alternatively, create an ``admin.yaml`` file in the ``$DAGU_HOME`` directory (default: ``$HOME/.dagu/``) to override the default configuration values. | ||
|
||
.. code-block:: yaml | ||
# API Token | ||
isAuthToken: true | ||
authToken: "<arbitrary token string>" | ||
#. You can enable HTTPS by configuring the following environment variables: | ||
|
||
.. code-block:: bash | ||
export DAGU_CERT_FILE="<path-to-cert-file>" | ||
export DAGU_KEY_FILE="<path-to-key-file>" | ||
Replace ``<path-to-cert-file>`` and ``<path-to-key-file>`` with the paths to your certificate and key files. | ||
|
||
See :ref:`Configuration Options` for more information on the configuration file. | ||
|
||
#. Enable Basic Authentication as well if you want to use the Web UI along with the API token. **Without basic authentication config, you will not be able to access the Web UI.** | ||
|
||
.. code-block:: bash | ||
export DAGU_IS_BASICAUTH=1 | ||
export DAGU_USERNAME="<username>" | ||
export DAGU_PASSWORD="<password>" | ||
Replace ``<username>`` and ``<password>`` with your username and password. | ||
|
||
See :ref:`Basic Auth` for more information on the basic authentication. | ||
|
||
See :ref:`REST API` for more information on the REST API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ Contents | |
examples | ||
config | ||
auth | ||
api_token | ||
executors | ||
scheduler | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. _REST API: | ||
|
||
REST API Docs | ||
============= | ||
|
||
|