Skip to main content
Question

How to delete filtered ToDos (e.g. by assignee) via LeanIX API?

  • May 28, 2026
  • 2 replies
  • 23 views

Hi everyone,

I’m currently working with the LeanIX API and trying to clean up ToDos in an automated way.

My specific use case is:

  • I want to filter ToDos by a specific user (assignee/responsible person)
  • and then delete exactly those ToDos via the API

From what I understand so far, the API only allows deleting ToDos by ID (one by one). So the approach would be:

  1. Query all ToDos with a filter (e.g. by assignee)
  2. Extract the IDs
  3. Delete each ToDo individually

However, I have a few open questions:

  • Is there a recommended way to filter ToDos by assignee (GraphQL or REST)?
  • Is there any bulk delete option available that I might be missing?
  • Are there best practices for handling this kind of cleanup (e.g. performance, pagination, rate limits)?

Would really appreciate any examples or guidance!

Thanks in advance 🙂

2 replies

Thomas Schreiner
Forum|alt.badge.img+3

Hi ​@Jessica_Ahri,

If you like, you can use our public Python LeanIX Console for this one-time activity: https://demo.aronis.de

 

user_id = "3431f4e9-df8b-..."
todos_to_delete = []

print("Deleting matching todos...")

for todo in LeanIXClient().get_todos():
if any(assignee["id"] == user_id for assignee in todo["assignees"]):
print(f"Deleting todo: {todo}")
todos_to_delete.append(todo["id"])

LeanIXClient().delete_todos(ids=todos_to_delete)

print("Done.")

 

PS. If you are working with Peter, say hi to him from me :-)

If you have any questions, please get in touch.


Carsten
Forum|alt.badge.img+1
  • Everlasting Love
  • May 28, 2026

Hello ​@Jessica_Ahri ,

you can implement it using the API. With the To-DO API you can delete multiple todos by filters, so if you want to delete all todos for an asignee, you have to get the ID of the assignee (userid via MTM API) and use this one as filter.

Just look at the swagger UI.
Best regards,

Carsten