nicehash / excavator

NiceHash's proprietary low-level CUDA miner
https://www.nicehash.com
53 stars 19 forks source link

can't get http api to work #256

Closed albgz closed 3 years ago

albgz commented 6 years ago

Hi! I'm using Excavator v1.5.4a_nvidia and I can't seem to get the remote api to work. I'm currently starting the miner with excavator -c lyra.json -wp 4000 -wi 0.0.0.0 Calling curl -g http://0.0.0.0:4000/api?command={"id":1,"method":"info","params":[]} I get the following error (I have 3 gpus):


{"id":0,"error":"Invalid JSON message."}{"id":0,"error":"Invalid JSON message."}{"id":0,"error":"Invalid JSON message."}

Any suggestions?

S74nk0 commented 6 years ago

@albgz Try it like this maybe: curl -H "Accept: application/json" -H "{\"id\":1,\"method\":\"device.list\",\"params\":[]}" --request GET IP:port

The JSON string in bash can be '{"id":1,"method":"device.list","params":[]}' but this one seems to fail in command prompt or power-shell so the previous example is using the escaped quotes (\")

igorvoltaic commented 6 years ago

@albgz for your port & address excavator -c lyra.json -wp 4000 -wi 0.0.0.0 do it like this: curl -g 'http://0.0.0.0:4000/api?command={"id":1,"method":"info","params":[]}'

nicehashdev commented 3 years ago

This works. Closing.