Bootstrap the First Administrator
Use this operation during deployment to appoint a location's first administrator. The appointment does not require a second person's approval.
Before You Start
- Create the target Aidbox
UserandLocationrecords. - Confirm that the location has no administrator.
- Restrict the operation to deployment operators, as described in Configure Access Policies.
Appoint the Administrator
Call the operation as the deployment operator:
POST /e-prescription/access/epcs/bootstrap-admin
Content-Type: application/json
{
"userId": "<Aidbox User id of the first administrator>",
"locationId": "<Location id>"
}
201 Created confirms the appointment and returns the administrator's access permission.
The administrator can verify their role with List Your Own Permissions.
Handle Errors
Errors return an OperationOutcome:
400 Bad Request: invalid request body.403 Forbidden: the request has no acting user.422 Unprocessable Entity: the user or location does not exist, or the location already has an administrator.