Skip to content

Endpoint to delete an account #194

Open

Description

@PGijsbers

Currently a manual process.
@joaquinvanschoren can you let me know what "Deleting an account" currently means?

Activity

  1. joaquinvanschoren commented on Sep 23, 2024

    @joaquinvanschoren
    Contributor

    It means:

    • Removing the account from the user database and other stores (e.g. elasticsearch)
    • If the user has uploaded datasets, flow, runs, they should either be 'removed' or the uploader should be anonymized. Right now we need to ask authors what to do (luckily it has not yet come up that people also had created resources, so we could simply delete them).

    How this can be implemented in practice:

    • A first step could be that authors get the option to remove their accounts only when they have no resources. That covers most use cases. If they do have resources, they'll get an error message that they need to remove those resources first.
    • Next, we can make this an option that users can select. The default being that resources remain and the uploader becomes anonymous. If they opt for removal we can remove the resources for them.
    • According to FAIR principles, it must be possible for people to remove data, but a record (meta-data) of the dataset should remain available. This is akin to archiving. E.g. for datasets, that means that the dataset still exists in the database, but the data itself is deleted. For flows and runs it is more vague since they are all meta-data. But e.g. models attached to a run could still be removed.
    • I believe this means that we should probably update the dataset delete option to allow removing a dataset while maintaining the meta-data. At the moment, I believe that the API will only actually delete a dataset if there are no resources dependent on it.
    • We should update the terms and conditions to make this more clear I think.

    We should definitely discuss more. Maybe we should split it up into two issues, one for removing users without resources (which we can do fast), and one where we also take care of properly removing/archiving or anonymizing their resources.

  2. PGijsbers commented on Sep 23, 2024

    @PGijsbers
    ContributorAuthor

    Thanks for the elaboration. The deletion of datasets themselves is interesting. On the one hand, people should be able to. On the other, entities not owned by the same users may depend on it (tasks, benchmarking suites). That goes against the promise of availability. On top of that, other users may have forked the data, rendering deletion useless to some degree. Definitely worth having a discussion about and also exploring the legal obligations.

  3. Varshith-Yadav commented on Mar 2, 2026

    @Varshith-Yadav

    Hi @joaquinvanschoren, I'd like to work on this.

    Based on your explanation, I propose a two-phase approach:

    Phase 1: Add DELETE endpoint that only allows deletion for users with no resources. Return 409 error if they have any.

    Phase 2: Add options for resource handling - either anonymize uploader (default, FAIR-compliant) or delete if no dependencies exist.

    Should I start with Phase 1? Happy to take this on.

  4. Jayant-kernel commented on Mar 7, 2026

    @Jayant-kernel

    Hey @PGijsbers and @joaquinvanschoren

    I'd love to take this on! Looked through the code — the endpoint is fully missing
    (no router, no DB delete function, nothing).

    • New DELETE /v1/user/{user_id} endpoint
    • Block deletion if user has resources → return 409
    • Only allow self or admin to delete
    • Tests + UserError enum

    Then
    (anonymization) can be a follow-up.
    Can I get assigned?

  5. added a commit that references this issue on Mar 7, 2026
    9662c1f
  6. PGijsbers commented on Apr 15, 2026

    @PGijsbers
    ContributorAuthor

    @igennova would you like to pick this up? In particular, support for deleting users without assets ("phase 1" from above).

    Add DELETE endpoint that only allows deletion for users with no resources. Return 409 error if they have any.

    Users should only be able to delete their own account. Admins can delete any account (that does not have resources).

  7. igennova commented on Apr 15, 2026

    @igennova
    Contributor

    @igennova would you like to pick this up? In particular, support for deleting users without assets ("phase 1" from above).

    Add DELETE endpoint that only allows deletion for users with no resources. Return 409 error if they have any.

    Users should only be able to delete their own account. Admins can delete any account (that does not have resources).

    @PGijsbers Sure, I’ll work on this and open a PR soon. Thanks!

  8. added a commit that references this issue on May 13, 2026
    24dedf9
  9. PGijsbers commented on May 13, 2026

    @PGijsbers
    ContributorAuthor

    Only users which do not have resources were addressed with #317.
    I will re-open this issue to indicate the feature is not complete.

  10. added
    behaviorDiscussion about behavior of the server (e.g., to propose a change)
    on May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

behaviorDiscussion about behavior of the server (e.g., to propose a change)enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions