GET api/SensorData/IOData?SerialNumber={SerialNumber}&BeforeDate={BeforeDate}&AfterDate={AfterDate}&Count={Count}&SortDescending={SortDescending}

Get I/O data from Units that support it.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
SerialNumber

Unit serial number

string

Required

BeforeDate

Only records before this date (Optional)

date

None.

AfterDate

Only records after this date (Optional)

date

None.

Count

Number of records to return (Optional, default is 10 records)

integer32

Default value is 10

SortDescending

Sort result by descending timestamp - latest record first (Optional, default is ascending timestamp)

boolean

Default value is True

Body Parameters

None.

Response Information

Resource Description

Get I/O data from Units that support it.

Collection of IOData
NameDescriptionTypeAdditional information
SerialNumber

Unit Serialnumber

string

Required

Timestamp

Timestamp in UTC

date

None.

DigitalInput1

State of the input. true if high, false if low. Value is null if the unit does not support this input

boolean

None.

DigitalInput2

State of the input. true if high, false if low. Value is null if the unit does not support this input

boolean

None.

DigitalInput3

State of the input. true if high, false if low. Value is null if the unit does not support this input

boolean

None.

AnalogInput1

Measurement of the input in mV. Value is null if the unit does not support this input

integer32

None.

AnalogInput2

Measurement of the input in mV. Value is null if the unit does not support this input

integer32

None.

DigitalOutput1

State of the output. true if high, false if low. Value is null if the unit does not support this output

boolean

None.

DigitalOutput2

State of the output. true if high, false if low. Value is null if the unit does not support this output

boolean

None.

DigitalOutput3

State of the output. true if high, false if low. Value is null if the unit does not support this output

boolean

None.

IOTrigger

A bitmask for the input(s) that triggered a report. If value is None, the report was not triggered by an input, but from some other source.

UnitIOTriggerEnum

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "SerialNumber": "sample string 1",
    "Timestamp": "2024-11-21T09:49:54.43332+00:00",
    "DigitalInput1": true,
    "DigitalInput2": true,
    "DigitalInput3": true,
    "AnalogInput1": 1,
    "AnalogInput2": 1,
    "DigitalOutput1": true,
    "DigitalOutput2": true,
    "DigitalOutput3": true,
    "IOTrigger": 0
  },
  {
    "SerialNumber": "sample string 1",
    "Timestamp": "2024-11-21T09:49:54.43332+00:00",
    "DigitalInput1": true,
    "DigitalInput2": true,
    "DigitalInput3": true,
    "AnalogInput1": 1,
    "AnalogInput2": 1,
    "DigitalOutput1": true,
    "DigitalOutput2": true,
    "DigitalOutput3": true,
    "IOTrigger": 0
  }
]

application/xml, text/xml

Sample:
<ArrayOfIOData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models">
  <IOData>
    <AnalogInput1>1</AnalogInput1>
    <AnalogInput2>1</AnalogInput2>
    <DigitalInput1>true</DigitalInput1>
    <DigitalInput2>true</DigitalInput2>
    <DigitalInput3>true</DigitalInput3>
    <DigitalOutput1>true</DigitalOutput1>
    <DigitalOutput2>true</DigitalOutput2>
    <DigitalOutput3>true</DigitalOutput3>
    <IOTrigger>None</IOTrigger>
    <SerialNumber>sample string 1</SerialNumber>
    <Timestamp>2024-11-21T09:49:54.43332+00:00</Timestamp>
  </IOData>
  <IOData>
    <AnalogInput1>1</AnalogInput1>
    <AnalogInput2>1</AnalogInput2>
    <DigitalInput1>true</DigitalInput1>
    <DigitalInput2>true</DigitalInput2>
    <DigitalInput3>true</DigitalInput3>
    <DigitalOutput1>true</DigitalOutput1>
    <DigitalOutput2>true</DigitalOutput2>
    <DigitalOutput3>true</DigitalOutput3>
    <IOTrigger>None</IOTrigger>
    <SerialNumber>sample string 1</SerialNumber>
    <Timestamp>2024-11-21T09:49:54.43332+00:00</Timestamp>
  </IOData>
</ArrayOfIOData>