Skip to content

Readings for one sensor

POST
/GetDataBySensor
curl --request POST \
--url https://api.eianalytic.com/ApiWeb.svc/GetDataBySensor \
--header 'Content-Type: application/json' \
--data '{ "phantomCode": 1, "StartDate": "2019-10-10", "EndDate": "2019-10-10", "Token": "example" }'
Media typeapplication/json
object
phantomCode
required

Sensor serial number.

integer
StartDate

yyyy-MM-dd for a whole day, or yyyy-MM-dd HH:mm:ss (24-hour clock) for an instant. A date-only value returns everything in that range.

string
EndDate

yyyy-MM-dd for a whole day, or yyyy-MM-dd HH:mm:ss (24-hour clock) for an instant. A date-only value returns everything in that range.

string
Token
required

The database token returned by Login. Sent in the request body, not in a header.

string

Readings grouped by channel.

Media typeapplication/json
Array<object>
object
Key

The Key half of every response envelope.

object
StatusNumber
required

0 means OK. See the Conventions page for the full table.

integer
Description
required
string
Configs

Present on some responses; empty in the documented examples.

Array<object>
object
Value
Array<object>

Readings for one channel of one sensor.

object
Channel
integer
PhantomCode
integer
PhantomName
string
MachineName
string
PointName
string
values

Nested one level deeper than a flat list, per the source examples.

Array<Array<object>>
Example
[
{
"Key": {
"StatusNumber": 0,
"Description": "OK"
},
"Value": [
{
"values": [
[
{
"Date": "2022/02/28 20:07:10",
"DescUnit": "Amp P1 AmpMin"
}
]
]
}
]
}
]