public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] api: admin s3: switch request method to put for s3 check
@ 2025-07-24  6:25 Christian Ebner
  2025-07-24 12:00 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2025-07-24  6:25 UTC (permalink / raw)
  To: pbs-devel

The s3 check does perform more than just listing contents,
so it makes more sense to define this using the PUT method
instead, following common REST API practice.

This further allows to implement a list-bucket method with
a better fitting GET method.

Note: This is a breaking api change, however currently only
internal call side is the `proxmox-backup-manager s3 check`
and no official release based on the current state.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 src/api2/admin/s3.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api2/admin/s3.rs b/src/api2/admin/s3.rs
index 9a7b08c81..1a0932945 100644
--- a/src/api2/admin/s3.rs
+++ b/src/api2/admin/s3.rs
@@ -71,7 +71,7 @@ pub async fn check(
 }
 
 #[sortable]
-const S3_OPERATION_SUBDIRS: SubdirMap = &[("check", &Router::new().get(&API_METHOD_CHECK))];
+const S3_OPERATION_SUBDIRS: SubdirMap = &[("check", &Router::new().put(&API_METHOD_CHECK))];
 
 const S3_OPERATION_ROUTER: Router = Router::new()
     .get(&list_subdirs_api_method!(S3_OPERATION_SUBDIRS))
-- 
2.47.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] api: admin s3: switch request method to put for s3 check
  2025-07-24  6:25 [pbs-devel] [PATCH proxmox-backup] api: admin s3: switch request method to put for s3 check Christian Ebner
@ 2025-07-24 12:00 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-07-24 12:00 UTC (permalink / raw)
  To: pbs-devel, Christian Ebner

On Thu, 24 Jul 2025 08:25:01 +0200, Christian Ebner wrote:
> The s3 check does perform more than just listing contents,
> so it makes more sense to define this using the PUT method
> instead, following common REST API practice.
> 
> This further allows to implement a list-bucket method with
> a better fitting GET method.
> 
> [...]

Applied, thanks!

[1/1] api: admin s3: switch request method to put for s3 check
      commit: db1a99d75efcb6be15a6c1df1efed4a05f13afa4


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-24 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-24  6:25 [pbs-devel] [PATCH proxmox-backup] api: admin s3: switch request method to put for s3 check Christian Ebner
2025-07-24 12:00 ` [pbs-devel] applied: " Thomas Lamprecht

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