0

It seems that in the Java SDK it is not implemented to delete Operations. The REST API supports it. So I'm wondering if I miss something or if this is the case.

Are there any workaround except using a REST Client to delete Operation(s) in a Java Application?

Switschel
  • 42
  • 4

2 Answers2

0

The easiest way to use an API that is not implemented in the client is calling the rest() method on your platform object.

This will return you the underlaying RestConnector for all API (fully initialised with credentials) and you can execute the calls with it (kind of manually).

TyrManuZ
  • 2,039
  • 1
  • 14
  • 23
0

No, currently not (but feel free to send a pull request with an added method).

As background, operations should usually not be deleted by clients, but instead cycled through their process (pending -> executing -> successful/failed). If you delete an operation, it will be not available anymore and you cannot reproduce what happened on a device at a particular point in time. Deletion is usually taken care of by data retention management.

André
  • 668
  • 6
  • 11
  • Thanks André! Is there any default behaviour when operations in a specific status are removed from the platform? Like 7 days for successful/failed operations etc. – Switschel Sep 10 '18 at 14:03
  • By default, there's a retention rule in new tenants that removes data after 30 days (if I remember correctly). You can edit this rule in the administration app. It is regardless of the status of the operation. – André Sep 11 '18 at 16:12
  • Ok, but the only issue with the retention rules is that it cannot be filtered on the status of the operation. I would expect something to clean up only successful operations each day and keep failed operation for at least 7 days. – Switschel Sep 11 '18 at 17:20