SecondSky Data API Reference

Welcome to SecondSky Data API!

SecondSky Data API is a GraphQL API that provides access to SecondSky zone/device data.

Learn how to fetch data following the documentation.

API support: support@secondsky.com

API Endpoints
# Production:
https://api.coretex.ag/ts/data
Headers
# Authorize with API key
x-api-key: <YOUR_API_KEY_HERE>

Making a request

This is an example indicating the structure of an Axios request made to the SecondSky endpoint. Please take note of the following.

API keys

Your API key is used to authorize your queries. Keep this key private. The API key can be found in the admin section of the SecondSky web application. If you don't have one please contact support.

HTTP request

Only POST requests are supported. The request body must be a valid GraphQL query.

Examples

The provided examples are only representative of the data structure and do not contain real data.

Axios example
const { data, errors } = await axios({
  url: 'https://api.coretex.uk/ts/data',
  method: 'post',
  headers: {
    'content-type': 'application/json',
    'x-api-key': '12345678'
  },
  data: {
    query: `query getDataset(
      $siteId: String!,
      $id: String,
      $measurements: [String],
      $interval: DatasetIntervalEnum,
      $fromDate: Int!,
      $toDate: Int!,
      $nextToken: String
    ) {
      getDataset(
        siteId: $siteId,
        id: $id,
        measurements: $measurements,
        interval: $interval,
        fromDate: $fromDate,
        toDate: $toDate,
        nextToken: $nextToken
      ) {
        rows
        columns
        types
        nextToken
      }
    }`,
    variables: {
      siteId: 'v3hlN0H5VNp6',
      id: 'wZYbmEqoLEfd',
      measurements: ['temperature']
      interval: '1m'
      fromDate: 1685610374,
      toDate: 1686042374,
      nextToken: null
    }
  }
})

Steps to follow if it is the first time using the API

Follow these steps when trying to get data from your zones/devices for the first time.

Step 1

Call the query getMeasurements to get available measurements. Use the ID of the measurement when fetching data.

Step 2

Call the query getHierarchy with your organizationId, located in the same place you got your API key, to fetch all your zones and devices.

Step 3

Call the correct query for the type of data you wish to fetch. For hardware measurements use the query getDataset. For calculated measurements use the query getVectorDataset.

Queries

getDailyWeatherForecast

Description

Get the daily weather forecast for a site for a given period of time returned as 1 day intervals in ascending order.

Response

Returns [DailyWeatherForecast]

Arguments
Name Description
siteId - String! The ID of the site to get the hourly weather forecast for. A site will always have a hierarchy level of 1.
fromDate - Int! The starting date and time for the weather forecast, as a timestamp (in seconds).
toDate - Int! The end date and time the weather forecast, as a timestamp (in seconds).

Example

Query
query getDailyWeatherForecast(
  $siteId: String!,
  $fromDate: Int!,
  $toDate: Int!
) {
  getDailyWeatherForecast(
    siteId: $siteId,
    fromDate: $fromDate,
    toDate: $toDate
  ) {
    id
    siteId
    weatherAt
    condition {
      id
      name
      description
    }
    temperature
    temperatureFeel
    temperatureMin
    temperatureMax
    temperatureMorning
    temperatureEvening
    temperatureNight
    pressure
    humidity
    dewPoint
    uvIndex
    windSpeed
    windDeg
    windGust
    rainProbability
    rainVolume
    cloudiness
    sunriseAt
    sunsetAt
    moonriseAt
    moonsetAt
    moonPhase
  }
}
Variables
{"siteId": "v3hlN0H5VNp6", "fromDate": 1685610374, "toDate": 1686042374}
Response
{
  "data": {
    "getDailyWeatherForecast": [
      {
        "id": "23bcacac-86a1-43bb-9d0f-cac3b37b6b9h",
        "siteId": "v3hlN0H5VNp6",
        "weatherAt": 1623153600000,
        "condition": {
          "id": 803,
          "description": "broken clouds: 51-84%",
          "name": "Clouds"
        },
        "temperature": 27.51,
        "temperatureFeel": 28.59,
        "temperatureMin": 22.43,
        "temperatureMax": 28.59,
        "temperatureMorning": 22.43,
        "temperatureEvening": 28.59,
        "temperatureNight": 22.43,
        "pressure": 1000,
        "humidity": 81,
        "dewPoint": 16.75,
        "uvIndex": 3.28,
        "windSpeed": 5.15,
        "windDeg": 123,
        "windGust": 7.88,
        "rainProbability": 0.79,
        "rainVolume": 987.65,
        "cloudiness": 40,
        "sunriseAt": 1623153600000,
        "sunsetAt": 1623153600000,
        "moonriseAt": 1623153600000,
        "moonsetAt": 1623153600000,
        "moonPhase": 0.22
      }
    ]
  }
}

