diff --git a/silverback/cluster/client.py b/silverback/cluster/client.py index fd06ae8e..f4ad5f53 100644 --- a/silverback/cluster/client.py +++ b/silverback/cluster/client.py @@ -276,7 +276,7 @@ def get_cluster_client(self, cluster_name: str) -> ClusterClient: @property @cache def clusters(self) -> dict[str, ClusterInfo]: - response = self.client.get("/clusters", params=dict(org=str(self.id))) + response = self.client.get("/clusters", params=dict(workspace=str(self.id))) handle_error_with_response(response) clusters = response.json() # TODO: Support paging @@ -290,7 +290,7 @@ def create_cluster( ) -> ClusterInfo: response = self.client.post( "/clusters/", - params=dict(org=str(self.id)), + params=dict(workspace=str(self.id)), json=dict( name=cluster_name, slug=cluster_slug, @@ -331,7 +331,7 @@ def get_cluster_client(self, workspace_name: str, cluster_name: str) -> ClusterC @property @cache def workspaces(self) -> dict[str, Workspace]: - response = self.get("/organizations") + response = self.get("/workspaces") handle_error_with_response(response) workspaces = response.json() # TODO: Support paging @@ -345,7 +345,7 @@ def create_workspace( workspace_name: str = "", ) -> Workspace: response = self.post( - "/organizations", + "/workspaces", json=dict(slug=workspace_slug, name=workspace_name), ) handle_error_with_response(response) diff --git a/silverback/cluster/types.py b/silverback/cluster/types.py index 428cd371..755b7bdb 100644 --- a/silverback/cluster/types.py +++ b/silverback/cluster/types.py @@ -12,6 +12,7 @@ class WorkspaceInfo(BaseModel): owner_id: uuid.UUID name: str slug: str + created: datetime class ClusterConfiguration(BaseModel):