from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# List users
users = portkey.admin.users.list()
print(users)
{
"total": 2,
"object": "list",
"data": [
{
"object": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"role": "admin",
"email": "[email protected]",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"workspace_ids": [
"<string>"
]
}
]
}from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# List users
users = portkey.admin.users.list()
print(users)
{
"total": 2,
"object": "list",
"data": [
{
"object": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"role": "admin",
"email": "[email protected]",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"workspace_ids": [
"<string>"
]
}
]
}admin, member, owner OK
2
list Show child attributes
Was this page helpful?