Get database users
Gets the list of users who have been invited ot the database and their role assignments.
The database owner is not included in this list.
Request
GET https://www.activityinfo.org/resources/databases/{databaseId}/users
Successful response
application/json
array[object] | |||
databaseId | string | required | |
userId | string | required | |
name | string | The user's name, provided either when invited or by the user themselves after activating their account. | required |
string | This user's email address. | required | |
role | object | This user's assigned role in the database. | required |
roleId | string | The id of the role assigned to this user. | required |
roleParameters | object | The values of the parameters defined for this role. | required |
roleResources | array[string] | The resources (database, folder, forms, or subforms) to which the role's permissions are to apply. | required |
version | integer | A monotonically-increasing version number. This version is incremented each time a change is made to the users permissions. | required |
inviteDate | string | The date on which the user was invited to this database. | required |
deliveryStatus | string | Values:
|
required |
inviteAccepted | boolean | True if the user has accepted the invitation to create an ActivityInfo account. | required |
userLicenseType | string | The type of user license required for this user, in this database. Values:
|
required |
lastLoginDate | local_date | Date of last login on the platform. | optional |
activationStatus | string | The user's current account status. Values:
|
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/databases/ck8oykh8m5/users
The above command returns JSON structured like this:
[
{
"databaseId": "ck8oykh8m5",
"userId": "401",
"name": "Bob",
"email": "bob@example.com",
"role": {
"id": "admin",
"parameters": null,
"resources": [
"ck8oykh8m5"
]
},
"version": 34,
"inviteDate": "",
"deliveryStatus": "OK",
"inviteAccepted": true,
"userLicenseType": "NONE",
"lastLoginDate": null,
"activationStatus": "NO_ACCOUNT"
},
{
"databaseId": "ck8oykh8m5",
"userId": "499",
"name": "Amin",
"email": "amin@abc.org",
"role": {
"id": "rp",
"parameters": {
"partner": "ck8oyloog8:ckcks8ilh1x8y7q2"
},
"resources": [
"ct0ycadlh1x8y7v3",
"ctjel0blh1x8y7v4"
]
},
"version": 34,
"inviteDate": "",
"deliveryStatus": "OK",
"inviteAccepted": true,
"userLicenseType": "NONE",
"lastLoginDate": null,
"activationStatus": "NO_ACCOUNT"
}
]