API Payload Objects

ZeusAPI uses JSON as a data exchange format.

A payload in JSON can contain:

  • List
  • Objects
  • Lists of objects

For the date type we have a string with the following format:


List of Strings

Simple lists of string of variable size. It can contain empty strings.

["name0","name1","",...,"nameN"]

Key-Value

A simple key-value pair. ZeusAPI can also use key-value pair lists.

{
	"Key":"myKey",
	"Value":"myValue"
}

Station Properties

Object with the following members:

  • Model. String. The model of the device, for example "NEMOS_N200", "HERMES_M100", etc.
  • Serial. String. The device serial number.
  • Latitude. String. GPS latitude, in decimal format.
  • Longitude. String. GPS longitude, in decimal format.
  • Group. String. Zeus Group.
  • Reference1. String. Reference 1 field filled on Zeus Server Stations tab, usually containing more info or some reference of internal use.
  • Reference2. String. Reference 2 field filled on Zeus Server Stations tab, usually containing more info or some reference of internal use.
  • ChannelNames. String List. List of names for every channel. Every index corresponding to Channels Enumeration.
  • ChannelUnits. String List. List of units for every channel. Every index corresponding to Channels Enumeration.
  • ChannelViews. Object containing views configured for this station inside "Views" tab on Zeus Server. Each element contains the name view and a list of string.
{
	"Model":"NEMOS_N200",
	"Serial":"514652",
	"Latitude":"47.344754",
	"Longitude":"-8.802862",
	"Group":"Zeus Group",
	"Reference1":"",
	"Reference2":"",
	"ChannelsNames": ["",...,""],
	"ChannelUnits":["",...,""],
	"ChannelViews":
		{
			"ZEUSDEFVIEW":["105","106","93"],
			"View1":["105","106"]
		}
}

Station Extended Properties

It has the same members as StationProperties plus other extended ones. These members may vary in number depending on the implementation.:


Last Known Values

Object with the following members:

  • lastConnectionTime. Date (details). Timestamp of values (UTC).
  • RSSI. Integer. Received Signal Strength Indication (RSSI).
  • PowerSupply. String. Can be an Integer with Voltage or a String with "green" (good condition), "orange" (must replace batteries in 3 months) or "red" (must replace batteries within current month).
  • values. Object containing list of values. Every key corresponding to Channels Enumeration.
{
	"lastConnectionTime":"17-04-2019;10:58:00.268",
	"RSSI":26,
	"PowerSupply":"7,3V",
	"values":
		{
			"0":0.5,
			"1":40.3,
			"2":1,
			...
			"220":0
		}
}

Historical

Object with the following members. ZeusAPI can also use Historical lists:

{
	"DateOfRecord":"20-03-2019;12:17:49.193",
	"ChannelID":105,
	"Reason":"1",
	"Value":1.1
}

Alarms

Object with the following members. ZeusAPI can also use Alarms lists:

  • StationID. String. ID (ZeusID) of the station.
  • DateOfRecord. Date (details). Timestamp of the record.
  • Reason. Integer. Reason of the record. See Reasons Enumeration.
  • ChannelID. Integer. ChannelID of the Alarm.
  • AlarmText. String. The text of the alarm. For example: "TEMPERATURE OUT OF RANGE".
  • RawValue. String. The raw string of the alarm, coded as Zeus stores it, for use as reference for future queries.
{
	"StationID":"demo",
	"DateOfRecord":"08-05-2019;13:41:58.000",
	"Reason":5,
	"ChannelID":20,
	"AlarmText":"Texto de alarma 1",
	"RawValue":""
}

Programmable Relay Period

List of objects with the following members:

  • Weekdays. List of string. List of days of the week ["L","M","X","J","V","S","D"].
  • ActivationTime. String. Time with the format hh:mm indicating the activation time.
  • Duration. integer. Duration (seconds) of the period.
[
{
	"Weekdays":["L","M"],
	"ActivationTime":"11:30",
	"Duration":20
},
{
	"Weekdays":["X","J","V","S"],
	"ActivationTime":"08:30",
	"Duration":10
},
{
	"Weekdays":["L","M","X","J","V","S","D"],
	"ActivationTime":"17:00",
	"Duration":120
},
{
	"Weekdays":[],
	"ActivationTime":"00:00",
	"Duration":0
}
]