Last updated 10 months ago
Was this helpful?
from portkey_ai import Portkey # Initialize the Portkey client portkey = Portkey( api_key="PORTKEY_API_KEY", ) # Get workspace details workspace = portkey.admin.workspaces.retrieve( workspace_id='WORKSPACE_SLUG' ) print(workspace)
OK
{ "id": "ws-test-a-174eb1", "slug": "ws-test-a-174eb1", "name": "New Workspace", "description": null, "created_at": "2024-07-30T13:27:29.000Z", "last_updated_at": "2024-07-30T13:27:29.000Z", "defaults": { "metadata": { "foo": "bar" }, "is_default": 0, "object": "workspace" }, "users": [ { "object": "workspace-user", "id": "25afb7bd-f98a-11ee-85fe-0e27d7367987", "first_name": "John", "last_name": "Doe", "org_role": "member", "role": "member", "created_at": "2024-01-01T00:00:00.000Z", "last_updated_at": "2024-01-01T00:00:00.000Z", "status": "active" } ] }