[pbs-devel] [PATCH proxmox-backup] api: admin s3: switch request method to put for s3 check

Christian Ebner c.ebner at proxmox.com
Thu Jul 24 08:25:01 CEST 2025


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 at 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





More information about the pbs-devel mailing list