getDataset

Description

Get a dataset for a zone/device.

Response

Returns a Dataset

Arguments
Name Description
siteId - String! The ID of the site where the zone/device is located. A site will always have a hierarchy level of 1.
id - String The ID of the zone/device.
measurements - [String] A list of measurements to include in the dataset. Default = ["temperature"]
interval - DatasetIntervalEnum The time interval for the dataset. If the date range is longer than 30 days we recommend using h1 or d1. Default = m1
fromDate - Int! The starting date and time for the dataset, as a timestamp (in seconds).
toDate - Int! The end date and time for the dataset, as a timestamp (in seconds).
nextToken - String Token to continue getting results if the previous query was paginated. When providing this token, the other parameters must be the same as the previous query. Default = null

Example

Query
query getDataset(
  $siteId: String!,
  $id: String,
  $measurements: [String],
  $interval: DatasetIntervalEnum,
  $fromDate: Int!,
  $toDate: Int!,
  $nextToken: String
) {
  getDataset(
    siteId: $siteId,
    id: $id,
    measurements: $measurements,
    interval: $interval,
    fromDate: $fromDate,
    toDate: $toDate,
    nextToken: $nextToken
  ) {
    rows
    columns
    types
    nextToken
  }
}
Variables
{
  "siteId": "v3hlN0H5VNp6",
  "id": "wZYbmEqoLEfd",
  "measurements": ["temperature"],
  "interval": "m1",
  "fromDate": 1685610374,
  "toDate": 1686042374,
  "nextToken": null
}
Response
{
  "data": {
    "getDataset": {
      "rows": [
        [
          "wZYbmEqoLEfd",
          "temperature",
          "21.27013651529948",
          "2023-06-06 09:05:00.000000000"
        ],
        [
          "wZYbmEqoLEfd",
          "temperature",
          "21.211559295654297",
          "2023-06-06 09:04:00.000000000"
        ],
        [
          "wZYbmEqoLEfd",
          "temperature",
          "23.877697944641113",
          "2023-06-06 09:03:00.000000000"
        ]
      ],
      "columns": ["sensorId", "measurement", "value", "timestamp"],
      "types": ["VARCHAR", "VARCHAR", "DOUBLE", "TIMESTAMP"],
      "nextToken": null
    }
  }
}

getHierarchy

Description

Get an organization's hierarchy. This query is used to get all zones and devices for a given organization.

Response

Returns a Hierarchy

Arguments
Name Description
organizationId - String! The ID of the organization for which you want to fetch the hierarchy.

Example

Query
query getHierarchy($organizationId: String!) {
  getHierarchy(organizationId: $organizationId) {
    zones {
      id
      name
      status
      parentId
      parentPath
      type
      level
    }
    devices {
      id
      name
      deviceType
      zoneId
      zonePath
    }
  }
}
Variables
{"organizationId": "qdZ5fWxw5Om6"}
Response
{
  "data": {
    "getHierarchy": {
      "zones": [
        {
          "id": "v3hlN0H5VNp6",
          "name": "Massive Dynamic",
          "status": "active",
          "parentId": null,
          "parentPath": "/v3hlN0H5VNp6",
          "type": "site",
          "level": 1
        },
        {
          "id": "wZYbmEqoLEfd",
          "name": "NY office",
          "status": "active",
          "parentId": "v3hlN0H5VNp6",
          "parentPath": "/v3hlN0H5VNp6/wZYbmEqoLEfd",
          "type": "facility",
          "level": 2
        }
      ],
      "devices": [
        {
          "id": "spare-hornet-1",
          "name": "spare-hornet-1",
          "deviceType": "envirosense",
          "zoneId": null,
          "zonePath": "/v3hlN0H5VNp6"
        },
        {
          "id": "afraid-crab-3",
          "name": "afraid-crab-3",
          "deviceType": "watersense",
          "zoneId": "v3hlN0H5VNp6",
          "zonePath": "/v3hlN0H5VNp6/wZYbmEqoLEfd"
        }
      ]
    }
  }
}

getHourlyWeatherForecast

Description

Get the hourly weather forecast for a site for a given period of time returned as 1 hour intervals in ascending order.

Response

