PatchUpdate worker
Method for editing the worker's information. You can update all workers of a user, worker with certain name, or workers within a group. With set parameter you set which values you want to update, with add parameter you determine which values you want to add, and with remove parameter which values you want to remove. To call a specification command, such as reboot or restart, you can use command parameter.
https://api.minerstat.com/v2/worker
Parameters
Parameter
Type
Description
user
int
Customer's ID. If user is undefined, the worker will be updated on the main account. Customer ID can be obtained via v2/customer GET API call.
name
string
Name of your worker.
group
string
Group(s) of the worker.
set
object{}
The object of information you want to set for the worker.
set.value
string
Information you are setting. Possible values:
name
ip
username
password
notes
client
config
clocktune
profitswitch
electricityprice
consumption
add
object{}
The object of information you want to add to the worker.
add.value
string
Information you are adding. Possible values:
group
remove
object{}
The object of information you want to remove from the worker.
remove.value
string
Information you are removing. Possible values:
group
command
string
Command to execute. Possible values:
shutdown
reboot
restart
stop
start
exec
Example call
{"name": "Antminer001", "remove": {"group": "zone01,pos03"}, "add": {"group": "zone02,pos04"}}
Example response
{
"message": "Worker(s) successfully updated"
}