[DEPRECATED] Hive API

Anyone get Postman to work? Please Help!

To get it working on Postman:

SEND!

Is there currently any way to see if a rig is down? I dont see any other option than checking to see if a returned list has “stats” as one of its fields. Can we get an addition of something like
“Online” : true/false

Привет всем. Подскажите как создать SecretApiKey. Как PublicApiKey я разобрался

Posting this code I made in c# to use the API. If you have any question / want to improve it feel free to reply.

using System;
using System.Text;
using System.Security.Cryptography;
using System.Net;
using System.IO;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string public_key = "public key";
            string secret_key = "secret key";
            string method = "getCurrentStats";  

            byte[] messageEncoded = encodeString("method=" + method + "&public_key=" + public_key);
            byte[] secret_keyEncoded = encodeString(secret_key);

            readRequestResponse(sendPostRequest(messageEncoded, generateHMAC(secret_keyEncoded, messageEncoded)));
            Console.ReadLine();
        }

        private static byte[] encodeString(string stringToEncode)
        {
            return Encoding.ASCII.GetBytes(stringToEncode);
        }

        private static string generateHMAC(byte[] secret_key, byte[] message)
        {
            HMACSHA256 hmac = new HMACSHA256(secret_key);
            var returnedhash = hmac.ComputeHash(message);
            return BitConverter.ToString(returnedhash).Replace("-", "").ToLower();
        }

        private static WebRequest sendPostRequest(byte[] message, string hmacValue)
        {
            string url = "https://api.hiveos.farm/worker/eypiay.php";
            WebRequest request = WebRequest.Create(url);
            request.Method = "POST";
            request.Headers.Add("HMAC", hmacValue);
            request.ContentType = "application/x-www-form-urlencoded";
            request.ContentLength = message.Length;
            Stream dataStream = request.GetRequestStream();
            dataStream.Write(message, 0, message.Length);
            dataStream.Close();
            return request;
        }

        private static void readRequestResponse(WebRequest request)
        {
            Stream dataStream;
            WebResponse response = request.GetResponse();
            dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();
            Console.WriteLine(responseFromServer);
            reader.Close();
            dataStream.Close();
            response.Close();
        }
    }
}

Would it be possible to add API commands for Stop Miner, Restart Miner, and Reboot Rig? I have made a profit switching script to change wallets and OC settings, but I have an issue with applying an OC profile that has aggressive undervolting enabled if the miner is running.

Soon there will be Hive 2.0 with much more extended API.

This API is deprecated in favor of API v2
http://forum.hiveos.farm/discussion/1230/hive-api-v2