Returns [HourlyWeatherForecast]

Arguments
Name Description
siteId - String! The ID of the site to get the hourly weather forecast for. A site will always have a hierarchy level of 1.
fromDate - Int! The starting date and time for the weather forecast, as a timestamp (in seconds).
toDate - Int! The end date and time the weather forecast, as a timestamp (in seconds).

Example

Query
query getHourlyWeatherForecast(
  $siteId: String!,
  $fromDate: Int!,
  $toDate: Int!
) {
  getHourlyWeatherForecast(
    siteId: $siteId,
    fromDate: $fromDate,
    toDate: $toDate
  ) {
    id
    siteId
    weatherAt
    condition {
      id
      name
      description
    }
    temperature
    temperatureFeel
    pressure
    humidity
    dewPoint
    uvIndex
    visibility
    windSpeed
    windDeg
    windGust
    rainProbability
    cloudiness
    sunriseAt
    sunsetAt
  }
}
Variables
{"siteId": "v3hlN0H5VNp6", "fromDate": 1685610374, "toDate": 1686042374}
Response
{
  "data": {
    "getHourlyWeatherForecast": [
      {
        "id": "23bcacac-86a1-43bb-9d0f-cac3b37b6b9h",
        "siteId": "v3hlN0H5VNp6",
        "weatherAt": 1623153600000,
        "condition": {
          "id": 803,
          "description": "broken clouds: 51-84%",
          "name": "Clouds"
        },
        "temperature": 27.51,
        "temperatureFeel": 28.59,
        "pressure": 1000,
        "humidity": 81,
        "dewPoint": 16.75,
        "uvIndex": 3.28,
        "visibility": 10000,
        "windSpeed": 5.15,
        "windDeg": 123,
        "windGust": 7.88,
        "rainProbability": null,
        "cloudiness": 40,
        "sunriseAt": 1623153600000,
        "sunsetAt": 1623153600000
      }
    ]
  }
}

getLastXDataset

Description

Get a dataset for a zone/device from last x minutes.

Response

Returns a Dataset

Arguments
Name Description
siteId - String! The ID of the site where the zone/device is located. A site will always have a hierarchy level of 1.
id - String The ID of the zone/device.
measurements - [String] A list of measurements to include in the dataset. Default = ["temperature"]
interval - DatasetIntervalEnum The time interval for the dataset. If the date range is longer than 30 days we recommend using h1 or d1. Default = m1
lastX - DatasetLastXEnum The last x minutes to get the dataset. Default = l1
nextToken - String Token to continue getting results if the previous query was paginated. When providing this token, the other parameters must be the same as the previous query. Default = null

Example

Query
query getLastXDataset(
  $siteId: String!,
  $id: String,
  $measurements: [String],
  $interval: DatasetIntervalEnum,
  $lastX: DatasetLastXEnum,
  $nextToken: String
) {
  getLastXDataset(
    siteId: $siteId,
    id: $id,
    measurements: $measurements,
    interval: $interval,
    lastX: $lastX,
    nextToken: $nextToken
  ) {
    rows
    columns
    types
    nextToken
  }
}
Variables
{
  "siteId": "v3hlN0H5VNp6",
  "id": "wZYbmEqoLEfd",
  "measurements": ["temperature"],
  "interval": "m1",
  "lastX": "l1",
  "nextToken": null
}
Response
{
  "data": {
    "getLastXDataset": {
      "rows": [
        [
          "wZYbmEqoLEfd",
          "temperature",
          "21.27013651529948",
          "2023-06-06 09:05:00.000000000"
        ],
        [
          "wZYbmEqoLEfd",
          "temperature",
          "21.211559295654297",
          "2023-06-06 09:04:00.000000000"
        ],
        [
          "wZYbmEqoLEfd",
          "temperature",
          "23.877697944641113",
          "2023-06-06 09:03:00.000000000"
        ]
      ],
      "columns": ["sensorId", "measurement", "value", "timestamp"],
      "types": ["VARCHAR", "VARCHAR", "DOUBLE", "TIMESTAMP"],
      "nextToken": null
    }
  }
}

getMeasurements

Description

Get all available measurements.

Response

Returns [Measurement]

Example

Query
query getMeasurements {
  getMeasurements {
    id
    shortName
    description
    unit
    type
  }
}
Response
{
  "data": {
    "getMeasurements": [
      {
        "id": "conductivity",
        "shortName": "conductivity",
        "description": "Electrical Conductivity",
        "unit": "mS/cm",
        "type": "hardware"
      }
    ]
  }
}

