Hi all,
I am interested to know if anyone has successfully used the awesome miner api to perform actions as I am fairly sure it doesn't actually work.
I am trying to perform an API call to stop a miner and looking at the documentation you just need to perform a post to /api/miners/id with the post data action=stop.
Here is an output from my request, I am performing a request to the api, I am then performing the exact same request to a page that dumps request type and post data to confirm the post is correct:
Fetching: http://###.###.com:9999/api/miners/10
Post Data: action=stop
Response:
Fetching: http://###.###.com/post.php
Post Data: action=stop
Response:
REQUEST_METHOD = POST
POST DATA:
Array
(
[action] => stop
)
This does absolutely nothing and there is no response back from the miner.
I have done quite a bit of work using the awesome miner API but this is the first time I have attempted to perform an action.
Here is my replacement for the awesome miner web front end:
http://stats.finnsk3.comI plan to add in a bunch of controls once I get the API to work for me.
First, you have a very nice looking website there! Kudos!
Second, I'm not a programmer, so more of a copy paster and just trial & error experiment. But I do use Excel VBA to make api calls to initiate actions (rules) on miners
The call section looks like this:
URLConcat = "http://mypc:17790/api/miners/" & Cells(2, 1).Value & "?action=rule&rule_id=9"
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.Open "POST", URLConcat, False
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.send ("")
Don't know how it could help by much, but to answer your question, yes, I have been able to perform actions via the API without issues.
Cheers