ConnectAPI Documentation
Welcome to the Connect API documentation. This API allows you to establish a connection and push environmental data from sensors and devices into Cannavigia.
Authentication
To access the Connect API, you need to include an API token in the request header.
Authorization: Bearer YOUR_API_TOKEN
Follow the instructions here to generate your API token.
Base URL
The base URL for all API requests is:
https://connectapi.iot.cannavigia.io/v1
Support endpoints
Temperature - c | /iot_temp |
Humidity (relative) - % | /iot_humidity |
co2 - ppm | /iot_co2 |
Connect and Push Data
Endpoint:
/iot_co2
Method:
POST
Description: Establish a connection and push environmental data from sensors/devices into Cannavigia.
Payload: JSON formatted body
Parameters
sensor_guid
(required): Unique identifier for sensorsensor_timestamp
(required): Timestamp value in UTC formatsensor_value
(required): Value of sensor
Response
Returns a http code with result
Example
Request:

POST /iot_co2
Response:
"Payload received successfully"
Errors
This API uses the following error codes:
400 Bad Request
: Invalid payload. Please provide a valid JSON object.401 Unauthorized
: The API key provided was invalid or missing.404 Not Found
: The requested resource was not found.500 Internal Server Error
: An unexpected error occurred on the server.
Rate Limiting
To ensure fair usage, the Connect API has rate limits. Exceeding these limits will result in a 429 Too Many Requests response.
Limit: 1000 requests per minute