Restore a deleted database user
Request
POST https://www.activityinfo.org/resources/databases/{databaseId}/users/{userId}/restore
Successful response
application/json
| object | |||
| revertedAuditLogEventId | string | required | |
| restoredUser | object | required | |
| 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 | |
| locked | boolean | required | |
Error responses
| Status Code | Error Code | Description |
|---|---|---|
| 200 | REVERTED | |
| 400 | CANNOT_ |
The owner of a database cannot be added as a user. |
| 400 | CANNOT_ |
You cannot add yourself to a database. |
| 400 | ROLE_ |
The user was previously assigned a role that has since been deleted. This user cannot be restored. |
| 400 | ROLE_ |
The user was previously assigned a role, which parameters have since been modified. This user cannot be restored. |
| 400 | USER_ |
This user has closed their ActivityInfo user account and cannot be added to databases again. |
| 400 | USER_ |
The user has already been restored or re-added to the database. |
| 400 | USER_ |
This user never had access to this database. |
| 401 | AUTHENTICATION_ |
The request must be authenticated |
| 402 | BILLING_ |
/** The billing account associated with this database has been closed and so no additional users can be added. |
| 402 | BILLING_ |
The billing account associated with this database has been suspended so no additional users can be added. |
| 402 | USER_ |
The user limit of the billing account associated with this database has been exceeded so no additional users can be added. |
| 403 | AUDIT_ |
You do not have the "AUDIT" permission and so cannot restore deleted users. |
| 403 | PERMISSION_ |
You do not have sufficient permission to restore a user with these permissions. |
| 404 | DATABASE_ |
Example
curl -X POST https://www.activityinfo.org/resources/databases/ck8oykh8m5/users/432201/restore \
-u anything:APITOKEN