getVectorDataset

Description

Get a dataset for a zone/device with a calculated measurement.

Response

Returns a VectorDataset

Arguments
Name Description
siteId - String! The ID of the site where the zone/device is located. A site will always have a hierarchy level of 1.
id - String The ID of the zone/device.
measurement - String! A supported measurement. Valid values are: absolute_humidty, daily_energy_consumption, daily_light_integral, growing_degree_hours, salinity, saturation_vapour_pressure, total_dissolved_solids, vapour_pressure_deficit, wet_bulb_temperature.
interval - DatasetIntervalEnum The time interval for the dataset. If the date range is longer than 30 days we recommend using h1 or d1. daily_energy_consumption and daily_light_integral measurements only supports h1. Default = m1
fromDate - Int! The starting date and time for the dataset, as a timestamp (in seconds).
toDate - Int! The end date and time for the dataset, as a timestamp (in seconds).
nextToken - String Token to continue getting results if the previous query was paginated. When providing this token, the other parameters must be the same as the previous query. Default = null

Example

Query
query getVectorDataset(
  $siteId: String!,
  $id: String,
  $measurement: String!,
  $interval: DatasetIntervalEnum,
  $fromDate: Int!,
  $toDate: Int!,
  $nextToken: String
) {
  getVectorDataset(
    siteId: $siteId,
    id: $id,
    measurement: $measurement,
    interval: $interval,
    fromDate: $fromDate,
    toDate: $toDate,
    nextToken: $nextToken
  ) {
    rows
    columns
    types
    nextToken
  }
}
Variables
{
  "siteId": "v3hlN0H5VNp6",
  "id": "wZYbmEqoLEfd",
  "measurement": "absolute_humidity",
  "interval": "m1",
  "fromDate": 1685610374,
  "toDate": 1686042374,
  "nextToken": null
}
Response
{
  "data": {
    "getVectorDataset": {
      "rows": [
        [
          "wZYbmEqoLEfd",
          "absolute_humidity",
          "8.614398835133223",
          "2023-06-06 09:05:00.000000000"
        ],
        [
          "wZYbmEqoLEfd",
          "absolute_humidity",
          "8.660573717535785",
          "2023-06-06 09:04:00.000000000"
        ],
        [
          "wZYbmEqoLEfd",
          "absolute_humidity",
          "8.73230587485847",
          "2023-06-06 09:03:00.000000000"
        ]
      ],
      "columns": ["sensorId", "measurement", "value", "timestamp"],
      "types": ["VARCHAR", "VARCHAR", "DOUBLE", "TIMESTAMP"],
      "nextToken": null
    }
  }
}

Types

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

DailyWeatherForecast

Description

The daily forecast for the specified location.

Fields
Field Name Description
id - ID ID of the forecast.
siteId - String ID of the site for which the forecast is for.
weatherAt - GraphQLTimestamp The date and time of the forecast.
condition - WeatherForecastCondition Weather condition.
temperature - Float The temperature day in degrees Celsius.
temperatureFeel - Float The temperature feel in degrees Celsius.
temperatureMin - Float The minimum daily temperature in degrees Celsius.
temperatureMax - Float The maximum daily temperature in degrees Celsius.
temperatureMorning - Float The morning temperature in degrees Celsius.
temperatureEvening - Float The evening temperature in degrees Celsius.
temperatureNight - Float The night temperature in degrees Celsius.
pressure - Float Atmospheric pressure on the sea level, hPa.
humidity - Float Humidity, %.
dewPoint - Float Atmospheric temperature (in Celsius) below which water droplets begin to condense and dew can form.
uvIndex - Float The maximum value of UV index for the day.
windSpeed - Float Wind speed, metre/sec.
windDeg - Float Wind direction, degrees (meteorological).
windGust - Float Wind gust, metre/sec.
rainProbability - Float Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%.
rainVolume - Float Volume of precipitation for the day, mm.
cloudiness - Float Cloudiness, %.
sunriseAt - GraphQLTimestamp Sunrise time, Unix, UTC
sunsetAt - GraphQLTimestamp Sunset time, Unix, UTC
moonriseAt - GraphQLTimestamp The time of when the moon rises for this day, Unix, UTC
moonsetAt - GraphQLTimestamp The time of when the moon sets for this day, Unix, UTC.
moonPhase - Float Moon phase. 0 and 1 are 'new moon', 0.25 is 'first quarter moon', 0.5 is 'full moon' and 0.75 is 'last quarter moon'. The periods in between are called 'waxing crescent', 'waxing gibous', 'waning gibous', and 'waning crescent', respectively.
Example
{
  "id": "23bcacac-86a1-43bb-9d0f-cac3b37b6b9h",
  "siteId": "v3hlN0H5VNp6",
  "weatherAt": 1623153600000,
  "condition": {
    "id": 803,
    "description": "broken clouds: 51-84%",
    "name": "Clouds"
  },
  "temperature": 27.51,
  "temperatureFeel": 28.59,
  "temperatureMin": 22.43,
  "temperatureMax": 28.59,
  "temperatureMorning": 22.43,
  "temperatureEvening": 28.59,
  "temperatureNight": 22.43,
  "pressure": 1000,
  "humidity": 81,
  "dewPoint": 16.75,
  "uvIndex": 3.28,
  "windSpeed": 5.15,
  "windDeg": 123,
  "windGust": 7.88,
  "rainProbability": 0.79,
  "rainVolume": 123.45,
  "cloudiness": 40,
  "sunriseAt": 1623153600000,
  "sunsetAt": 1623153600000,
  "moonriseAt": 1623153600000,
  "moonsetAt": 1623153600000,
  "moonPhase": 0.22
}

