EventManager: add "on-demand" trigger

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-01-21 15:41:24 +01:00
parent 53f17b5715
commit 7b5bebc588
20 changed files with 410 additions and 49 deletions
+37
View File
@@ -2213,6 +2213,41 @@ paths:
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/DefaultResponse'
'/eventrules/run/{name}':
parameters:
- name: name
in: path
description: on-demand rule name
required: true
schema:
type: string
post:
tags:
- event manager
summary: Run an on-demand event rule
description: The rule's actions will run in background. SFTPGo will not monitor any concurrency and such. If you want to be notified at the end of the execution please add an appropriate action
operationId: run_event_rule
responses:
'202':
description: successful operation
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/ApiResponse'
example:
message: Event rule started
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/DefaultResponse'
/events/fs:
get:
tags:
@@ -4667,6 +4702,7 @@ components:
- 3
- 4
- 5
- 6
description: |
Supported event trigger types:
* `1` - Filesystem event
@@ -4674,6 +4710,7 @@ components:
* `3` - Schedule
* `4` - IP blocked
* `5` - Certificate renewal
* `6` - On demand, like schedule but executed on demand
LoginMethods:
type: string
enum: