public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager] api: backup: add return schema for backup jobs
Date: Wed, 1 Apr 2026 11:55:57 +0200	[thread overview]
Message-ID: <85e49408-7899-49b4-82d8-8aad320a9c04@proxmox.com> (raw)
In-Reply-To: <20260327152015.394455-1-l.wagner@proxmox.com>

Am 27.03.26 um 16:19 schrieb Lukas Wagner:
> The GET /cluster/backup and /cluster/backup/<jobid> endpoints were
> missing a proper return value schema. The schema properties themselves
> were copied from the POST call, but needed to be slightly adapted.
> 
>  - id is a pve-backup-jobid, since this is what was used before
>  - fleecing, performance and prune-backups are submitted as a property
>    string, but returned as a proper JSON object, so these needed to be
>    overridden from the base config that stems from pve-guest-common
>  - 'next-run' was added
> 
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>  PVE/API2/Backup.pm | 79 ++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 76 insertions(+), 3 deletions(-)
> 
> diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm
> index 27f5a14c..8317d0c3 100644
> --- a/PVE/API2/Backup.pm
> +++ b/PVE/API2/Backup.pm
> @@ -120,6 +120,80 @@ my $schedule_param_check = sub {
>      delete $param->{dow};
>  };
>  
> +my $backup_job_return_schema = PVE::VZDump::Common::json_config_properties({
> +    id => get_standard_option('pve-backup-jobid'),
> +    schedule => {
> +        description => "Backup schedule. The format is a subset of `systemd` calendar events.",
> +        type => 'string',
> +        format => 'pve-calendar-event',
> +        maxLength => 128,
> +        optional => 1,
> +    },
> +    starttime => {
> +        type => 'string',
> +        description => "Job Start time.",
> +        pattern => '\d{1,2}:\d{1,2}',
> +        typetext => 'HH:MM',
> +        optional => 1,
> +    },
> +    dow => {
> +        type => 'string',
> +        format => 'pve-day-of-week-list',
> +        optional => 1,
> +        description => "Day of week selection.",
> +        requires => 'starttime',
> +        default => ALL_DAYS,
> +    },

I'd apply this with the following on-top or squashed-in, ack?

----8<----
diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm
index 8317d0c38..1d6d42570 100644
--- a/PVE/API2/Backup.pm
+++ b/PVE/API2/Backup.pm
@@ -131,7 +131,7 @@ my $backup_job_return_schema = PVE::VZDump::Common::json_config_properties({
     },
     starttime => {
         type => 'string',
-        description => "Job Start time.",
+        description => "Job start-time (server timezone); deprecated and replaced by schedule.",
         pattern => '\d{1,2}:\d{1,2}',
         typetext => 'HH:MM',
         optional => 1,
@@ -140,7 +140,7 @@ my $backup_job_return_schema = PVE::VZDump::Common::json_config_properties({
         type => 'string',
         format => 'pve-day-of-week-list',
         optional => 1,
-        description => "Day of week selection.",
+        description => "Day of week selection; deprecated and replaced by schedule.",
         requires => 'starttime',
         default => ALL_DAYS,
     },




  reply	other threads:[~2026-04-01  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27 15:20 Lukas Wagner
2026-04-01  9:55 ` Thomas Lamprecht [this message]
2026-04-01 10:01   ` Lukas Wagner
2026-04-01 11:46     ` Thomas Lamprecht
2026-04-01 14:11       ` Lukas Wagner
2026-04-01 11:47 ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85e49408-7899-49b4-82d8-8aad320a9c04@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=l.wagner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal