doc/API.md
If you want use HTTP API you need enable it ("enabled": true,) then choice port and optionally host. API not available if miner built without HTTP support (-DWITH_HTTP=OFF).
Official HTTP client for API: http://workers.xmrig.info/
Example configuration:
"api": {
"id": null,
"worker-id": null,
},
"http": {
"enabled": false,
"host": "127.0.0.1",
"port": 0,
"access-token": null,
"restricted": true
}
true) or disable (false) HTTP API.http://<host>:<port>, to allow connections from all interfaces use 0.0.0.0 (IPv4) or :: (IPv4+IPv6).http://<host>:<port>, zero port is valid option and means random port.Authorization header.false to allow remote configuration.If you prefer use command line options instead of config file, you can use options: --api-id, --api-worker-id, --http-enabled, --http-host, --http-access-token, --http-port, --http-no-restricted.
Versions before 2.15 was use another options for API https://github.com/xmrig/xmrig/issues/1007
Get miner summary information. Example.
Get detailed information about miner threads. Example.
All API endpoints below allow access to sensitive information and remote configure miner. You should set access-token and allow unrestricted access ("restricted": false).
Get current miner configuration. Example.
Update current miner configuration. Common use case, get current configuration, make changes, and upload it to miner.
Curl example:
curl -v --data-binary @config.json -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer SECRET" http://127.0.0.1:44444/1/config