HTTP API
Now Philote has a (very simple) HTTP API available.
I'll be adding message posting via HTTP, but for now the only endpoint implemented is /api/info
, which returns general information about the running philote instance receiving it.
The authentication mechanism is the same as when a websocket connection is attempted: an Authorization
header consisting on Bearer <your JWT>
. The token, however, needs to be created with an api: true
claim.
This is a sample of what the endpoint returns at this point in time:
{
"version": "0.3.0",
"go_arch": "amd64",
"go_os": "darwin",
"go_version": "go1.8.3",
"num_cpu": 4,
"uptime_in_seconds": 28,
"uptime_in_days": 0,
"tcp_port": "6380",
"pid": 88052,
"connections": 0,
"max_connections": 255,
"read_buffer_size": 1024,
"write_buffer_size": 1024,
"check_origin": false
}