[pdm-devel] [PATCH datacenter-manager 03/11] server: pbs-client: use `json` formatter for the snapshot list streaming api

Dominik Csapak d.csapak at proxmox.com
Fri Sep 26 09:20:23 CEST 2025


we do rely on the api to return a proper status code to determine errors
there, so we can't use the `extjs` formatter which will always return
200.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 server/src/pbs_client.rs | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/server/src/pbs_client.rs b/server/src/pbs_client.rs
index def9a4a2..c25aab88 100644
--- a/server/src/pbs_client.rs
+++ b/server/src/pbs_client.rs
@@ -101,10 +101,9 @@ impl PbsClient {
         datastore: &str,
         namespace: Option<&str>,
     ) -> Result<JsonRecords<pbs_api_types::SnapshotListItem>, anyhow::Error> {
-        let path =
-            ApiPathBuilder::new(format!("/api2/extjs/admin/datastore/{datastore}/snapshots"))
-                .maybe_arg("ns", &namespace)
-                .build();
+        let path = ApiPathBuilder::new(format!("/api2/json/admin/datastore/{datastore}/snapshots"))
+            .maybe_arg("ns", &namespace)
+            .build();
         let response = self
             .0
             .streaming_request(http::Method::GET, &path, None::<()>)
-- 
2.47.3





More information about the pdm-devel mailing list