Conventions
These conventions hold across every EI-Analytic™ endpoint. Read this once and the rest of the reference stops being surprising.
Everything is POST
Section titled “Everything is POST”Including reads. The path names an operation, not a resource:
POST /GetMachinesPOST /GetHistoryMeasuresThere are no GET endpoints in this API.
The token goes in the body
Section titled “The token goes in the body”Not in a header. Every authenticated call carries a Token field inside its
JSON body — see Authentication.
The response envelope
Section titled “The response envelope”Every response is an array containing a single object with a Key and a
Value. This is how .NET serialises a Dictionary<Status, List<T>> to JSON:
the key is the status of the call, the value is the payload.
[ { "Key": { "StatusNumber": 0, "Description": "OK", "Configs": [] }, "Value": [ /* the actual data */ ] }]Reading a result means going to response[0].Value. Checking for success means
response[0].Key.StatusNumber === 0.
In requests, dates are plain strings:
| Format | Meaning |
|---|---|
yyyy-MM-dd |
A whole day |
yyyy-MM-dd HH:mm:ss |
An instant, on a 24-hour clock |
Passing a date without a time returns everything in that range.
In responses, two different shapes appear:
"DateTimeExp": "/Date(1566511365000-0500)/""Date": "2021-06-18 09:16:51"The first is .NET’s serialised DateTime — milliseconds since the Unix epoch
followed by a UTC offset. The second is a plain string.
Real values are expressed in the metric system: velocity in mm/s, acceleration in G, temperature in °C, current in A.
Two response fields need decoding rather than reading:
- Spectra and waveforms from
GetFFT_Base64arrive base64-encoded and must be unpacked into a float array — see Decoding spectra. - Thermal images from
GetThermoDataare base64 JPEGs.
Unit fields come in two forms
Section titled “Unit fields come in two forms”AccelUnit, VelUnit and EnvUnit are always strings, but their contents
depend on the endpoint:
| Form | Example | Returned by |
|---|---|---|
| Readable label | "G", "mm/s", "GE" |
GetHistoryMeasures |
| Numeric code as a string | "0", "2", "6" |
GetCurrentMeasures |
The codes are SignalTypeOut
values, so "0" and "G" mean the same thing, as do "2" and "mm/s", and
"6" and "GE".
Normalise on read: try parsing the value as an integer; if it parses, map it through the table, otherwise use it as the label. One helper handles both.
Unfiltered hierarchy levels
Section titled “Unfiltered hierarchy levels”GetDevices and GetCurrentMeasures accept -1 in a hierarchy field to mean
“do not filter at this level”.