Application Gateway API
Introduction
The Application Gateway API is a JSON-RPC API that provides an easy way to access underlying XOROS system services.
The Application Gateway API allows the app to configure XOROS host it is running on, interact with host devices, receive state changes from the host, and more.
The API is designed to be simple to use and easy to understand. It is based on the JSON-RPC 2.0 specification, which is a lightweight remote procedure call protocol that uses JSON as the data format.
The JSON-RPC API is exposed over an HTTP/WebSockets interface, which makes it easy to use from any programming language or platform.
Message Format
The Application Gateway API uses the JSON-RPC 2.0 message format.
Messages are sent as JSON objects, for example:
{
"jsonrpc": "2.0",
"method": "system.getHostname",
"params": {},
"id": 1
}
The result of the message is sent back as a JSON object with the result
field, for example:
{
"jsonrpc": "2.0",
"result": "hostname123",
"id": 1
}
API Methods Reference
System Configuration
system.getHostname
Returns the hostname of the XOROS host.
system.getIPAddress
Returns the IP address(-es) of the XOROS host.
system.getMACAddress
Returns the MAC address(-es) of the XOROS host.
system.getUptime
Returns the uptime of the XOROS host.
system.getLoadAverage
Returns the load average of the XOROS host.
system.getMemoryUsage
Returns the memory usage of the XOROS host.
system.getDiskUsage
Returns the disk usage of the XOROS host.