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 | |
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 |
grantUpdates | array[object] | required | |
resourceId | string | required | |
operations | array[string] | required | |
grantDeletions | array[string] | required |
Successful response
application/json
object | |||
databaseId | string | required | |
userId | string | required | |
version | integer | required | |
string | required | ||
name | string | required | |
inviteTime | float | required | |
activationStatus | string | Values:
|
required |
deliveryStatus | string | Values:
|
required |
lastLoginTime | float | required | |
role | object | 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 |
grants | array[object] | required | |
resourceId | string | required | |
operations | array[string] | required |
Error responses
Status Code | Error Code | Description |
---|---|---|
400 | INVALID_ |
|
400 | RESOURCE_ |
|
400 | ROLE_ |
|
401 | AUTHENTICATION_ |
The request must be authenticated |
403 | CANNOT_ |
|
403 | PERMISSION_ |
|
404 | DATABASE_ |
|
404 | USER_ |