Skip to content

senti-iot/senti-api

Repository files navigation

Senti.API

Senti.Cloud API (Senti.API) allows you to build your own IoT Dashboards, Apps and Widgets.

Senti.API support access to your Senti IoT device data or paid access to Senti Big Data based upon the crowd-sourced anonymised pool of Senti data.

Senti.API also works as a consolidated proxy for other API endpoints that Senti and Senti.Cloud use for its services.

API version: 1.0

Documentation

API Version

Query the latest version of the different API's. This is ideal to call in your initial configuration or other API configuration. API version can be queried without authentication.

Always issue a call to this API before using a specific API if you want to use the latest version of the given API.

Endpoint

https://api.senti.cloud/apiversion/someapi

Example

// returns the current version of the the following API's
https://api.senti.cloud/apiversion/weather
https://api.senti.cloud/apiversion/holidays

Authentication

The API is authenticated through a bearer token in the call header. To obtain a token please contact apisupport@senti.cloud.

const api = create({
	baseURL: 'https://api.senti.cloud',
	timeout: 30000,
	headers: {
		'auth': 'Your Senti.API token'
	}
})

Weather

The weather API is a proxy for the Dark Sky weather API. https://darksky.net/dev

API Route /:version/:date/:lat/:long/:lang

Holidays

Date format: YYYY-MM-DD

Language Holidays API support Danish holidays in Danish and English.

API Route: /:version/:startdate/:enddate/:lang

Annual Events

Date format: YYYY-MM-DD

Language Annual Events API support Danish special annual events in Danish and English.

API Route: /:version/:startdate/:enddate/:lang