API Authentication
Overview
Use your Casambi user (site account) or network (admin) credentials to authenticate and to create a session. With Casambi (site) user session you will have access to all network, site and device data related to that site user account. With network session you will have access only to network and device data related to that network admin credentials.
The preferred method to create a network session is to always give a network entity ID as a parameter. In most cases this will allow the network session creation request to respond faster.
Casambi user and network sessions are both created with POST request where credentials are given in the payload of the request body. For a network session it is also possible to give a network entity ID as a URL parameter to limit the request to that network. In addition, API key must be set to custom request header property named X-Casambi-Key.
In general API session ID will be valid for a long time. When session ID expires then new one needs to be created.
Example:
X-Casambi-Key: 8aSdFG678M8nPL63FNe5fjrey42loASFWg64v29Se23GAm67576werQtyz1
API Key Use Limits
The API enforces the following limits per API key:
- Size of request data per minute
- Size of response data per minute
- Amount of requests per minute
- Amount of concurrent requests
If any limit is exceeded, the request will fail with HTTP status code.