Authentication
Authentication is required to send requests to the REST API. A token is used for this purpose and is provided after a successful login via the REST API.
- Send a POST request to
"http://[Smart_Building_Automation_IP]/login"with the following header parameters:- x-elocs-username: [Username]
- x-elocs-password: [Hash]
The token x-elocs-token is returned in the response and automatically set as a cookie. It is used to authenticate all subsequent requests.
Depending on where the requests to the Smart Building Automation system are sent from, the cookie is used automatically. Otherwise, the token must be included in the header of every request: Cookie:token=[Token].