Retrieve All Users

Get users

get
Authorizations
Query parameters
pageSizeintegerOptionalExample: 1
currentPageintegerOptionalExample: 0
rolestring · enumOptionalExample: adminPossible values:
emailstring · emailOptionalExample: [email protected]
Header parameters
x-portkey-api-keystringOptionalExample: {{PORTKEY_API_KEY}}
Responses
200
OK
application/json
get
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)
200

OK

{
  "total": 2,
  "object": "list",
  "data": [
    {
      "object": "user",
      "id": "61e08f60-4822-465e-ba23-39f85cd741cb",
      "first_name": "horace",
      "last_name": "slughorn",
      "role": "member",
      "email": "[email protected]",
      "created_at": "2024-01-25 11:35:07",
      "last_updated_at": "2024-01-25 11:35:07"
    }
  ]
}

Last updated

Was this helpful?