------------------------
Simple Web Message Protocol (SWMP) Version 0.2
------------------------
SWMP requires the SRX method of sending and receiving messages via HTTP
GET/POST and XML response. The following is the specification of messages
provided in SWMP. The SRX protocol specification is located here.
An SWMP response must include <swmp> as the first element with a version attribute indicating the SWMP specification version used in the format #.#.
1) Check Messages
form elements: limit (optional limit to the number of messages to retrieve)
The server gets device ID from user agent string, then responds with a list of
messages. If no limit, then all pending messages for the devices will be included
in the response.
Example XML Response:
<swmp version=x.x>
<messageList>
<size>3</size>
<message>
<id>00000</id>
<type>command</type>
<subject></subject>
<body></body>
<command>
<action>download_content</action>
<url>http://host/...</url>
</command>
</message>
…
</messageList>
</swmp>
Command type:
If the <type> element contains the value "command", then the message
must contain one or more <command> elements each containing an optional
"domain" attribute. If no "domain" attribute is present, then the default
domain set of actions is assumed. Within the <command> element is one
<action> element. Some actions may require additional elements at the
same level, for example a "download_content" action requires a <url>
element.
Message types:
"command" for commands which must be carried out by the receiving client
"notice" for user readable messages
"urgent notice" for urgent user messages (for example, may trigger pop-up warning)
Messages of type "command" must contain a <command> element. Messages of type "notice" and "urgent notice" must contain a <subject> and a <body> element.
Example command actions:
"download_content" for triggering content download
"update_software" for triggering a software update
"update_tvshows" for immediate update of all incomplete TV show seasons/volumes
"update_podcasts" for immediate update of all podcast feeds
The "download_content" action requires one element, indicating the download URL
for each content item to be downloaded.
This specifications provided here are licensed to the public under a Creative Commons Attribution 3.0 license.