44 lines
1.5 KiB
ReStructuredText
44 lines
1.5 KiB
ReStructuredText
Stream Docs (High Level):
|
|
=========================
|
|
|
|
The provides a framework for JSON based requests and responses in stream.
|
|
|
|
Requests are JSON arrays that contain a "request_type" key.
|
|
Optionally "request_id" can be sent in order to track the response.
|
|
The "data" key is used for data to be sent to the request.
|
|
|
|
Responses come with a "response_type" key equal to the request_type. If "request_id" was sent, "response_id" will be provided. "response_success" will be true or false. If false, "response_error" will be provided as well as "request" which contains the original request. If the response is successful, data MAY be provided if the request returned data. If a request_id is sent, a response message will always be generated, even if there is no data.
|
|
|
|
The following requests types are established:
|
|
|
|
hello
|
|
-----
|
|
|
|
Requires a client_name key
|
|
Accepts a password key with a plain text password
|
|
Accepts a cookie key with a browser authorization cookie
|
|
Will allow no password if none is set in AD config.
|
|
|
|
listen_state
|
|
------------
|
|
|
|
Requires a namespace key. * wildcard supported at the end of the string
|
|
Requires an entity_id key. * wildcard supported at the end of the string
|
|
|
|
listen_event
|
|
------------
|
|
|
|
Requires a namespace key. * wildcard supported at the end of the string.
|
|
Requires an event key. * wildcard supported at the end of the string.
|
|
|
|
get_state
|
|
---------
|
|
|
|
Requires no parameters. Returns all states in AppDaemon
|
|
|
|
call_service:
|
|
-------------
|
|
|
|
requires namespace, domain, service
|
|
optionally, data can be provided for service data.
|