{% extends "admin/base_site.html" %} {% load i18n %} {% block extrastyle %}{{ block.super }} {% endblock %} {% block coltype %}colMS{% endblock %} {% block bodyclass %}dashboard{% endblock %} {% block breadcrumbs %}{% endblock %} {% block content %}

REST API documentation

Besides the web-interface Automagically is controllable by an API. This is composed of a couple of URL:s that it is possible to do HTTP GET or POST to retrive information and update information respectivly.

Devices

URL:/rest/devices/ (GET)

This returns the current devices and which commands that it can handle

Global Variables

URL:/rest/gv/all/ (GET)

Return all global variables and their current value. Replace all in the URL with a global variable id to just fetch one variable.

Device State

URL:/rest/dev/all/ (GET)

Return all known device states. Replace all in the URL with a device id to just fetch status for one device.

Events

URL:/rest/events/ (GET)

Resturn a list of all device events that will occur.

Do

URL:/rest/do/ (POST)

This is used to modify or execute commands. The following is possible to do. Return value is a JSON object. Always with a result entry but sometimes also with other information.

Device Command

Parameters to the POST request

Signal

Parameters to the POST request

Create Event

Parameters to the POST request

Cancel Event

Parameters to the POST request

Delay Event

Parameters to the POST request

{% endblock %} {% block sidebar %} {% endblock %}