Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

Homecontrol Webserver: API Guide

Robert Morigi-Eades edited this page Sep 25, 2017 · 4 revisions

Web pages

GET /web/{page}

Returns a HTML page dependant on the variable {page}. Pages include home, tvguide and about.

GET /web/device/{group_id}/{device_id}

Returns a HTML page created for the particular device as requested by the {group_id} and {device_id} variables.

GET /web/info/{service}

Returns a HTML page created for the particular information service as requested by the {service} variable.

GET /web/login

Present login screen for user selection and logging in.

GET /web/logout

Logs user out by deleting session cookie.

Static files

GET /web/static/{folder}/{filename}

Returns static files such as css, js and fonts/glyphicons.

Image requests

GET /favicon.ico

Returns favicon for HTML pages.

GET /img/{category}/{filename:re:.*\.png}

Returns image as available in the the 'img' directory.

Data requests

GET /data/device/{group_id}/{device_id}/{resource_requested}

Relay request for data to the main server for/from a particular device as requested by the {group_id} and {device_id} variables. {resource_requested} indicates the resource requested from the device. Further documentation to be produced for this.

Commands

POST/GET /command/device/{group_id}/{device_id}

To be changed to POST in future iterations

Relay commands to the main server for relaying to the particular device as requested by the {group_id} and {device_id} variables. Query parameters identify the command to be sent (command) and others that are device or command specific. Further documentation to be produced for this.

Clone this wiki locally