Dataset

Description

The dataset for the specified zone/device.

Fields
Field Name Description
rows - [String] Dataset rows displayed as a list of lists.
columns - [String] Names of the columns in the dataset.
types - [String] Types of columns in the dataset.
nextToken - String Token to continue getting results if the previous query returned paginated.
Example
{
  "rows": [
    [
      "wZYbmEqoLEfd",
      "temperature",
      "21.27013651529948",
      "2023-06-06 09:05:00.000000000"
    ],
    [
      "wZYbmEqoLEfd",
      "temperature",
      "21.211559295654297",
      "2023-06-06 09:04:00.000000000"
    ],
    [
      "wZYbmEqoLEfd",
      "temperature",
      "23.877697944641113",
      "2023-06-06 09:03:00.000000000"
    ]
  ],
  "columns": ["sensorId", "measurement", "value", "timestamp"],
  "types": ["VARCHAR", "VARCHAR", "DOUBLE", "TIMESTAMP"],
  "nextToken": null
}

DatasetIntervalEnum

Description

The amount of time between each data point in the dataset.

Values
Enum Value Description

m1

One minute

h1

One hour

d1

One day
Example
"m1"

DatasetLastXEnum

Description

The last x minutes to fetch data for.

Values
Enum Value Description

l1

Last minute

l5

Last 5 minutes

l10

Last 10 minutes

l30

Last 30 minutes

l60

Last 60 minutes
Example
"l1"

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
987.65

GraphQLTimestamp

Description

Custom Timestamp Scalar Type. Timestamp is in milliseconds.

Example
1623153600000

Hierarchy

Description

The zone and device hierarchies.

Fields
Field Name Description
zones - [HierarchyZone] List of zones.
devices - [HierarchyDevice] List of devices.
Example
{
  "zones": [
    {
      "id": "v3hlN0H5VNp6",
      "name": "Massive Dynamic",
      "status": "active",
      "parentId": null,
      "parentPath": "/v3hlN0H5VNp6",
      "type": "site",
      "level": 1
    },
    {
      "id": "wZYbmEqoLEfd",
      "name": "NY office",
      "status": "active",
      "parentId": "v3hlN0H5VNp6",
      "parentPath": "/v3hlN0H5VNp6/wZYbmEqoLEfd",
      "type": "facility",
      "level": 2
    }
  ],
  "devices": [
    {
      "id": "spare-hornet-1",
      "name": "spare-hornet-1",
      "deviceType": "envirosense",
      "zoneId": null,
      "zonePath": "/v3hlN0H5VNp6"
    },
    {
      "id": "afraid-crab-3",
      "name": "afraid-crab-3",
      "deviceType": "watersense",
      "zoneId": "v3hlN0H5VNp6",
      "zonePath": "/v3hlN0H5VNp6/wZYbmEqoLEfd"
    }
  ]
}

HierarchyDevice

Description

The hierarchy for a device.

Fields
Field Name Description
id - String ID of the device.
name - String Name of the device.
deviceType - String The type of device.
zoneId - String ID of the zone where the device is located.
zonePath - String Full zone path indicating where the device is located.
Example
{
  "id": "spare-hornet-1",
  "name": "spare-hornet-1",
  "deviceType": "envirosense",
  "zoneId": null,
  "zonePath": "/v3hlN0H5VNp6"
}

