api: annotate download endpoints

both the task and system log API endpoints support downloading the log data.

annotate the API method schema accordingly to allow passing the newly
introduced checks in the API handler that limit download functionality to
annotated endpoints.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2024-09-20 13:42:33 +02:00 committed by Thomas Lamprecht
parent b1f94095fc
commit 1258eb90b3
2 changed files with 2 additions and 0 deletions

View File

@ -815,6 +815,7 @@ __PACKAGE__->register_method({
check => ['perm', '/nodes/{node}', [ 'Sys.Syslog' ]],
},
protected => 1,
download => 1,
parameters => {
additionalProperties => 0,
properties => {

View File

@ -327,6 +327,7 @@ __PACKAGE__->register_method({
user => 'all',
},
protected => 1,
download => 1,
description => "Read task log.",
proxyto => 'node',
parameters => {