Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat(inner-api/workspace): include tenant details in CreateWorkspace response (#21636)

Xin Zhang37e19de7ab3d
diff --git a/api/controllers/inner_api/workspace/workspace.py b/api/controllers/inner_api/workspace/workspace.py
index a2fc2d4675b..77568b75f1d 100644
--- a/api/controllers/inner_api/workspace/workspace.py
+++ b/api/controllers/inner_api/workspace/workspace.py
@@ -29,7 +29,19 @@ class EnterpriseWorkspace(Resource):
tenant_was_created.send(tenant)
- return {"message": "enterprise workspace created."}
+ resp = {
+ "id": tenant.id,
+ "name": tenant.name,
+ "plan": tenant.plan,
+ "status": tenant.status,
+ "created_at": tenant.created_at.isoformat() + "Z" if tenant.created_at else None,
+ "updated_at": tenant.updated_at.isoformat() + "Z" if tenant.updated_at else None,
+ }
+
+ return {
+ "message": "enterprise workspace created.",
+ "tenant": resp,
+ }
class EnterpriseWorkspaceNoOwnerEmail(Resource):