Cannot get permission to run insights.deleteLog() from within an app

Apparently, the only possible way to call insights.deleteLog() without getting permission denied seems to be from the web API playground.
I do have permission “homey:manager:api” set

Is this a bug?

Either apps aren’t allowed to manage insights logs, or it needs another (undocumented) permission (try homey:manager:insights).

1 Like

Yupp, but that gives me:

✖ App did not validate against level `debug`:
Invalid permission: homey:manager:insights

If the case is that apps are not allowed to manage insights logs then what is the point of making an API for it? Using the web API playground to delete corrupted logs is so un-intuitive that I doubt the average homey user will ever use it. Instead, they will blame the app and complain that the app has a corrupted data log.

I can understand that they would want to stop a malicious app from deleting all logs but preventing an app from deleting its own logs seems way too restricted to me.

The Homey (web) app needs it to remove Insights logs.

Which brings me back to “is this a bug?”

Obviously, if you want a definitive answer, you’d have to ask Athom, not the community.

My guess is that it’s intentional, Athom typically regards community developers as untrustworthy.