awork-io / awork

The awork Github repo supports you with awork integration and api questions. Here you can find links to further documentation, a FAQ with the most frequently asked questions and great code examples to get started even faster.
https://www.awork.com
11 stars 0 forks source link

How can we use the API in order to delete multiple clients with all of their projects? #136

Closed Morpheus-ro closed 1 year ago

Morpheus-ro commented 1 year ago

What is your question?

I used the API in order to upload client and projects. The data was all provided by faker so now I need to delete it as the dashboard is full of fake things.

In the GUI I could not find the select option for multiple clients and/or projects and in the API call /companies/uuid/delete I added the data ("deleteOperation": "delete-all") as a json and as a request body and it is deleting only the company, so default behavior.

In the documentation you guys wrote "Look into the property description of the post model to get detailed information". what post model do you mean?

I just need to delete 300 clients with their project in bulk. How to get to this?

ex:

Do you have a trace id of the call?

trace-id: adf7a238dbd2600d02495d6ba71594d7

nilzzzzzz commented 1 year ago

Hi @Morpheus-ro ,

we have no batch endpoint to delete all companies at once but only by id. The approach you took is correct and we have an issue in the delete-all case.

We will fix that ASAP and come back to you.

Thanks for bringing that up.

Nils

nilzzzzzz commented 1 year ago

Hi @Morpheus-ro,

the fix is online in 15 minutes.

Best

Nils

Morpheus-ro commented 1 year ago

Thank you @nilzzzzzz