Delete Account
Delete Account
POST
/api/portal/v1/admin/deleteAccount
Description
Delete an account. A background job is enqueued to remove the account, all of its users, and their data from the chart instance; the deletion completes asynchronously. Track the job through the Jobs endpoints.
An administrator cannot delete their own account.
Authentication
This endpoint requires a Bearer token in the Authorization header.
- Authorization:
Bearer <token>. A valid Portal API session token or API token belonging to an administrator.
Request Body
The request body should be JSON-encoded.
- id: The
idof the account to delete.
Response Schema
On success, the endpoint returns the identifier of the cleanup job.
jobId: Theidof the background job performing instance-side cleanup of the account’s data.
Error Responses
- 400 Bad Request: The request body is malformed, or the account is the caller’s own account.
- 401 Unauthorized: The
Authorizationheader is missing or the token is not valid. - 403 Forbidden: The authenticated user is not an administrator.
- 404 Not Found: No account exists with the given
id.
Example Request
POST https://<your-host>:9909/api/portal/v1/admin/deleteAccount
Authorization: Bearer <token>
Content-Type: application/json
{
"id": 42
}
Example Response
Status Code: 200 OK
Response Body:
{
"jobId": "5e37b9c1-a4c2-4b8e-9f3a-72d3f4a5b8e1"
}