Skip to content

Conventions

These conventions hold across every PHANTOM® Web Service endpoint.

The path names an operation, not a resource, and reads are POST too:

POST /getAccelData
POST /getStateData

Two endpoints are the exception and are GET:

  • ServiceOk
  • utcTime

There is none to send. See the warning on the service overview.

Every read response is an array containing a single object with a Key and a Value — .NET’s serialisation of Dictionary<Status, List<T>>:

[
{
"Key": { "StatusNumber": 0, "Description": "OK", "Configs": [] },
"Value": [
/* the records */
]
}
]

Reading a result means going to response[0].Value. Checking for success means response[0].Key.StatusNumber === 0.

The two write endpoints (saveSettings, UpdateConfig) return a bare Status object instead, with no envelope around it.

0 is the only success value.

Code Meaning
0 OK
500 No data
501 Error getting data
502 Range invalid for the type of sensor
503 Interval too low — must be higher than 10 minutes
504 RMS check interval too low — must be higher than 30 seconds
505 Alarm value too low — must be higher than 0.5 mm/s
506 The sensor does not accept settings

Codes 502 to 506 are validation failures from the two write endpoints. 500 simply means nothing was stored for that sensor and day — it is the normal answer to a query for a day with no data, not an error.

In requests, a single format: yyyy-MM-dd. Each read returns one sensor’s records for one day.

In responses, timestamps are .NET-serialised — milliseconds since the Unix epoch followed by a UTC offset:

"time_data": "/Date(1621608806000-0500)/"

Values are metric: velocity in mm/s, acceleration in G, temperature in °C, current in A, voltage in V.

Two of them need arithmetic before they mean anything:

  • Acceleration waveforms arrive as signed 16-bit integers. Multiply each sample by the record’s calibration field to get G.
  • Current readings must be multiplied by the clamp factor: 50 A → ×0.5, 100 A → ×1, 250 A → ×2.5, 500 A → ×5.

4-20 mA sensors report voltage, not current: the value is measured across a 100 Ω resistor to ground, so 20 mA reads 2.0 V and 4 mA reads 0.4 V.

Battery voltage means different things per battery chemistry — see Battery ranges.