Skip to content

Deleting Signal Data

TSI is designed to receive large numbers of time series signals. The Connection settings control the data transformation. When data with incorrect time settings get into a signal, the data becomes unusable. In such case, following REST API can be used to delete a portion of data. This API returns a flow ID and triggers a long running process.

Signal Data Cleanup API

When deleting the signals data from TSI, it's important to be aware of the implications of such actions:

  • Irreversible action: Deleting signal data is permanent and cannot be undone. This action should be carefully reviewed, planned, and executed only when absolutely necessary.
  • Long running process: A REST API can be used to delete portions of signal data. This action triggers a background process that may take significant time to complete, depending on the data volume. During this process, system performance may be temporarily degraded. Track the status from in-app activity panel.

Request Payload

{
  "name": "signaldatacleanup flow",
  "flowType": "SIGNALDATACLEANUP",
  "spec": {
    "sourceIds":["<signal-id>"],
    "startTime": "YYYY-MM-DDTHH:mm:SS.SSSSSSZ",
    "endTime": "YYYY-MM-DDTHH:mm:SS.SSSSSSZ"
  }
}

cURL request

$ curl --location --request POST 'https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/flows' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "name": "signaldatacleanup flow", 
      "flowType": "SIGNALDATACLEANUP", 
      "spec": { "sourceIds": ["yyyyyyyyyyyy"], 
                "startTime": "YYYY-MM-DDTHH:mm:SS.SSSZ",
                "endTime": "YYYY-MM-DDTHH:mm:SS.SSSZ" 
              }}'

Python

import requests 

URL = 'https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/flows'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 
PAYLOAD = { "name": "signaldatacleanup flow", 
              "flowType": "SIGNALDATACLEANUP", 
              "spec": { "sourceIds": ["yyyyyyyyyyyy"], 
                        "startTime": "YYYY-MM-DDTHH:mm:SS.SSSSSSZ",
                          "endTime": "YYYY-MM-DDTHH:mm:SS.SSSSSSZ" 
                      } 
          }

response = requests.post(URL, headers=HEADERS, data=PAYLOAD)
print(response.json())

Example response

{
  "id": "zzzzzzzzzzzzzz",
  "type": "entities.flow",
  "tenant": "xxxxxxxxxxxxxxx",
  "flowType": "SIGNALDATACLEANUP",
  "status": "CREATED",
  "name": "signaldatacleanup flow",
  "spec": {
    "sourceIds": ["yyyyyyyyyyyy"],
    "startTime": "YYYY-MM-DDTHH:mm:SS.SSSSSSZ",
    "endTime": "YYYY-MM-DDTHH:mm:SS.SSSSSSZ"
  }
}

Note

The startTime and endTime should be in UTC timezone.