Search code examples
shopwareshopware6shopware6-apishopware6-app

Clear complete Table for custom entity via App?


Is it possible to clear the complete table via an App through the API for a custom entity? I tried a DELETE but get an error message: Method Not Allowed (Allow: GET, POST) The documentation states, that its not needed to set the permission in the xml for the own entity. And I can see that also the delete permission is set when looking at the permissions from the App.

How can I achieve this?

Thanks, Danny


Solution

  • You can use the sync endpoint to mass-delete records but you will still need the ids for all the records to be deleted. There is no way to truncate a table via the api if that is what you're looking for.