Gets the users of a billing account: the users who hold a billing role in the account, and the users who have been given access to its databases.
Users who hold a billing role (shown as each user's `role`) are always included. Users with database access are included according to the query parameters below. The caller needs the `VIEW_USERS` operation in the account.
Optional query parameters:
- `owners`:
- If omitted or TRUE, only users who hold a billing role are returned. Default.
- If any other value, users with access to the account's databases are returned as well, each with the license type their database permissions require.
- `databaseId`:
- If provided, only users with access to that database are returned.
- Otherwise, users with access to any database of the billing account are returned. Default.
Request
GET https://www.activityinfo.org/resources/billingAccounts/{accountId}/users
Successful response
application/json
| array[object] | |||
| userId | string | The user's id | required |
| string | The user's email | required | |
| name | string | The user's name | required |
| role | object | The billing role this user holds in the billing account. Absent for a user listed only for their access to the account's databases. | optional |
| id | string | The id of the role: `owner` for the built-in Owner role, otherwise the id given to the role when the account's administrators defined it. | required |
| label | string | The name of the role, as shown to the account's users. | required |
| userLicenseType | string | The user license type required by this user, based on the permissions that have been granted to them at a database level. A billing role itself requires no license, so a user listed for their role alone has the license type NONE. Values:
|
required |
| lastLoginTime | float | The user's last login time, in milliseconds since the unix epoch (midnight on January 1st, 1970 UTC). | required |
Error responses
| Status Code | Error Code | Description |
|---|---|---|
| 401 | AUTHENTICATION_ |
The request must be authenticated |
| 403 | FORBIDDEN | Permission denied |
| 404 | NOT_ |
The resource could not be found |
| 410 | DELETED | The resource has been deleted |
Example
curl -u anything:YOUR_API_TOKEN \
https://www.activityinfo.org/resources/billingAccounts/190780004/users