-
Notifications
You must be signed in to change notification settings - Fork 0
API Spec
This is the specification that is used by rust and the frontend to communicate with the server via HTTP.
Report that a device listening <CHANNEL>
is now active.
{
"success": "Channel was activated."
}
{
"error": "Channel is already being listened on.",
"error_id": 2
}
Report that the device listening <CHANNEL>
is no longer active.
{
"success": "Channel was deactivated."
}
{
"error": "Channel is not being listened on.",
"error_id": 2
}
Get all data the server has about the device listening <CHANNEL>
.
The actions
list is a list of all actions that were requested via the /action/<CHANNEL>
-endpoint.
{
"actions": [],
"channel": <CHANNEL>
}
{
"error": "Channel is not being listened on.",
"error_id": 2
}
Get all actions the server was given for the device listening <CHANNEL>
via the /action/<CHANNEL>
-endpoint.
The list is a list of all actions that were requested via the /action/<CHANNEL>
-endpoint.
[]
{
"error": "Channel is not being listened on.",
"error_id": 2
}
Get the oldest action the server was given for the device listening <CHANNEL>
via the /action/<CHANNEL>
-endpoint.
The obj is the data submitted to actions that were requested via the /action/<CHANNEL>
-endpoint.
{
"next_action": {}
}
The obj is the data submitted to actions that were requested via the /action/<CHANNEL>
-endpoint.
{
"next_action": "idle"
}
{
"error": "Channel is not being listened on.",
"error_id": 2
}
Add an action to the queue for the device listening the channel <CHANNEL>
.
The obj is the data submitted to actions that were requested via the /action/<CHANNEL>
-endpoint.
Takes unspecified query arguments. These are converted to a dict and shown in the response as json in action
, as well as added to the queue.
{
"action": {},
"success": "The action was added to the queue"
}
{
"error": "Channel is not being listened on.",
"error_id": 2
}
Get all data the server has saved about devices.
Returns an object of channel:device, each containing the corresponding response of /get/<CHANNEL>
{}
<p><h2><a href="http://212.227.8.25:8123/logs">/log/0</a></h2>
This will show the list of recoreded signals.
<h3>Responses:</h3>
<h4>Success</h4>
<pre>
{
"signals": [] // the format used with the get args
}
</pre>
</p>
<p><h2><a href="http://212.227.8.25:8123/logs">/logs</a></h2>
This will show the list of recoreded signals.
<h3>Responses:</h3>
<h4>Success</h4>
<pre>
{
"signals": [] // the format used with the get args
}
</pre>
</p>