From d3221a3315fe0cf0aa2af1497fa5a1096de45d90 Mon Sep 17 00:00:00 2001 From: Storm Timmermans Date: Tue, 29 Dec 2020 17:32:48 +0100 Subject: [PATCH] docs: manual trigger (#78) --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 10886387..75120b59 100644 --- a/README.md +++ b/README.md @@ -153,8 +153,22 @@ The following webhooks are currently provided by Autoscan: - Radarr - Lidarr +#### Manual Webhook + Autoscan also supports a `manual` webhook for custom scripts or for software which is not supported by Autoscan directly. The manual endpoint is available at `/triggers/manual`. +The manual endpoint accepts one or multiple directory paths as input and should be given one or multiple `dir` query parameters. Just like the other webhooks, the manual webhook is protected with basic authentication if the `auth` option is set in the config file of the user. + +URL template: `POST /triggers/manual?dir=$path1&dir=$path2` + +The following curl command sends a request to Autoscan to scan the directories `/test/one` and `/test/two`: + +```bash +curl --request POST \ + --url 'http://localhost:3030/triggers/manual?dir=%2Ftest%2Fone&dir=%2Ftest%2Ftwo' \ + --header 'Authorization: Basic aGVsbG8gdGhlcmU6Z2VuZXJhbCBrZW5vYmk=' +``` + #### Configuration A snippet of the `config.yml` file showcasing what is possible.