From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7FFA41FF13A for ; Wed, 01 Apr 2026 12:01:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DA96B16CF5; Wed, 1 Apr 2026 12:01:40 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 01 Apr 2026 12:01:36 +0200 Message-Id: Subject: Re: [PATCH manager] api: backup: add return schema for backup jobs From: "Lukas Wagner" To: "Thomas Lamprecht" , "Lukas Wagner" , X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260327152015.394455-1-l.wagner@proxmox.com> <85e49408-7899-49b4-82d8-8aad320a9c04@proxmox.com> In-Reply-To: <85e49408-7899-49b4-82d8-8aad320a9c04@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1775037639367 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.600 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 1 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: O7XB64ARY4WCKLCYWMO6CYK4WIPIEUXB X-Message-ID-Hash: O7XB64ARY4WCKLCYWMO6CYK4WIPIEUXB X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed Apr 1, 2026 at 11:55 AM CEST, Thomas Lamprecht wrote: > Am 27.03.26 um 16:19 schrieb Lukas Wagner: >> The GET /cluster/backup and /cluster/backup/ endpoints were >> missing a proper return value schema. The schema properties themselves >> were copied from the POST call, but needed to be slightly adapted. >>=20 >> - 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 >>=20 >> Signed-off-by: Lukas Wagner >> --- >> PVE/API2/Backup.pm | 79 ++++++++++++++++++++++++++++++++++++++++++++-- >> 1 file changed, 76 insertions(+), 3 deletions(-) >>=20 >> 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 =3D sub { >> delete $param->{dow}; >> }; >> =20 >> +my $backup_job_return_schema =3D PVE::VZDump::Common::json_config_prope= rties({ >> + id =3D> get_standard_option('pve-backup-jobid'), >> + schedule =3D> { >> + description =3D> "Backup schedule. The format is a subset of `s= ystemd` calendar events.", >> + type =3D> 'string', >> + format =3D> 'pve-calendar-event', >> + maxLength =3D> 128, >> + optional =3D> 1, >> + }, >> + starttime =3D> { >> + type =3D> 'string', >> + description =3D> "Job Start time.", >> + pattern =3D> '\d{1,2}:\d{1,2}', >> + typetext =3D> 'HH:MM', >> + optional =3D> 1, >> + }, >> + dow =3D> { >> + type =3D> 'string', >> + format =3D> 'pve-day-of-week-list', >> + optional =3D> 1, >> + description =3D> "Day of week selection.", >> + requires =3D> 'starttime', >> + default =3D> ALL_DAYS, >> + }, > > I'd apply this with the following on-top or squashed-in, ack? ack; looks good to me! > > ----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 =3D PVE::VZDump::Common:= :json_config_properties({ > }, > starttime =3D> { > type =3D> 'string', > - description =3D> "Job Start time.", > + description =3D> "Job start-time (server timezone); deprecated a= nd replaced by schedule.", > pattern =3D> '\d{1,2}:\d{1,2}', > typetext =3D> 'HH:MM', > optional =3D> 1, > @@ -140,7 +140,7 @@ my $backup_job_return_schema =3D PVE::VZDump::Common:= :json_config_properties({ > type =3D> 'string', > format =3D> 'pve-day-of-week-list', > optional =3D> 1, > - description =3D> "Day of week selection.", > + description =3D> "Day of week selection; deprecated and replaced= by schedule.", > requires =3D> 'starttime', > default =3D> ALL_DAYS, > },