org.retention.bulk_delete

The org.retention.bulk_delete command is used by organization admins to delete org-scoped data that is normally handled by retention settings.

Requires Org Admin rights.

TR50 Request

{
    "cmd": {
      "command": "org.retention.bulk_delete",
      "params": {
        "key": "propHistoryAge",
        "startTs": "2019-01-01T00:00:00Z",
        "endTs": "2020-12-31T23:59:59Z"
      }
    }
  }

Request Parameters

Name Type Required Description
key String Yes

The key of the org-scoped data to be deleted. The valid keys includes:

  • actilvityLogAge- Activity logs
  • alarmHistoryAge - Thing alarm history
  • apiLogAge - API logs
  • attrHistoryAge - Thing attribute history
  • locHistoryAge - Thing location history
  • loraFrameAge - LoRa frame records
  • mailboxAge - Thing mailbox records
  • propAggregateAge - Thing property aggregate records
  • propHistoryAge - Thing property history
  • thingLogAge - The log records
  • triggerReportAge - Trigger report records
startTs String Yes The date from which data should be deleted.
endTs String Yes The date to which data should be deleted.

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true
  }
}