From c8e2bd433c51b9be50c181e83213e90e3642146e Mon Sep 17 00:00:00 2001 From: sadwitdastreetz Date: Fri, 13 Feb 2026 18:08:42 +0800 Subject: [PATCH 1/2] refactor(client): replace deprecated /profile API with graphSpace list/get logic Remove reliance on the removed '/profile' endpoint && Implement manual aggregation by listing all GraphSpaces and fetching details individually. --- .../hugegraph/api/space/GraphSpaceAPI.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java b/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java index b04408fda..ce5e0b82b 100644 --- a/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java +++ b/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java @@ -28,6 +28,7 @@ import org.apache.hugegraph.util.JsonUtil; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -71,15 +72,16 @@ public List list() { } public List> listProfile(String prefix) { - String profilePath = joinPath(this.path(), "profile"); - Map params = new LinkedHashMap<>(); - params.put("prefix", prefix); - RestResult result = this.client.get(profilePath, params); - List results = result.readList(Map.class); + List names = this.list(); List> profiles = new ArrayList<>(); - for (Object entry : results) { - profiles.add(JsonUtil.fromJson(JsonUtil.toJson(entry), Map.class)); + for (String name : names) { + if (name.startsWith(prefix)) { + GraphSpace space = this.get(name); + Map profileMap = JsonUtil.fromJson(JsonUtil.toJson(space), Map.class); + profiles.add(profileMap); + } } + return profiles; } From 01574bf7d5cd3e987e622abe02bfe9279c6fdffe Mon Sep 17 00:00:00 2001 From: sadwitdastreetz Date: Fri, 13 Feb 2026 18:16:24 +0800 Subject: [PATCH 2/2] removed unnecessary dependencies --- .../main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java b/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java index ce5e0b82b..1c12ea2e9 100644 --- a/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java +++ b/hugegraph-client/src/main/java/org/apache/hugegraph/api/space/GraphSpaceAPI.java @@ -28,9 +28,7 @@ import org.apache.hugegraph.util.JsonUtil; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map;