Update database user grants

Update a user's grants

In addition to the user's role assignment, users can also be granted permissions individually to specific resources.

Request

POST https://www.activityinfo.org/resources/databases/{databaseId}/users/{userId}/grants

Request body

application/json

object
roleUpdates array[object] required
grantUpdates array[object] required
grantDeletions array[string] required

Successful response

application/json

object
databaseId string required
userId string required
version integer required
email string required
name string required
inviteTime float required
activationStatus string Values:
NO_ACCOUNT
The email has no account in the system
PENDING
The user has been invited to access a database, or started signing up for a free trial, but has not confirmed their account.
ACTIVE
The user has activated their account and accepted the terms of service.
INACTIVE
The user no longer has access to any databases, nor do they have an active trial or billing account.
CLOSED
The user has requested the closure of their account.
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
lastLoginTime float required
role object required
grants array[object] required

Error responses

Status Code Error Code Description
400 INVALID_ROLE_PARAMETERS
400 RESOURCE_NOT_FOUND
400 ROLE_NOT_FOUND
401 AUTHENTICATION_REQUIRED The request must be authenticated
403 CANNOT_MANAGE_SELF
403 PERMISSION_DENIED
404 DATABASE_NOT_FOUND
404 USER_NOT_FOUND
Next item
Update database user role