HierarchyZone

Description

The hierarchy for a zone.

Fields
Field Name Description
id - String ID of the zone.
name - String Name of the zone.
status - String Status of the zone. Possible values: active and inactive.
parentId - String ID of the zone within which the queried zone is located.
parentPath - String Full zone path indicating where the zone is located.
type - String The type of zone. Possible values: site, facility, room and zone.
level - Int Level of the zone according to its hierarchy.
Example
{
  "id": "v3hlN0H5VNp6",
  "name": "Massive Dynamic",
  "status": "active",
  "parentId": null,
  "parentPath": "/v3hlN0H5VNp6",
  "type": "site",
  "level": 1
}

HourlyWeatherForecast

Description

The hourly forecast for the specified location.

Fields
Field Name Description
id - ID ID of the forecast.
siteId - String ID of the site for which the forecast is for.
weatherAt - GraphQLTimestamp The date and time of the forecast.
condition - WeatherForecastCondition Weather condition.
temperature - Float The temperature in degrees Celsius.
temperatureFeel - Float The temperature feel in degrees Celsius.
pressure - Float Atmospheric pressure on the sea level, hPa.
humidity - Float Humidity, %.
dewPoint - Float Atmospheric temperature (in Celsius) below which water droplets begin to condense and dew can form.
uvIndex - Float Current UV index.
visibility - Float Average visibility, metres.
windSpeed - Float Wind speed, metre/sec.
windDeg - Float Wind direction, degrees (meteorological).
windGust - Float Wind gust, metre/sec.
rainProbability - Float Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%.
cloudiness - Float Cloudiness, %.
sunriseAt - GraphQLTimestamp Sunrise time, Unix, UTC
sunsetAt - GraphQLTimestamp Sunset time, Unix, UTC
Example
{
  "id": "23bcacac-86a1-43bb-9d0f-cac3b37b6b9h",
  "siteId": "v3hlN0H5VNp6",
  "weatherAt": 1623153600000,
  "condition": {
    "id": 803,
    "description": "broken clouds: 51-84%",
    "name": "Clouds"
  },
  "temperature": 27.51,
  "temperatureFeel": 28.59,
  "pressure": 1000,
  "humidity": 81,
  "dewPoint": 16.75,
  "uvIndex": 3.28,
  "visibility": 10000,
  "windSpeed": 5.15,
  "windDeg": 123,
  "windGust": 7.88,
  "rainProbability": null,
  "cloudiness": 40,
  "sunriseAt": 1623153600000,
  "sunsetAt": 1623153600000
}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
987

Measurement

Description

The details of the measurement.

Fields
Field Name Description
id - String ID of the measurement.
shortName - String Short name of the measurement.
description - String Full name of the measurement.
unit - String Unit of measurement used.
type - String Type of measurement. Possible values: hardware and calculation. hardware measurements are those that are directly measured by the device/sensor. calculation measurements are those that need at least 1 hardware measurement to be calculated.
Example
{
  "id": "conductivity",
  "shortName": "conductivity",
  "description": "Electrical Conductivity",
  "unit": "mS/cm",
  "type": "hardware"
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

VectorDataset

Description

The dataset for the specified zone/device and calculated measurement.

Fields
Field Name Description
rows - [String] Dataset rows displayed as a list of lists.
columns - [String] Names of the columns in the dataset.
types - [String] Types of columns in the dataset.
nextToken - String Token to continue getting results if the previous query returned paginated.
Example
{
  "rows": [
    [
      "wZYbmEqoLEfd",
      "absolute_humidity",
      "8.614398835133223",
      "2023-06-06 09:05:00.000000000"
    ],
    [
      "wZYbmEqoLEfd",
      "absolute_humidity",
      "8.660573717535785",
      "2023-06-06 09:04:00.000000000"
    ],
    [
      "wZYbmEqoLEfd",
      "absolute_humidity",
      "8.73230587485847",
      "2023-06-06 09:03:00.000000000"
    ]
  ],
  "columns": ["sensorId", "measurement", "value", "timestamp"],
  "types": ["VARCHAR", "VARCHAR", "DOUBLE", "TIMESTAMP"],
  "nextToken": null
}

WeatherForecastCondition

Description

Weather condition.

Fields
Field Name Description
id - Int ID of the weather condition.
name - String Name of the weather condition.
description - String Description of the weather condition.
Example
{"id": 803, "name": "Clouds", "description": "broken clouds: 51-84%"}