Hive API v2

I built an electron application to reset my rigs via smart plugs, notice that a rig was offline this morning, checking the electron app, it was throwing a bunch of 405 errors.
I generated a new api, didn’t work. Check my ip was on the white list, everything seem to checkout.
So I look through the electron app and wondered if I turned off websecurity

webSecurity: false,

The app suddenly started receiving data from the api again. I’m not too sure what the security implications are, but for now it seems to be the only way electrons app work with the api

Can someone give me a basic example either in php or python, preferably python how to check and see which workers are offline in my farm? I have no idea how to do this. I’ve generated a API Key, and I know my farm ID I just don’t know what code to write so if someone could provide me with a snippet that I could run that would be great!

Эндпойнт /auth/check - не работает корректно.
При любом токене (не важно корректный или нет) выдает

{"code":null,"message":"Application outdated"}

и возвращает код 410

为什么我充值了钱还没到账户啊

交易所地址充值的啊

same error

Like very one else here - I have not been able to login to the API. Using a personal access token ( generated in the UI). yes I have set the Bearer Token with the Token that I generated. I get re direct from cloudflare
{“code”:null,“message”:“Unauthorized”,“redirect”:"/api/oauth/authorize?state=0dfd66e3-b4e9-4278-8798-8bb31"}

I’ve tried to allow curl to follow redirects to no avail.

Is there anyone that can post an up to date bash script / curl command that can login?

Thanks,
M

1 Like

Is it possible to shutdown the worker via API?

Hey I fix this problem, adding my public IP to whitelist into Sign in to Hiveon ID
After this I can use the api, try to use in a server with a public ip, for avoid change continously this configuration

Has v1 API been removed? Sends to 404 page now

How can I send “sreboot wakealarm” command via api?

How can I send “reboot” command via api?
command “logs” work -X POST -d “{“command”: “miner”, “data”: {“action”: “log”}}”
command “reboot” not work -X POST -d “{“command”: “system”, “data”: {“action”: “reboot”}}”

Find the sulution. Now works
-X POST -d “{“command”: “reboot”}”

Next question…
How ca i change with API option in “hashrate watchdog monitoring” function “miner minimal HashRate”?

Hey,

So I’ve read thru the forum and haven’t found a decent answer to this, here my issue:
I have a python script I’m trying to use to turn off the miner via Hive API.

Here’s the main part of my code:

url = f’{base_url}/worker/{worker_id}/command’ ## I have tried /farms/{worker_id}

data = {
“worker_ids”: [
worker_id
],
“search_id”: None,
“data”: {
“command”: “miner”,
“data”: {
“action”:“stop”
}
}
}

headers = {
‘Content-Type’: ‘application/json’,
‘accept’: ‘application/json’,
‘Authorization’: f’Bearer {api_key}’
}

When I run it I get this:
“message”: “Not Found”,
“code”: 404

I know that the API has this functionality since its in the documentation.
So what am I doing wrong?

u find solved this problem?

How i can aply flight sheet?
I try this:
curl -X 'PATCH' 'https://api2.hiveos.farm/api/v2/farms/123456/workers/9876543/' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyAPIKEYYYYYYYY' -d '{"fs_id":17268835}'

but it not work

Подскажи поподробнее, как это реализовать?