Retrieve Api

Please note that Vegecloud is still under development. Changes to the API may occur without warning.

URL:

https://api.vegecloud.com/out/<RouteKey>/<ReadApiKey>/<Channel>?<optional request parameters>/p>

Sign into your account to get the RouteKey for your account, and the ReadApiKey for your Hub.

Data Object format

The VegeCloud server will respond with the following JSON array if a channel number is specified:


	[
		{"t":"datetime1","v":value1},
		{"t":"datetime2","v":value2},
	]

If no channel is specified the data from all of the hub's channels are returned:


	[
		{"t":"datetime1","v":value1,"ch":chan_number},
		{"t":"datetime2","v":value2,"ch":chan_number},
	]

URL Parameters
NameDescriptionValue Type
RouteKey (Required) This key is displayed in your account when you log in. <string>
ReadApiKey (Required) This key is essentially the password that allows you to read data from the sensors listed in your account. This value is listed in the Hub List section under "Read API Key". <string>
Channel Each sensor hub will have one or more sensor channel slots. This optional field starts at one (1 based) and is number of the hub slot which is reporting back data. If this parameter is empty all of the channels for the hub will be returned. <integer>
Optional Request Parameters
NameDescriptionValue Type
start_date Get all data where the sample time is greater than or equal start_date. The start_date compare is inclusive. <date> (YYYY-MM-DD)
end_date Get all data where the sample time is less than end_date. The end_date compare is exclusive. <date> (YYYY-MM-DD)
order Order the data by sample time in ascending or descending order. <string> (asc, or desc)
limit The maximum number of samples that you want sent back. For example if this is set to 10 you, you will get 10 samples back, assuming 10 samples are available. <integer>

Example

https://api.vegecloud.com/out/34315633/IMESGJB258TNHJBK/1/?start_date=2019-01-01&limit=3


[	
	{"t":"2019-04-07T15:01:24.000Z","v":0.14},
	{"t":"2019-04-07T15:06:06.000Z","v":0.133},
	{"t":"2019-04-07T15:10:14.000Z","v":0.131}
]

https://api.vegecloud.com/out/34315633/IMESGJB258TNHJBK/?end_time=2019-01-01&limit=4


[	
	[
		{"t":"2019-04-07T15:01:24.000Z","v":0.14,"ch":1},
		{"t":"2019-04-07T15:01:26.000Z","v":0.106,"ch":2},
		{"t":"2019-04-07T15:06:06.000Z","v":0.133,"ch":1},
		{"t":"2019-04-07T15:10:06.000Z","v":0.089,"ch":2}
	]
]