Skip to content

API Format

MazeXD edited this page Jul 26, 2013 · 5 revisions

Request

{
    "request": "<request>",
    "data": <request_data>
}

"data" is optional
"request" = "get-status" (example)

##Response

{
    "response": "success/error/update",
    "request": "<the_original_request>",
    "data": <response_data>
}

"response" determines if the request failed | update type is only supported by websockets
"data" is optional | special: "response" == "error" => "data" = error_code
"request" = "get-status" (example)

##Authentication

WebSocket: The first request must consist of a plain text message containing the key

HTTP: The key will be passed as query parameter e.g. http://127.0.0.1?key=[your_key] (without brackets)

Clone this wiki locally