VegeCloud Update Api Documentation (VERSION 1 DEPRECATED)

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

The access rate for this api is 2 request per IP address, for every 15 minute window. We limit the access rate to keep VegeCloud low cost for everyone.

URL:

https://api.vegecloud.com/in/<RouteKey>/

Sign into your account to get the RouteKey for your hub.

Data Object format

Sensor hub's report data and status to vegecloud using the following JSON object:

	
	{
		"api_key" : "<string>"
		"error_code": <integer>,
		"sensors": [
			{ "slot": <integer>,
				"samples": [
					{"t":"<datetime>","v":<sensor_value>},
				],
			}
		],
	}
	
	
NameDescriptionValue Type
api_key (Required) This key is essentially the password that allows you to update data to the sensors listed in your account. This value is listed in the Hub List section under "Write Api Key". <string>
error_code (Optional) Return 0 for no errors. Return 1 for low battery error. <integer>
sensors The hub will report back data from each of the sensors that is connected to it, in this array. <array of sensor objects>
slot Each sensor hub will have one or more sensor channel slots. This field starts at one and is number of the hub slot which is reporting back data. <integer>
samples sample is an array of zero or more elements consisting of a date time key, and a sensor value. The datetime key has the format of "YYYY-MM-DD HH:MM:SS". {t:<datetime>,v:<decimal>}

Example

	
	{
		"api_key" : "54JL33XSTYPVU5B3",
		"error_code": 0,
		"sensors": [
			{ "slot": 1,
				"samples": [
					{"t":"2019-01-01 12:00:00","v":1.0},
					{"t":"2019-01-01 12:00:05","v":1.1},
					{"t":"2019-01-01 12:00:10","v":1.2}
				]
			},
			{ "slot": 2,
				"samples": [
					{"t":"2019-01-01 12:00:00","v":2.0},
					{"t":"2019-01-01 12:00:05","v":1.9},
					{"t":"2019-01-01 12:00:10","v":1.8}
				]
			}
		]
	}
	
	




Copyright © 2024 Vegetronix, Inc. All rights Reservered.