Workspaces
Retrieve a Workspace
API Reference
Virtual Keys
Prompts
- POSTCreate Prompt
- GETList Prompts
- GETRetrieve Prompt
- PUTUpdate Prompt
- DELDelete Prompt
- PUTPublish Prompt
- GETList Prompt Versions
- GETRetrieve Prompt Version
- PUTUpdate Prompt Version
- Prompt Partials
- Prompt Labels
- Prompt Collections
API Keys
Analytics [BETA]
- Summary
- Groups Paginated Data
- Graphs - Time Series Data
User Invites
Workspaces
Workspace Members
OpenAPI
Retrieve a Workspace
GET
/
admin
/
workspaces
/
{workspaceId}
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)
{
"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"
}
]
}
Authorizations
Path Parameters
Response
200 - application/json
OK
Example:
"ws-test-a-174eb1"
Example:
"ws-test-a-174eb1"
Example:
"New Workspace"
Example:
null
Example:
"2024-07-30T13:27:29.000Z"
Example:
"2024-07-30T13:27:29.000Z"
Available options:
workspace-user
Example:
"workspace-user"
Example:
"25afb7bd-f98a-11ee-85fe-0e27d7367987"
Example:
"John"
Example:
"Doe"
Available options:
admin
, member
, owner
Example:
"member"
Available options:
admin
, member
, manager
Example:
"member"
Example:
"2024-01-01T00:00:00.000Z"
Example:
"2024-01-01T00:00:00.000Z"
Available options:
active
Example:
"active"
Was this page 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)
{
"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"
}
]
}