Skip to content

Signal Data

Gets the data for the requested signal.

Raw Data API

Gets the signal data in arrow IPC format. A maximum of 1,000 data points will be returned for each API request. Paginate the requests using next-time field present in the response headers to get more data.

Get Data using Signal ID

Query Parameters

?start=

Start time of the data request range in nanoseconds. This is a required parameter.

?end=

End time of the data request range in nanoseconds. This is a required parameter only if reverse is set as true else it will be assumed as the latest available data point time of the signal.

?reverse=

Set it to true to start data scan in descending order from the end time. The default value is false.

Example request

::::: tabs ::: code-tab bash

\$ curl -H \"Authorization: Bearer \<token>\" -H \"Accept: application/x-arrow-ipc\" https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/raw_data?start=1640168850582000000&end=1640168940981000000 :::

::: code-tab python

import io import requests import pyarrow

URL = \'https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/raw_data\' TOKEN = \'\<token>\' HEADERS = {\'Authorization\': f\'Bearer {TOKEN}\', \'Accept\': \'application/x-arrow-ipc\'} PARAMS =

req = requests.get(URL, headers=HEADERS, params=PARAMS)

NEXT_TIME = req.headers[\'next-time\'] # use this as start time for the next request

stream = io.BytesIO(req.content) # read data via pyarrow with pyarrow.ipc.open_stream(stream) as reader: df = reader.read_pandas() print(df) ::: :::::

Note

The next-time field in the response headers can be used to get more data. If reverse is set as true, set it\'s value as the end parameter else set it\'s value as the start parameter in the next request.

Get Data using Datastream ID

Note

You can use this API to get data of the signal used in datastream to build the model. The [signal_id]{.title-ref} is the reference ID of the signal within the context of datatstream and should always be used with [entity]{.title-ref} query parameter.

Query Parameters

?entity=

ID of the entity to which the signal belongs, within the datastream. This is a required parameter.

?start=

Start time of the data request range in nanoseconds. This is a required parameter.

?end=

End time of the data request range in nanoseconds. This is a required parameter only if reverse is set as true else it will be assumed as the latest available data point time of the signal.

?reverse=

Set it to true to start data scan in descending order from the end time. The default value is false.

Example request

::::: tabs ::: code-tab bash

\$ curl -H \"Authorization: Bearer \<token>\" -H \"Accept: application/x-arrow-ipc\" https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/raw_data?start=1640168850582000000&end=1640168940981000000&reverse=true :::

::: code-tab python

import io import requests import pyarrow

URL = \'https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/raw_data\' TOKEN = \'\<token>\' HEADERS = {\'Authorization\': f\'Bearer {TOKEN}\', \'Accept\': \'application/x-arrow-ipc\'} PARAMS = {\'start\': 1640168850582000000, \'end\': 1640168940981000000, \'reverse\': \'true\'}

req = requests.get(URL, headers=HEADERS, params=PARAMS)

NEXT_TIME = req.headers[\'next-time\'] # use this as the end time for the next request

stream = io.BytesIO(req.content) # read data via pyarrow with pyarrow.ipc.open_stream(stream) as reader: df = reader.read_pandas() print(df) ::: :::::

Note

The next-time field in the response headers can be used to get more data. If reverse is set as true, set it\'s value as the end parameter else set it\'s value as the start parameter in the next request.

Aggregated Data API

Gets the aggregated signal data in JSON format based on the requested aggregation level.

Note

You may get API response with data falling outside of the requested range. This is because the API response will have aggregated information in form of cells based on the aggregation duration tied to the aggregation level. The API response will have cells that contain the start and end time specified in the query.

Get Data using Signal ID

Query Parameters

?start_time_iso=

Start time of the requested data range in ISO format. This is a required parameter.

?end_time_iso=

End time of the requested data range in ISO format. This is a required parameter.

?level=

Aggregation level to use over the requested data range. This is a required parameter.


Level Aggregated duration


14 1 day

13 1 hour

12 10 minutes

11 1 minute

10 10 seconds

9 1 second

8 100 milliseconds

7 10 milliseconds

6 1 millisecond

5 100 microseconds

4 10 microseconds

3 1 microsecond

2 100 nanoseconds

1 10 nanoseconds


Example request

::::: tabs ::: code-tab bash

\$ curl -H \"Authorization: Bearer \<token>\" https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/cells?start_time_iso=2022-08-28T13:00:00.000000Z&end_time_iso=2022-08-30T16:00:00.000000Z&level=13 :::

::: code-tab python

import io import requests import pyarrow

URL = \'https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/cells\' TOKEN = \'\<token>\' HEADERS = {\'Authorization\': f\'Bearer {TOKEN}\'} PARAMS = { \'start_time_iso\': \'2022-08-28T13:00:00.000000Z\', \'end_time_iso\': \'2022-08-30T16:00:00.000000Z\', \'level\': 13 }

req = requests.get(URL, headers=HEADERS, params=PARAMS)

print(req.json()) ::: :::::

Example response

{
  "startTime": "2022-08-28T13:00:00Z",
  "endTime": "2022-08-30T16:00:00Z",
  "level": 13,
  "cellDuration": 3600000000000,
  "count": [595, 3597, 3008, null, null, ...]
  "firstpoint": ["2022-08-28T13:50:05.442000Z", "2022-08-28T14:00:00.882000Z", "2022-08-28T15:00:00.419000Z", null, null, ...],
  "max": [0.995, 0.999, 0.999, null, null, ...],
  "mean": [0.501, 0.494, 0.500, null, null, ...],
  "min": [0.001, 0.006, 0.007, null, ...],
  "std": [0.278, 0.294, 0.289, null, null ...]
}

Note

The response has min, mean, max, standard deviation values for each aggregated duration based on the requested level. The firstpoint field is the start time of the aggregated duration and count field is the number of data points present in that aggregated duration.

Get Data using Datastream ID

Query Parameters

?entity=

ID of the entity to which the signal belongs, within the datastream. This is a required parameter.

?start_time_iso=

Start time of the requested data range in ISO format. This is a required parameter.

?end_time_iso=

End time of the requested data range in ISO format. This is a required parameter.

?level=

Aggregation level to use over the requested data range. This is a required parameter.


Level Aggregated duration


14 1 day

13 1 hour

12 10 minutes

11 1 minute

10 10 seconds

9 1 second

8 100 milliseconds

7 10 milliseconds

6 1 millisecond

5 100 microseconds

4 10 microseconds

3 1 microsecond

2 100 nanoseconds

1 10 nanoseconds


Example request

::::: tabs ::: code-tab bash

\$ curl -H \"Authorization: Bearer \<token>\" https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/cells?entity=eeeeeeeeeeeeeee&start_time_iso=2022-08-28T13:00:00.000000Z&end_time_iso=2022-08-30T16:00:00.000000Z&level=13 :::

::: code-tab python

import io import requests import pyarrow

URL = \'https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/cells\' TOKEN = \'\<token>\' HEADERS = {\'Authorization\': f\'Bearer {TOKEN}\'} PARAMS = { \'entity\': \'eeeeeeeeeeeeeee\', \'start_time_iso\': \'2022-08-28T13:00:00.000000Z\', \'end_time_iso\': \'2022-08-30T16:00:00.000000Z\', \'level\': 13 }

req = requests.get(URL, headers=HEADERS, params=PARAMS)

print(req.json()) ::: :::::

Example response

{
  "startTime": "2022-08-28T13:00:00Z",
  "endTime": "2022-08-30T16:00:00Z",
  "level": 13,
  "cellDuration": 3600000000000,
  "count": [595, 3597, 3008, null, null, ...]
  "firstpoint": ["2022-08-28T13:50:05.442000Z", "2022-08-28T14:00:00.882000Z", "2022-08-28T15:00:00.419000Z", null, null, ...],
  "max": [0.995, 0.999, 0.999, null, null, ...],
  "mean": [0.501, 0.494, 0.500, null, null, ...],
  "min": [0.001, 0.006, 0.007, null, ...],
  "std": [0.278, 0.294, 0.289, null, null ...]
}

Note

The response has min, mean, max, standard deviation values for each aggregated duration based on the requested level. The firstpoint field is the start time of the aggregated duration and count field is the number of data points present in that aggregated duration.

[Deprecated] Raw Points API

Gets the raw signal data in JSON format.

[Deprecated] Get Data using Signal ID

Query Parameters

?start=

Start time of the data in nanoseconds. This is a required parameter.

?end=

End time of the data in nanoseconds. This is a required parameter.

?reverse=

Set it to true to start data scan in descending order from the start time. The default value is false.

Example request

::::: tabs ::: code-tab bash

\$ curl -H \"Authorization: Bearer \<token>\" https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/raw_points?start=1640168850582000000&end=1640169850582000000 :::

::: code-tab python

import requests URL = \'https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/raw_points?start=1640168850582000000&end=1640169850582000000\' TOKEN = \'\<token>\' HEADERS = {\'Authorization\': f\'Bearer {TOKEN}\'} req = requests.get(URL, headers=HEADERS)

print(req.json()) ::: :::::

Example response

{
  "records": {
    "1640168850582000000": {
      "value": 2.456
    },
    "1640168850583000000": {
      "value": 3.16
    }
  },
  "metadata": {
    "length": 2,
    "next": "/api/1.2/data/accounts/xxxxxxxxxxxxxxx/connectedsources/yyyyyyyyyyyy/raw_points?start=1640168850583000001&end=1640169850582000000&reverse=False"
  }
}

Note

The next field in the response is to indicate that there is more data in the range and the mentioned endpoint can be used to get the following data.

[Deprecated] Get Data using Datastream ID

Query Parameters

?entity=

ID of the entity to which the signal belongs, within the datastream. This is a required parameter.

?start=

Start time of the data in nanoseconds. This is a required parameter.

?end=

End time of the data in nanoseconds. This is a required parameter.

?reverse=

Set it to true to start data scan in descending order from the start time. The default value is false.

Example request

::::: tabs ::: code-tab bash

\$ curl -H \"Authorization: Bearer \<token>\" https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/raw_points?entity=eeeeeeeeeeeeeee&start=1640168850582000000&end=1640169850582000000 :::

::: code-tab python

import requests URL = \'https://app3.falkonry.ai/api/1.2/data/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/raw_points?entity=eeeeeeeeeeeeeee&start=1640168850582000000&end=1640169850582000000\' TOKEN = \'\<token>\' HEADERS = {\'Authorization\': f\'Bearer {TOKEN}\'} response = requests.get(URL, headers=HEADERS) print(response.json()) ::: :::::

Example response

{
  "records": {
    "1640168850582000000": {
      "value": 2.456
    },
    "1640168850583000000": {
      "value": 3.16
    }
  },
  "metadata": {
    "length": 2,
    "next": "/api/1.2/data/accounts/xxxxxxxxxxxxxxx/datastreams/yyyyyyyyyyyy/signals/zzzzzzzzzzzzz/raw_points?entity=eeeeeeeeeeeeeee&start=1640168850583000001&end=1640169850582000000&reverse=False"
  }
}

Note

The next field in the response is to indicate that there is more data in the range and the mentioned endpoint can be used to get the following data.