Search code examples
hypertrack

How can i delete all users on my HyperTrack account?


I have been creating users on my HyperTrack account for testing. I want to push the app with HyperTrack sdk into production and would like to delete all existing data on my dashboard. Can you tell me how can i do this?


Solution

  • If you are using the test environment for testing, your testing data will be separate from your production data. You can simply switch to the production API keys, and push the app to production.

    If you need to clear the testing data, you can use the bulk_delete API call to delete all existing data (docs).

    curl -H "Authorization: token YOUR_SK_TOKEN" \
         -H "Content-Type: application/json" \
         -X DELETE \
         https://api.hypertrack.com/api/v1/users/bulk_delete/
    

    It is also possible delete users one-by-one using the delete user API call (docs).

    curl -H "Authorization: token YOUR_SK_TOKEN" \
         -H "Content-Type: application/json" \
         -X DELETE \
         https://api.hypertrack.com/api/v1/users/d0ae4912-2074-45ef-a7c0-76be58639ea9/