List Users by Tenant
List the users associated with a specific tenant
.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Query endpoint instead.
Endpoint
GET /v1/tenants/:tenantId/users
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
tenantId | Id of the tenant from which to fetch users | URL param | yes |
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
curl "https://api.warrant.dev/v1/tenants/43f86srgs/users" \
-H "Authorization: ApiKey YOUR_KEY"
tenantUsers, err := user.ListUsersForTenant("43f86srgs", &warrant.ListUserParams{
ListParams: warrant.ListParams{
Limit: 10,
},
})
ListResult<User> users = client.listUsersForTenant("43f86srgs", new ListParams().withLimit(10));
// Class method
const users = await warrantClient.User.listUsersForTenant("43f86srgs", { limit: 10 });
// Instance method
const tenant = await warrantClient.Tenant.get("43f86srgs");
const users = await tenant.listUsers({ limit: 10 });
# Class method
users = warrant.User.list_for_tenant("43f86srgs", {"limit": 10})
# Instance method
tenant = warrant.Tenant.get("43f86srgs")
users = tenant.list_users({"limit": 10})
# Class method
Warrant::User.list_for_tenant("43f86srgs")
# Instance method
tenant = Warrant::Tenant.get("43f86srgs")
tenant.list_users
Response
[
{
"userId": "a-user-id",
"email": "user@example.org"
},
{
"userId": "example2.com",
"email": "hello@example2com"
}
]