-
Notifications
You must be signed in to change notification settings - Fork 109
XMRigCCServer API
The port of the XMRigCCServer is defined within config_cc.json or via commandline param.
Per default the server will listen on any available ip [0.0.0.0].
You have to login with user/pass this can be also defined in config_cc.json or via commandline param.
All the endpoints return 200 (OK) as result code, or when there is an error, the specific http result code.
The clientId mentioned here "TestClient" is the one you defined in your XMRigDaemon as worker-id, when this is not set, the hostname will be used.
This request will return the defined Dashboard
This request will return client status list the Dashboard.
request:
curl -H "Content-Type: application/json" -X GET http://admin:[email protected]:3344/admin/getClientStatusList
response:
{
"client_status_list": [
{
"client_status": {
"client_id": "TestClient",
"current_pool": "",
"current_status": "RUNNING",
"hashrate_short": 0,
"hashrate_medium": 0,
"hashrate_long": 0,
"hashrate_highest": 0,
"avg_time": 0,
"shares_good": 0,
"shares_total": 0,
"hashes_total": 0,
"last_status_update": 1508526287
}
}
]
}
This request will return the current command which is set for the given clientId.
request:
curl -H "Content-Type: application/json" -X GET http://admin:[email protected]:3344/admin/getClientCommand?clientId=TestClient
response: (command can be: START / STOP / RESTART / UPDATE_CONFIG / SHUTDOWN)
{
"control_command": {
"command": "START"
}
}
This request will return the the current config which is set for the given clientId. If there is no client specific config, it will return the default_config.json
request:
curl -H "Content-Type: application/json" -X GET http://admin:[email protected]:3344/admin/getClientConfig?clientId=TestClient
response:
{
"a client config in json format"
}
This request will return the the current client log which is stored on the server for the given clientId. The number of maximum stored lines of log per miner can be configured in the XMRigCCServer config or via cmd parameter.
request:
curl -H "Content-Type: application/json" -X GET http://admin:[email protected]:3344/admin/getClientLog?clientId=TestClient
response:
{"client_log":"n-rows of client log delimited by \n"}
This request will set the command for the given client. The client will execute this command when received.
request: (command can be: START/STOP/RESTART/UPDATE_CONFIG/SHUTDOWN)
curl -H "Content-Type: application/json" -X POST -d '{"control_command":{"command":"STOP"}}' http://admin:[email protected]:3344/admin/setClientCommand?clientId=TestClient
response:
empty
This request will set the client config for the given client and stored on the server. To provision this config to the client, you have to trigger the setClientCommand
service with the command "UPDATE_CONFIG".
request:
curl -H "Content-Type: application/json" -X POST -d '{"a client config in json format"}' http://admin:[email protected]:3344/admin/setClientConfig?clientId=TestClient
response:
empty