Get database users

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
email string This user's email address. required
role object This user's assigned role in the database. 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:
UNKNOWN
No record of email delivery is available for this user.
OK
Email has been successfully delivered to this user.
HARD_BOUNCE
Attempts to email this user failed with a "hard bounce," meaning that the account does not exist, or the domain is not accepting email.
SPAM_COMPLAINT
Attempts to email this user were rejected as spam by their mail server. No additional attempt will be made to send email to this user.
MANUAL_SUPPRESSION
Mail to this address have been manually blocked by ActivityInfo support staff.
required
inviteAccepted boolean True if the user has accept the invitation to create an ActivityInfo account. required

Error responses

Status Code Error Code Description
401 AUTHENTICATION_REQUIRED The request must be authenticated
403 FORBIDDEN Permission denied
404 NOT_FOUND 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
  },
  {
    "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
  }
]
Next item
Get databases