meshchat
¶
Return an error page to a browser.
msg | (string) | Error message to be displayed |
meshchat.config() | Returns a JSON document with basic node configuration |
meshchat.send_message() | Send a message to the MeshChat instance |
meshchat.messages() | Return a list of message stored on the MeshChat instance |
meshchat.sync_status() | Return a JSON document describing the sync status |
meshchat.messages_raw() | Return a list of messages as text |
meshchat.messages_md5() | Return the current MD5 has of the messages database |
meshchat.messages_download() | Package the raw messages as the messages.txt file |
meshchat.users_raw() | Return the list of users as raw text |
meshchat.users() | Return a JSON document describing the logged in users |
meshchat.local_files_raw() | Return a list of files as plain text |
meshchat.file_download() | Return a specified file as a download |
meshchat.files() | Return a JSON document describing the list of files |
meshchat.delete_file() | Delete the specified file |
meshchat.messages_version() | Return the current version string for the messages database |
meshchat.messages_version_ui() | Return a JSON document of the messages database |
meshchat.hosts() | Return a JSON document describing all the hosts |
meshchat.hosts_raw() | Return a list of hosts as plain text |
meshchat.upload_file() | Store a file into the file directory |
meshchat.meshchat_nodes() | Return a list of nodes running MeshChat as text |
meshchat.action_log() | Return a JSON document of the action log |
Returns a JSON document with basic node configuration.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to config |
{
"version": "meshchat_version",
"node": "node_name",
"zone": "meshchat_zone_name"
}
Send a message to the MeshChat instance.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to send_message |
message | yes | Message body |
call_sign | yes | Call sign of the sender |
channel | no | Channel name to post message |
epoch | no | Timestamp specified as unixtime |
Needs to have newslines and double quotes escaped.
If not specified or set to empty string will post message to
Everything
channel
If not specified, the current time on the MeshChat server will be used.
On a successful entry of the message into the database a success JSON document will be returned.
{
"status": 200,
"response": "OK"
}
Return a list of message stored on the MeshChat instance.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to messages |
call_sign | no | Call sign of the requester |
epoch | no | Timestamp specified as unixtime |
id | no | Generated MeshChat ID |
{
"id": "id_str",
"epoch": epoch_time,
"message": "message_text",
"call_sign": "sending_call_sign",
"node": "originating_node",
"platform": "originating_node_platform",
"channel": "channel"
}
Return a JSON document describing the sync status.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to sync_status |
{
"node": "node_name",
"epoch": sync_time
}
Return a list of messages as text.
Return the current MD5 has of the messages database.
Package the raw messages as the messages.txt file.
Return the list of users as raw text.
Return a JSON document describing the logged in users.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to users |
{
"id": "id_str",
"epoch": epoch_time,
"call_sign": "sender_call_sign',
"node": "originating_node",
"platform": "originating_platform",
}
Return a list of files as plain text.
Return a specified file as a download.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to file_download |
file | yes | Name of file to downlaod |
Returns a page as an octet-stream that is tagged as an attachment to cause the browser to receive the file as a download.
Return a JSON document describing the list of files.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to files |
{
"file": "filename",
"epoch": modification_time,
"size": file_size_in_bytes,
"node": "originating_node",
"platform": "originating_platform"
}
Delete the specified file.
Return the current version string for the messages database.
Return a JSON document of the messages database.
Return a JSON document describing all the hosts.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to hosts |
{
"ip": "ip_address",
"hostname": "hostname",
"node": "node_name"
}
Return a list of hosts as plain text.
Store a file into the file directory.
Return a list of nodes running MeshChat as text.
Parameter | Required | Description |
---|---|---|
action | yes | Must be set to meshchat_nodes |
zone_name | yes | MeshChat zone name |
The list of nodes and ports seperated by a tab.
node1 8080
node2 8080
Return a JSON document of the action log.
Currently this call returns an empty list. In the future it will return a list of action log events.