Workspace Members
Retrieve a Workspace Member
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
Audit Logs
OpenAPI
Retrieve a Workspace Member
GET
/
admin
/
workspaces
/
{workspaceId}
/
users
/
{userId}
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Get user from workspace
user = portkey.admin.workspaces.users.retrieve(
workspace_id="WORKSPACE_SLUG",
user_id="USER_ID"
)
print(user)
{
"object": "workspace_member",
"user_id": "61e08f60-4822-465e-ba23-39f85cd741cb",
"user": {
"object": "user",
"id": "61e08f60-4822-465e-ba23-39f85cd741cb",
"first_name": "horace",
"last_name": "slughorn",
"email": "[email protected]"
},
"role": "admin",
"created_at": "2024-01-25 11:35:07",
"last_updated_at": "2024-01-25 11:35:07"
}
Authorizations
Response
200 - application/json
OK
The response is of type object
.
Was this page helpful?
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Get user from workspace
user = portkey.admin.workspaces.users.retrieve(
workspace_id="WORKSPACE_SLUG",
user_id="USER_ID"
)
print(user)
{
"object": "workspace_member",
"user_id": "61e08f60-4822-465e-ba23-39f85cd741cb",
"user": {
"object": "user",
"id": "61e08f60-4822-465e-ba23-39f85cd741cb",
"first_name": "horace",
"last_name": "slughorn",
"email": "[email protected]"
},
"role": "admin",
"created_at": "2024-01-25 11:35:07",
"last_updated_at": "2024-01-25 11:35:07"
}