Skip to content

Signals Metadata

Approve signals

Approve signals to create signals within an account and for storing the time series data.

Method Path
POST /api/1.3/accounts/{account_id}/flows
$ curl --location --request POST 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/flows' \
--header 'Authorization: Bearer <token>' --header 'Content-Type: application/json' \
--data-raw '{
  "flowType": "CLUESOURCE", 
  "name": "Creating approved signals via API", 
  "spec": { "sourceMappings": [{
                  "name": "plant1/machine1/subsystem1/pressure", 
                  "description": "Pressure sensor of machine1/subsystem1", 
                  "valueType": "NUMERIC", 
                  "unit": "Pa" }, 
                      { 
                  "name": "plant1/machine1/subsystem1/voltage", 
                  "description": "Voltage output of machine1/subsystem1", 
                  "valueType": "NUMERIC",
                  "unit": "V"} 
                              ]}}'
import requests 
import json

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/flows'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 
PAYLOAD = { "flowType": "CLUESOURCE", 
            "name": "Creating approved signals via API", 
            "spec": { "sourceMappings":[
                          {"name": "plant1/machine1/subsystem1/pressure",
                          "description": "Pressure sensor of machine1/subsystem1",
                          "valueType": "NUMERIC", 
                          "unit": "Pa" }, 
                          {"name": "plant1/machine1/subsystem1/voltage", 
                          "description": "Voltage output of machine1/subsystem1", 
                          "valueType": "NUMERIC", 
                          "unit":"V" }]
                    }}

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

Example response

{
  "id": "1124191510837645312",
  "type": "entities.flow",
  "flowType": "CLUESOURCE",
  "status": "CREATED",
  "name": "Creating approved signals via API",
  "description": "",
  "spec": {
    "sourceMappings": [
      {
        "name": "plant1/machine1/subsystem1/pressure",
        "description": "Pressure sensor of machine1/subsystem1",
        "valueType": "NUMERIC",
        "unit": "Pa"
      },
      {
        "name": "plant1/machine1/subsystem1/voltage",
        "description": "Voltage output of machine1/subsystem1",
        "valueType": "NUMERIC",
        "unit": "V"
      }
    ]
  },
  "createTime": 1688098542651,
  "updateTime": 1688098542651,
  "createdBy": "1013056801100267520",
  "updatedBy": "1013056801100267520",
  "archived": false,
  "links": []
}

List signals

Gets the list of signals within an account. This API can be used to get all Signals or filter by name.

Method Path
GET /api/1.3/accounts/{account_id}/connectedsources

Query Parameters

Parameter Required Description
sourceName Yes Name of the signal. By default, it performs a contains match. To match the exact signal name, set the value with double quotes.
offset Yes Index to start for the next paginated request. Default value is 0.
limit Yes Number of items to include in each page result. There could be fewer items remaining than the specified value.
$ curl -H "Authorization: Bearer <token>" 
"https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/connectedsources?offset=0&limit=10&sourceName=%22SanFrancisco/P"
import requests 

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/connectedsources/?offset=0&limit=10&sourceName="SanFrancisco/P"' 
TOKEN = '<token>' 
HEADERS = {'Authorization':f'Bearer {TOKEN}'} 

response = requests.get(URL, headers=HEADERS)
print(response.json())

Example response

[
  {
    "id": "yyyyyyyyyyyy",
    "tenant": "xxxxxxxxxxxxxxx",
    "unit": "in",
    "sourceName": "San Francisco/P",
    "valueType": "Numeric",
    "firstPoint": "2008-08-01T00:00:00.000000Z",
    "lastPoint": "2016-12-28T21:00:00.000000Z",
    "pointsCount": 24576,
    "layoutinfo": [
      {
        "layout": "1000001081909198848",
        "layoutnode": "1000001082064388096",
        "path": [
          {
            "name": "US",
            "id": "1000001082018250752",
            "seq": 1
          },
          {
            "name": "San Francisco",
            "id": "1000001082064388096",
            "seq": 2
          }
        ],
        "materializedPath": "US->San Francisco",
        "layoutState": "PUBLISHED"
      },
      {
        "layout": "989393423730286592",
        "layoutnode": "1012335760928661504",
        "path": [
          {
            "name": "US",
            "id": "1012335760224018432",
            "seq": 1
          },
          {
            "name": "San Francisco",
            "id": "1012335760928661504",
            "seq": 2
          }
        ],
        "materializedPath": "US->San Francisco",
        "layoutState": "DRAFT"
      }
    ],
    "description": "Pressure",
    "links": []
  }
]

Retreive a signal info

Get signal info using signal ID within an account.

Method Path
GET /api/1.3/accounts/{account_id}/connectedsources/{signal_id}
$ curl -H "Authorization: Bearer <token>" \
"https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/connectedsources/{SIGNAL_ID}"
import requests 

URL = 'https://app3.falkonry.ai/api/1.3/accounts/{ACCOUNT_ID}/connectedsources/{SIGNAL_ID}'
TOKEN = '<token>' 
HEADERS = {'Authorization': f'Bearer {TOKEN}'} 

response = requests.get(URL, headers=HEADERS)
print(response.json())

Example response

{
  "id": "yyyyyyyyyyyy",
  "tenant": "xxxxxxxxxxxxxxx",
  "unit": "in",
  "sourceName": "San Francisco/P",
  "valueType": "Numeric",
  "firstPoint": "2008-08-01T00:00:00.000000Z",
  "lastPoint": "2016-12-28T21:00:00.000000Z",
  "pointsCount": 24576,
  "layoutinfo": [
    {
      "layout": "1000001081909198848",
      "layoutnode": "1000001082064388096",
      "path": [
        {
          "name": "US",
          "id": "1000001082018250752",
          "seq": 1
        },
        {
          "name": "San Francisco",
          "id": "1000001082064388096",
          "seq": 2
        }
      ],
      "materializedPath": "US->San Francisco",
      "layoutState": "PUBLISHED"
    },
    {
      "layout": "989393423730286592",
      "layoutnode": "1012335760928661504",
      "path": [
        {
          "name": "US",
          "id": "1012335760224018432",
          "seq": 1
        },
        {
          "name": "San Francisco",
          "id": "1012335760928661504",
          "seq": 2
        }
      ],
      "materializedPath": "US->San Francisco",
      "layoutState": "DRAFT"
    }
  ],
  "description": "Pressure",
  "links": []
}