Besides a white label feature, we also offer a private API for all our paying customers. While public API will give you access to different statistics and worker status, the private API will allow you to execute commands and control your minerstat data remotely.
API authorization
Before you can use your private API, you will need to generate a new API token. Additionally, if you want to ensure even more privacy, you can white list multiple IPs from which the commands can be executed. You can do this from your minerstat dashboard API page where you can also see the API health.
You are limited to 3 queries per minute per worker. For example:
- If your account holds 5 workers, this means 15 queries per minute.
- If your account holds 10 workers, this means 30 queries per minute.
- If your account holds 1000 workers, this means 3000 queries per minute.
API documentation
The API documentation is available from the official minerstat API page. You will find information on how to authorize the API call, the list of responses, and error handling.
API usage
There are different endpoints available in the API. We are constantly improving and adding new features and if you want to see any other endpoint or parameter, let us know.
Endpoints
At the moment of writing, we have the following endpoints available:
- Worker: Worker entity with information on the user’s ID, worker’s name, worker’s group(s), system, type, config, ASIC SSH, mining client, electricity price, consumption, date of creation, and notes. With the patch method, you can also execute different commands: machine shut down, machine reboot, and mining client restart.
- Tag: With information on the user’s ID, tag’s type (pool or wallet), and address.
- Customer: With information on the user’s ID, date of creation, customer’s access key, customer’s name, customer’s e-mail, package, number of workers in the package, expiration of the package.
Methods
Each endpoint can use four different methods:
- Get: Get method is used to retrieve data regarding the given parameters.
- Post: Post method is used to create new entities.
- Patch: Patch method is used to update existing entities and execute different commands.
- Delete: Delete method is used to delete entites.
API documentation structure
On each endpoint/method page, you will find:
- Parameters: A list of parameters that can be used in the method, including the type and brief description;
- Example call: Example call in JSON format;
- Example response: Example response in JSON format.
API test
You are able to test the API in real-time on the API test page.
- Choose the method and endpoint;
- Enter the API token generated on your minerstat dashboard;
- Enter JSON payload;
- Click on [Capp API].
The response of the query will be displayed on the same screen.
When you are testing queries keep in mind that you are testing on your actual data and account. This means, that the results of the query will get through and delete queries will actually delete the entries and update queries will actually update the entries.
If you have any questions or requests regarding the API, join our Discord and let us know.