NOWi Water Monitoring GraphQL API
NOWi GraphQL API
Terms of Service
API Endpoints
https://graphql.nowisensors.com/graphql
Headers
# Your API token from the dashboard. Must be included in all API calls.
Authorization: x-api-key <YOUR_API_KEY>
Version
0.0.1
Queries
getSensorData
Response
Returns a SensorData
Arguments
Name | Description |
---|---|
id - ID!
|
Example
Query
query getSensorData($id: ID!) {
getSensorData(id: $id) {
id
devEui
waterMeterID
date
flowRate
totalGallons
temperatureC
rssi
snr
apiVersion
totalPulses
fcnt
hotspots {
...HotspotFragment
}
longestDurationBetweenPulsesSeconds
lowestPulseRate
notConfigured
holdTimeSeconds
rawData
createdAt
updatedAt
}
}
Variables
{"id": "4"}
Response
{
"data": {
"getSensorData": {
"id": "4",
"devEui": 4,
"waterMeterID": 4,
"date": AWSDateTime,
"flowRate": 123.45,
"totalGallons": 987.65,
"temperatureC": 123.45,
"rssi": 987.65,
"snr": 123.45,
"apiVersion": 987,
"totalPulses": 123.45,
"fcnt": 987,
"hotspots": [Hotspot],
"longestDurationBetweenPulsesSeconds": 987.65,
"lowestPulseRate": 987.65,
"notConfigured": true,
"holdTimeSeconds": 987,
"rawData": "xyz789",
"createdAt": AWSDateTime,
"updatedAt": AWSDateTime
}
}
}
listSensorData
Response
Returns a ModelSensorDataConnection
Arguments
Name | Description |
---|---|
filter - ModelSensorDataFilterInput
|
|
limit - Int
|
|
nextToken - String
|
Example
Query
query listSensorData(
$filter: ModelSensorDataFilterInput,
$limit: Int,
$nextToken: String
) {
listSensorData(
filter: $filter,
limit: $limit,
nextToken: $nextToken
) {
items {
...SensorDataFragment
}
nextToken
}
}
Variables
{
"filter": ModelSensorDataFilterInput,
"limit": 123,
"nextToken": "abc123"
}
Response
{
"data": {
"listSensorData": {
"items": [SensorData],
"nextToken": "abc123"
}
}
}
sensorDataByDate
Response
Returns a ModelSensorDataConnection
Arguments
Name | Description |
---|---|
devEui - ID!
|
|
date - ModelStringKeyConditionInput
|
|
sortDirection - ModelSortDirection
|
|
filter - ModelSensorDataFilterInput
|
|
limit - Int
|
|
nextToken - String
|
Example
Query
query sensorDataByDate(
$devEui: ID!,
$date: ModelStringKeyConditionInput,
$sortDirection: ModelSortDirection,
$filter: ModelSensorDataFilterInput,
$limit: Int,
$nextToken: String
) {
sensorDataByDate(
devEui: $devEui,
date: $date,
sortDirection: $sortDirection,
filter: $filter,
limit: $limit,
nextToken: $nextToken
) {
items {
...SensorDataFragment
}
nextToken
}
}
Variables
{
"devEui": 4,
"date": ModelStringKeyConditionInput,
"sortDirection": "ASC",
"filter": ModelSensorDataFilterInput,
"limit": 123,
"nextToken": "abc123"
}
Response
{
"data": {
"sensorDataByDate": {
"items": [SensorData],
"nextToken": "xyz789"
}
}
}
Subscriptions
onCreateSensorData
Response
Returns a SensorData
Example
Query
subscription onCreateSensorData {
onCreateSensorData {
id
devEui
waterMeterID
date
flowRate
totalGallons
temperatureC
rssi
snr
apiVersion
totalPulses
fcnt
hotspots {
...HotspotFragment
}
longestDurationBetweenPulsesSeconds
lowestPulseRate
notConfigured
holdTimeSeconds
rawData
createdAt
updatedAt
}
}
Response
{
"data": {
"onCreateSensorData": {
"id": 4,
"devEui": 4,
"waterMeterID": 4,
"date": AWSDateTime,
"flowRate": 987.65,
"totalGallons": 123.45,
"temperatureC": 123.45,
"rssi": 987.65,
"snr": 987.65,
"apiVersion": 123,
"totalPulses": 987.65,
"fcnt": 123,
"hotspots": [Hotspot],
"longestDurationBetweenPulsesSeconds": 123.45,
"lowestPulseRate": 987.65,
"notConfigured": true,
"holdTimeSeconds": 987,
"rawData": "abc123",
"createdAt": AWSDateTime,
"updatedAt": AWSDateTime
}
}
}
Types
AWSDateTime
Description
The AWSDateTime
scalar type provided by AWS AppSync, represents a valid extended ISO 8601 DateTime string. In other words, this scalar type accepts datetime strings of the form YYYY-MM-DDThh:mm:ss.SSSZ
. The scalar can also accept "negative years" of the form -YYYY
which correspond to years before 0000
. For example, "-2017-01-01T00:00Z" and "-9999-01-01T00:00Z" are both valid datetime strings. The field after the two digit seconds field is a nanoseconds field. It can accept between 1 and 9 digits. So, for example, "1970-01-01T12:00:00.2Z", "1970-01-01T12:00:00.277Z" and "1970-01-01T12:00:00.123456789Z" are all valid datetime strings. The seconds and nanoseconds fields are optional (the seconds field must be specified if the nanoseconds field is to be used). The time zone offset is compulsory for this scalar. The time zone offset must either be Z
(representing the UTC time zone) or be in the format ±hh:mm:ss
. The seconds field in the timezone offset will be considered valid even though it is not part of the ISO 8601 standard.
Example
AWSDateTime
Boolean
Description
Built-in Boolean
Example
true
Float
Description
Built-in Float
Example
987.65
Hotspot
Example
{
"channel": 123,
"frequency": 123.45,
"lat": 987.65,
"long": 123.45,
"name": "abc123",
"rssi": 123.45,
"snr": 987.65,
"spreading": "xyz789",
"status": "xyz789"
}
ID
Description
Built-in ID
Example
"4"
Int
Description
Built-in Int
Example
123
ModelAttributeTypes
Values
Enum Value | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
"binary"
ModelBooleanInput
Fields
Input Field | Description |
---|---|
ne - Boolean
|
|
eq - Boolean
|
|
attributeExists - Boolean
|
|
attributeType - ModelAttributeTypes
|
Example
{"ne": false, "eq": false, "attributeExists": false, "attributeType": "binary"}
ModelDeviceConfigurationFilterInput
Fields
Input Field | Description |
---|---|
id - ModelIDInput
|
|
organizationID - ModelIDInput
|
|
name - ModelStringInput
|
|
startDate - ModelStringInput
|
|
endDate - ModelStringInput
|
|
pulsesPerGallon - ModelFloatInput
|
|
manufacturer - ModelStringInput
|
|
model - ModelStringInput
|
|
size - ModelStringInput
|
|
and - [ModelDeviceConfigurationFilterInput]
|
|
or - [ModelDeviceConfigurationFilterInput]
|
|
not - ModelDeviceConfigurationFilterInput
|
Example
{
"id": ModelIDInput,
"organizationID": ModelIDInput,
"name": ModelStringInput,
"startDate": ModelStringInput,
"endDate": ModelStringInput,
"pulsesPerGallon": ModelFloatInput,
"manufacturer": ModelStringInput,
"model": ModelStringInput,
"size": ModelStringInput,
"and": [ModelDeviceConfigurationFilterInput],
"or": [ModelDeviceConfigurationFilterInput],
"not": ModelDeviceConfigurationFilterInput
}
ModelFloatInput
Example
{
"ne": 123.45,
"eq": 987.65,
"le": 987.65,
"lt": 123.45,
"ge": 123.45,
"gt": 123.45,
"between": [123.45],
"attributeExists": false,
"attributeType": "binary"
}
ModelHardwareDataConditionInput
Fields
Input Field | Description |
---|---|
devEui - ModelIDInput
|
|
waterMeterID - ModelIDInput
|
|
date - ModelStringInput
|
|
batteryPercent - ModelFloatInput
|
|
batteryMilliVolts - ModelFloatInput
|
|
apiVersion - ModelIntInput
|
|
temperatureC - ModelFloatInput
|
|
holdTimeSeconds - ModelIntInput
|
|
and - [ModelHardwareDataConditionInput]
|
|
or - [ModelHardwareDataConditionInput]
|
|
not - ModelHardwareDataConditionInput
|
Example
{
"devEui": ModelIDInput,
"waterMeterID": ModelIDInput,
"date": ModelStringInput,
"batteryPercent": ModelFloatInput,
"batteryMilliVolts": ModelFloatInput,
"apiVersion": ModelIntInput,
"temperatureC": ModelFloatInput,
"holdTimeSeconds": ModelIntInput,
"and": [ModelHardwareDataConditionInput],
"or": [ModelHardwareDataConditionInput],
"not": ModelHardwareDataConditionInput
}
ModelHardwareDataFilterInput
Fields
Input Field | Description |
---|---|
devEui - ModelIDInput
|
|
waterMeterID - ModelIDInput
|
|
date - ModelStringInput
|
|
batteryPercent - ModelFloatInput
|
|
batteryMilliVolts - ModelFloatInput
|
|
apiVersion - ModelIntInput
|
|
temperatureC - ModelFloatInput
|
|
holdTimeSeconds - ModelIntInput
|
|
and - [ModelHardwareDataFilterInput]
|
|
or - [ModelHardwareDataFilterInput]
|
|
not - ModelHardwareDataFilterInput
|
Example
{
"devEui": ModelIDInput,
"waterMeterID": ModelIDInput,
"date": ModelStringInput,
"batteryPercent": ModelFloatInput,
"batteryMilliVolts": ModelFloatInput,
"apiVersion": ModelIntInput,
"temperatureC": ModelFloatInput,
"holdTimeSeconds": ModelIntInput,
"and": [ModelHardwareDataFilterInput],
"or": [ModelHardwareDataFilterInput],
"not": ModelHardwareDataFilterInput
}
ModelIDInput
Example
{
"ne": 4,
"eq": 4,
"le": 4,
"lt": 4,
"ge": 4,
"gt": "4",
"contains": "4",
"notContains": 4,
"between": [4],
"beginsWith": 4,
"attributeExists": true,
"attributeType": "binary",
"size": ModelSizeInput
}
ModelIntInput
Example
{
"ne": 123,
"eq": 987,
"le": 123,
"lt": 123,
"ge": 123,
"gt": 123,
"between": [123],
"attributeExists": true,
"attributeType": "binary"
}
ModelLocationFilterInput
Fields
Input Field | Description |
---|---|
id - ModelIDInput
|
|
address - ModelStringInput
|
|
addressShort - ModelStringInput
|
|
name - ModelStringInput
|
|
googlePlaceID - ModelStringInput
|
|
utcOffsetSeconds - ModelIntInput
|
|
organizationID - ModelIDInput
|
|
alertsSilenced - ModelBooleanInput
|
|
notes - ModelStringInput
|
|
locationGroupID - ModelIDInput
|
|
and - [ModelLocationFilterInput]
|
|
or - [ModelLocationFilterInput]
|
|
not - ModelLocationFilterInput
|
Example
{
"id": ModelIDInput,
"address": ModelStringInput,
"addressShort": ModelStringInput,
"name": ModelStringInput,
"googlePlaceID": ModelStringInput,
"utcOffsetSeconds": ModelIntInput,
"organizationID": ModelIDInput,
"alertsSilenced": ModelBooleanInput,
"notes": ModelStringInput,
"locationGroupID": ModelIDInput,
"and": [ModelLocationFilterInput],
"or": [ModelLocationFilterInput],
"not": ModelLocationFilterInput
}
ModelSensorDataConditionInput
Fields
Input Field | Description |
---|---|
devEui - ModelIDInput
|
|
waterMeterID - ModelIDInput
|
|
date - ModelStringInput
|
|
flowRate - ModelFloatInput
|
|
totalGallons - ModelFloatInput
|
|
temperatureC - ModelFloatInput
|
|
rssi - ModelFloatInput
|
|
snr - ModelFloatInput
|
|
apiVersion - ModelIntInput
|
|
totalPulses - ModelFloatInput
|
|
fcnt - ModelIntInput
|
|
longestDurationBetweenPulsesSeconds - ModelFloatInput
|
|
lowestPulseRate - ModelFloatInput
|
|
notConfigured - ModelBooleanInput
|
|
holdTimeSeconds - ModelIntInput
|
|
rawData - ModelStringInput
|
|
and - [ModelSensorDataConditionInput]
|
|
or - [ModelSensorDataConditionInput]
|
|
not - ModelSensorDataConditionInput
|
Example
{
"devEui": ModelIDInput,
"waterMeterID": ModelIDInput,
"date": ModelStringInput,
"flowRate": ModelFloatInput,
"totalGallons": ModelFloatInput,
"temperatureC": ModelFloatInput,
"rssi": ModelFloatInput,
"snr": ModelFloatInput,
"apiVersion": ModelIntInput,
"totalPulses": ModelFloatInput,
"fcnt": ModelIntInput,
"longestDurationBetweenPulsesSeconds": ModelFloatInput,
"lowestPulseRate": ModelFloatInput,
"notConfigured": ModelBooleanInput,
"holdTimeSeconds": ModelIntInput,
"rawData": ModelStringInput,
"and": [ModelSensorDataConditionInput],
"or": [ModelSensorDataConditionInput],
"not": ModelSensorDataConditionInput
}
ModelSensorDataConnection
Fields
Field Name | Description |
---|---|
items - [SensorData]!
|
|
nextToken - String
|
Example
{
"items": [SensorData],
"nextToken": "abc123"
}
ModelSensorDataFilterInput
Fields
Input Field | Description |
---|---|
id - ModelIDInput
|
|
devEui - ModelIDInput
|
|
waterMeterID - ModelIDInput
|
|
date - ModelStringInput
|
|
flowRate - ModelFloatInput
|
|
totalGallons - ModelFloatInput
|
|
temperatureC - ModelFloatInput
|
|
rssi - ModelFloatInput
|
|
snr - ModelFloatInput
|
|
apiVersion - ModelIntInput
|
|
totalPulses - ModelFloatInput
|
|
fcnt - ModelIntInput
|
|
longestDurationBetweenPulsesSeconds - ModelFloatInput
|
|
lowestPulseRate - ModelFloatInput
|
|
notConfigured - ModelBooleanInput
|
|
holdTimeSeconds - ModelIntInput
|
|
rawData - ModelStringInput
|
|
and - [ModelSensorDataFilterInput]
|
|
or - [ModelSensorDataFilterInput]
|
|
not - ModelSensorDataFilterInput
|
Example
{
"id": ModelIDInput,
"devEui": ModelIDInput,
"waterMeterID": ModelIDInput,
"date": ModelStringInput,
"flowRate": ModelFloatInput,
"totalGallons": ModelFloatInput,
"temperatureC": ModelFloatInput,
"rssi": ModelFloatInput,
"snr": ModelFloatInput,
"apiVersion": ModelIntInput,
"totalPulses": ModelFloatInput,
"fcnt": ModelIntInput,
"longestDurationBetweenPulsesSeconds": ModelFloatInput,
"lowestPulseRate": ModelFloatInput,
"notConfigured": ModelBooleanInput,
"holdTimeSeconds": ModelIntInput,
"rawData": ModelStringInput,
"and": [ModelSensorDataFilterInput],
"or": [ModelSensorDataFilterInput],
"not": ModelSensorDataFilterInput
}
ModelSizeInput
ModelSortDirection
Values
Enum Value | Description |
---|---|
|
|
|
Example
"ASC"
ModelStringInput
Example
{
"ne": "xyz789",
"eq": "xyz789",
"le": "xyz789",
"lt": "xyz789",
"ge": "abc123",
"gt": "xyz789",
"contains": "xyz789",
"notContains": "xyz789",
"between": ["xyz789"],
"beginsWith": "abc123",
"attributeExists": true,
"attributeType": "binary",
"size": ModelSizeInput
}
ModelStringKeyConditionInput
ModelSubscriptionDetectedIssueFilterInput
Fields
Input Field | Description |
---|---|
and - [ModelSubscriptionDetectedIssueFilterInput]
|
|
or - [ModelSubscriptionDetectedIssueFilterInput]
|
Example
{
"and": [ModelSubscriptionDetectedIssueFilterInput],
"or": [ModelSubscriptionDetectedIssueFilterInput]
}
ModelWaterMeterFilterInput
Fields
Input Field | Description |
---|---|
id - ModelIDInput
|
|
name - ModelStringInput
|
|
units - ModelFloatInput
|
|
configurationID - ModelIDInput
|
|
deviceID - ModelIDInput
|
|
locationID - ModelIDInput
|
|
and - [ModelWaterMeterFilterInput]
|
|
or - [ModelWaterMeterFilterInput]
|
|
not - ModelWaterMeterFilterInput
|
Example
{
"id": ModelIDInput,
"name": ModelStringInput,
"units": ModelFloatInput,
"configurationID": ModelIDInput,
"deviceID": ModelIDInput,
"locationID": ModelIDInput,
"and": [ModelWaterMeterFilterInput],
"or": [ModelWaterMeterFilterInput],
"not": ModelWaterMeterFilterInput
}
ModelWaterPresenceDataConditionInput
Fields
Input Field | Description |
---|---|
uuid - ModelIDInput
|
|
batteryMilliVolts - ModelFloatInput
|
|
locationID - ModelIDInput
|
|
devEui - ModelIDInput
|
|
waterPresent - ModelBooleanInput
|
|
waterEvents - ModelIntInput
|
|
waterPresentDurationMin - ModelIntInput
|
|
snr - ModelFloatInput
|
|
rssi - ModelFloatInput
|
|
fcnt - ModelIntInput
|
|
and - [ModelWaterPresenceDataConditionInput]
|
|
or - [ModelWaterPresenceDataConditionInput]
|
|
not - ModelWaterPresenceDataConditionInput
|
Example
{
"uuid": ModelIDInput,
"batteryMilliVolts": ModelFloatInput,
"locationID": ModelIDInput,
"devEui": ModelIDInput,
"waterPresent": ModelBooleanInput,
"waterEvents": ModelIntInput,
"waterPresentDurationMin": ModelIntInput,
"snr": ModelFloatInput,
"rssi": ModelFloatInput,
"fcnt": ModelIntInput,
"and": [ModelWaterPresenceDataConditionInput],
"or": [ModelWaterPresenceDataConditionInput],
"not": ModelWaterPresenceDataConditionInput
}
ModelWaterPresenceDataFilterInput
Fields
Input Field | Description |
---|---|
id - ModelIDInput
|
|
uuid - ModelIDInput
|
|
date - ModelStringInput
|
|
batteryMilliVolts - ModelFloatInput
|
|
locationID - ModelIDInput
|
|
devEui - ModelIDInput
|
|
waterPresent - ModelBooleanInput
|
|
waterEvents - ModelIntInput
|
|
waterPresentDurationMin - ModelIntInput
|
|
snr - ModelFloatInput
|
|
rssi - ModelFloatInput
|
|
fcnt - ModelIntInput
|
|
and - [ModelWaterPresenceDataFilterInput]
|
|
or - [ModelWaterPresenceDataFilterInput]
|
|
not - ModelWaterPresenceDataFilterInput
|
Example
{
"id": ModelIDInput,
"uuid": ModelIDInput,
"date": ModelStringInput,
"batteryMilliVolts": ModelFloatInput,
"locationID": ModelIDInput,
"devEui": ModelIDInput,
"waterPresent": ModelBooleanInput,
"waterEvents": ModelIntInput,
"waterPresentDurationMin": ModelIntInput,
"snr": ModelFloatInput,
"rssi": ModelFloatInput,
"fcnt": ModelIntInput,
"and": [ModelWaterPresenceDataFilterInput],
"or": [ModelWaterPresenceDataFilterInput],
"not": ModelWaterPresenceDataFilterInput
}
SensorData
Fields
Field Name | Description |
---|---|
id - ID!
|
|
devEui - ID!
|
|
waterMeterID - ID
|
|
date - AWSDateTime
|
|
flowRate - Float
|
|
totalGallons - Float
|
|
temperatureC - Float
|
|
rssi - Float
|
|
snr - Float
|
|
apiVersion - Int
|
|
totalPulses - Float
|
|
fcnt - Int
|
|
hotspots - [Hotspot]
|
|
longestDurationBetweenPulsesSeconds - Float
|
|
lowestPulseRate - Float
|
|
notConfigured - Boolean
|
|
holdTimeSeconds - Int
|
|
rawData - String
|
|
createdAt - AWSDateTime!
|
|
updatedAt - AWSDateTime!
|
Example
{
"id": "4",
"devEui": 4,
"waterMeterID": 4,
"date": AWSDateTime,
"flowRate": 123.45,
"totalGallons": 987.65,
"temperatureC": 987.65,
"rssi": 123.45,
"snr": 987.65,
"apiVersion": 987,
"totalPulses": 987.65,
"fcnt": 123,
"hotspots": [Hotspot],
"longestDurationBetweenPulsesSeconds": 987.65,
"lowestPulseRate": 987.65,
"notConfigured": true,
"holdTimeSeconds": 123,
"rawData": "xyz789",
"createdAt": AWSDateTime,
"updatedAt": AWSDateTime
}
String
Description
Built-in String
Example
"abc123"