User Cleanup Resources


Delete all except for whitelist

PUT /users/delete-all-except-whitelist

This endpoint allows to bulk-delete users whose unique_id is not included in a whitelist of unique_ids.

Only users who own the User Admin role have the privilege to execute this request. Only non-system accounts will be deleted.

The provided unique_ids must not be available in Starmind, but if a user with such a unique_id exists, then this user will not be deleted.

Non-system users for whom no unique_id is assigned, will always become deleted when this endpoint is called.

Deleted users whose unique_id is whitelisted will not be restored.

Json Payload

{
    "whitelisted_unique_ids": [
        "usr_2390141243",
        "usr_2890424018",
        ...
    ]
}

If successful, the the endpoint will respond with a HTTP 200 OK and an array of the deleted user objects.

Response

[

    {
      "id": 42,
      "unique_id": "usr_1234567890",
      "is_deleted": true,
      "firstname": "Sherlock",
      "lastname": "Holmes",
      ...
    },
    ...
]