Braiins OS Public REST API (1.0.0)

Download OpenAPI specification:

Actions

Get locate device status

Gets locate device status.

Responses

Response samples

Content type
application/json
true

Set locate device status

Sets locate device status (turn LED blinking on or off).

Request Body schema: application/json
required

Enable or disable.

boolean

Responses

Request samples

Content type
application/json
true

Response samples

Content type
application/json
true

Pause mining

Pauses mining.

Responses

Response samples

Content type
application/json
true

Reboot

Reboots mining.

Responses

Restart

Restarts mining.

Responses

Response samples

Content type
application/json
true

Resume mining

Resumes mining.

Responses

Response samples

Content type
application/json
true

Start

Starts mining.

Responses

Response samples

Content type
application/json
true

Stop

Stops mining.

Responses

Response samples

Content type
application/json
true

Authentication

User login

Authenticates a user using their username and password. If the credentials are valid, a token is returned, which should be included in the Authorization header of subsequent requests.

Request Body schema: application/json
required

User login credentials, including username and password.

password
required
string
username
required
string

Responses

Request samples

Content type
application/json
{
  • "password": "1234",
  • "username": "root"
}

Response samples

Content type
application/json
{
  • "timeout_s": 0,
  • "token": "string"
}

Set or remove user password

Allows a user to set or update their password. To remove the password, set the password field to null. This operation requires authentication.

Request Body schema: application/json
required

Payload containing the new password. If the password field is null, the password will be removed.

password
string or null

Responses

Request samples

Content type
application/json
{
  • "password": "1234"
}

Configuration

Get constraints

Responses

Response samples

Content type
application/json
{
  • "cooling_constraints": { },
  • "dps_constraints": { },
  • "hashboards_constraints": { },
  • "tuner_constraints": { }
}

Get miner configuration

Responses

Response samples

Content type
application/json
{
  • "dps": { },
  • "hashboard_config": { },
  • "pool_groups": [
    ],
  • "temperature": { },
  • "tuner": { }
}

Cooling

Set cooling mode

Sets the active cooling mode for the miner. The mode can be set to auto, manual, immersion, or hydro.

Request Body schema: application/json
required

Cooling mode to activate. Can be one of: auto, manual, immersion, or hydro.

One of
required
object (CoolingAutoMode)

The temperature control modes. Miner software tries to regulate the fan speed so that miner temperature is approximately at the target temperature. The allowed temperature range is 0-200 degree Celsius.

Responses

Request samples

Content type
application/json
{
  • "hydro": {
    }
}

Response samples

Content type
application/json
{
  • "hydro": {
    }
}

Get cooling state

Retrieves the current cooling state of the miner, including temperature measurements and the state of all fans.

Responses

Response samples

Content type
application/json
{
  • "fans": [
    ],
  • "highest_temperature": { }
}

Documentation

Retrieve OpenAPI JSON schema

Returns the OpenAPI specification in JSON format, which can be used by Redoc or Swagger UI for documentation.

Responses

License

Apply custom contract key

Apply custom contract key.

Request Body schema: application/json
required

Custom contract key to be set.

contract_key
required
string

Licence contract key string

Responses

Request samples

Content type
application/json
{
  • "contract_key": "string"
}

Response samples

Content type
application/json
{
  • "successful": true
}

Get license state

Retrieves the current license state of the miner. The license may be in one of several states: none, limited, valid, or expired.

Responses

Response samples

Content type
application/json
{
  • "state": { }
}

Miner

Get miner details

Retrieves detailed information about the miner, such as hardware model, firmware version, serial number, and other identifying data.

Responses

Response samples

Content type
application/json
{
  • "bos_mode": 0,
  • "bos_version": { },
  • "bosminer_uptime_s": 0,
  • "control_board_soc_family": 0,
  • "hostname": "string",
  • "kernel_version": "string",
  • "mac_address": "string",
  • "miner_identity": { },
  • "platform": 0,
  • "psu_info": { },
  • "serial_number": "string",
  • "status": 0,
  • "sticker_hashrate": { },
  • "system_uptime": 0,
  • "system_uptime_s": 0,
  • "uid": "string"
}

Get miner errors

Retrieves a list of errors reported by the miner, including timestamps, messages, error codes, and affected components.

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Get hashboard details

Retrieves detailed information about all hashboards in the miner, including their status, temperature, voltage, frequency, and statistics.

Responses

Response samples

Content type
application/json
{
  • "hashboards": [
    ]
}

Enable or disable hashboards

Enables or disables one or more hashboards based on the provided IDs. Useful for toggling hardware components during runtime or diagnostics.

Request Body schema: application/json
required

List of hashboard IDs to update and the desired enabled state.

enable
required
boolean
hashboard_ids
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "enable": false,
  • "hashboard_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "hashboards": [
    ]
}

Get miner statistics

Retrieves runtime statistics about the miner, including pool performance, hashrate metrics, and power consumption.

Responses

Response samples

Content type
application/json
{
  • "miner_stats": { },
  • "pool_stats": { },
  • "power_stats": { }
}

Stream miner status updates

Streams the current status of the miner in real-time. The status can be one of: unspecified, not_started, normal, paused, suspended, or restricted. The response is a continuous JSON stream.

Responses

Response samples

Content type
application/json
{
  • "status": 0
}

Stream support archive

Streams support archive.

Request Body schema: application/json
required

Support archive format. Format can be one of: 'zip' (compressed zip format), 'bos' (BOS custom format) or 'zipencrypted' (compressed encrypted zip format).

format
required
string (SupportArchiveFormat)
Enum: "unspecified" "zip" "bos" "zipencrypted"

Enumeration for support archive format

Responses

Request samples

Content type
application/json
{
  • "format": "zipencrypted"
}

Network

Retrieve miner network information

Fetches detailed information about the miner's network, including interfaces, MAC addresses, DNS settings, and default gateway.

Responses

Response samples

Content type
application/json
{
  • "default_gateway": "192.168.1.1",
  • "dns_servers": [
    ],
  • "hostname": "miner-01.local",
  • "mac_address": "00:1A:2B:3C:4D:5E",
  • "name": "eth0",
  • "networks": [
    ],
  • "protocol": 1
}

Get network configuration

Fetches the miner's network configuration, including interface settings, IP configurations, and routing details.

Responses

Response samples

Content type
application/json
{
  • "hostname": "miner-01.local",
  • "protocol": {
    }
}

Update network configuration

Updates the miner's network configuration. Users can modify one or more fields, such as the hostname, network protocol, or DNS settings.

Request Body schema: application/json
required

Partial or full network configuration update request.

hostname
string or null

Hostname. Existing value will be preserved if this field is not set.

null or (SetNetworkConfigurationRequestProtocol (SetNetworkConfigurationRequestProtocol (object) or SetNetworkConfigurationRequestProtocol (object)))

Responses

Request samples

Content type
application/json
{
  • "hostname": "miner-01.local",
  • "protocol": {
    }
}

Response samples

Content type
application/json
{
  • "hostname": "miner-01.local",
  • "protocol": {
    }
}

Performance

Set DPS (Dynamic Performance Scaling)

Sets DPS for the miner, including DPS enable flag, DPS shutdown enable flag, DPS shutdown duration, DPS target and DPS mode.

Request Body schema: application/json
required

Save action, DPS enable flag, DPS shutdown enable flag, DPS shutdown duration, DPS target and DPS mode.

enable
boolean or null

Flag if Dynamic Performance Scaling should be enabled

enable_shutdown
boolean or null

Flag if shutdown for Dynamic Performance Scaling should be enabled

mode
integer or null <int32>

Dynamic Performance Scaling mode

save_action
required
integer <int32>

Save action

null or Hours (object)
null or DpsTarget (object)

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "enable_shutdown": true,
  • "mode": 1,
  • "save_action": 1,
  • "shutdown_duration": {
    },
  • "target": {
    }
}

Response samples

Content type
application/json
{
  • "enabled": true,
  • "hashrate_target": null,
  • "mode": 1,
  • "power_target": {
    },
  • "shutdown_duration": {
    },
  • "shutdown_enabled": true
}

Set hashrate target

Sets hashrate target for the miner.

Request Body schema: application/json
required

Hashrate target to be set.

terahash_per_second
required
number <double>

Responses

Request samples

Content type
application/json
{
  • "terahash_per_second": 190
}

Response samples

Content type
application/json
{
  • "terahash_per_second": 190
}

Decrement hashrate target

Decrements hashrate target for the miner by a set value.

Request Body schema: application/json
required

Hashrate target decrement.

terahash_per_second
required
number <double>

Responses

Request samples

Content type
application/json
{
  • "terahash_per_second": 10
}

Response samples

Content type
application/json
{
  • "terahash_per_second": 190
}

Set default hashrate target

Sets default hashrate target for the miner.

Responses

Response samples

Content type
application/json
{
  • "terahash_per_second": 190
}

Increment hashrate target

Increments hashrate target for the miner by a set value.

Request Body schema: application/json
required

Hashrate target increment.

terahash_per_second
required
number <double>

Responses

Request samples

Content type
application/json
{
  • "terahash_per_second": 10
}

Response samples

Content type
application/json
{
  • "terahash_per_second": 190
}

Get performance mode

Fetches miner's performance mode, including manual or tuner mode.

Responses

Response samples

Content type
application/json
{
  • "tunermode": {
    }
}

Set performance mode

Sets performance mode for the miner.

Request Body schema: application/json
required

Performance mode.

One of
required
object (ManualPerformanceMode)

Responses

Request samples

Content type
application/json
{
  • "tunermode": {
    }
}

Response samples

Content type
application/json
{
  • "tunermode": {
    }
}

Set power target

Sets power target for the miner.

Request Body schema: application/json
required

Power target to be set.

watt
required
integer <int64> >= 0

Responses

Request samples

Content type
application/json
{
  • "watt": 3730
}

Response samples

Content type
application/json
{
  • "watt": 3730
}

Decrement power target

Decrements power target for the miner by a set value.

Request Body schema: application/json
required

Power target decrement.

watt
required
integer <int64> >= 0

Responses

Request samples

Content type
application/json
{
  • "watt": 100
}

Response samples

Content type
application/json
{
  • "watt": 3730
}

Set default power target

Sets default power target for the miner.

Responses

Response samples

Content type
application/json
{
  • "watt": 3730
}

Increment power target

Increments power target for the miner by a set value.

Request Body schema: application/json
required

Save action and power target increment.

watt
required
integer <int64> >= 0

Responses

Request samples

Content type
application/json
{
  • "watt": 100
}

Response samples

Content type
application/json
{
  • "watt": 3730
}

Set quick ramping

Sets quick ramping up and down times for the miner (used in curtailments).

Request Body schema: application/json
required

Quick ramping up and down times to be set.

down_s
required
integer <int32> >= 0
up_s
required
integer <int32> >= 0

Responses

Request samples

Content type
application/json
{
  • "down_s": 2,
  • "up_s": 5
}

Response samples

Content type
application/json
{
  • "down_s": 2,
  • "up_s": 5
}

Set default quick ramping

Sets default quick ramping up and down times for the miner (used in curtailments).

Responses

Response samples

Content type
application/json
{
  • "down_s": 2,
  • "up_s": 5
}

Get target profiles

Fetches miner's target profiles, including power and hashrate target profiles.

Responses

Response samples

Content type
application/json
{
  • "hashrate_target_profiles": [ ],
  • "power_target_profiles": [
    ]
}

Remove tuner profiles

Removes tuner profiles. If it was mining before stops and then starts mining.

Responses

Get tuner state

Fetches miner's tuner state, including overall tuner state and power or hashrate mode both including profile and current target.

Responses

Response samples

Content type
application/json
{
  • "mode_state": {
    },
  • "overall_tuner_state": 1
}

Pools

Get Pool Groups

Fetches the list of all configured pool groups, including their pools, load balancing strategy, and status.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new pool group

Creates a new pool group with a specified name, list of pools, and load balancing strategy.

Request Body schema: application/json
required
null or (LoadBalanceStrategy (LoadBalanceStrategy (object) or LoadBalanceStrategy (object)))
name
required
string

Group name

required
Array of objects (PoolConfiguration)

Group pools

uid
string or null

Group id
gRPC: If this struct is used when creating a new Pool Group, this field must not be specified (it will be generated)
gRPC: If this struct is used when updating an existing Pool Group, this field must be specified and represents unique id of Pool group which will be updated
REST: If this struct is used when creating a new Pool Group, this field must not be specified (it will be generated)
REST: If this struct is used when updating an existing Pool Group, this field must not be specified, uid in URL must be specified and represents unique id of Pool group which will be updated

Responses

Request samples

Content type
application/json
{
  • "load_balance_strategy": {
    },
  • "name": "Pools",
  • "pools": [
    ],
  • "uid": "group1"
}

Response samples

Content type
application/json
{
  • "load_balance_strategy": {
    },
  • "name": "Pools",
  • "pools": [
    ],
  • "uid": "group1"
}

Set multiple pool groups

Sets the pool groups with new configurations, replacing the existing ones.

Request Body schema: application/json
required

A list of pool group configurations to set.

Array
null or (LoadBalanceStrategy (LoadBalanceStrategy (object) or LoadBalanceStrategy (object)))
name
required
string

Group name

required
Array of objects (PoolConfiguration)

Group pools

uid
string or null

Group id
gRPC: If this struct is used when creating a new Pool Group, this field must not be specified (it will be generated)
gRPC: If this struct is used when updating an existing Pool Group, this field must be specified and represents unique id of Pool group which will be updated
REST: If this struct is used when creating a new Pool Group, this field must not be specified (it will be generated)
REST: If this struct is used when updating an existing Pool Group, this field must not be specified, uid in URL must be specified and represents unique id of Pool group which will be updated

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Update an existing pool group

Updates the specified pool group with a new name, list of pools, and load balancing strategy.

path Parameters
uid
required
string

The UID of the pool to be updated.

Request Body schema: application/json
required

Pool group configuration to be updated.

null or (LoadBalanceStrategy (LoadBalanceStrategy (object) or LoadBalanceStrategy (object)))
name
required
string

Group name

required
Array of objects (PoolConfiguration)

Group pools

uid
string or null

Group id
gRPC: If this struct is used when creating a new Pool Group, this field must not be specified (it will be generated)
gRPC: If this struct is used when updating an existing Pool Group, this field must be specified and represents unique id of Pool group which will be updated
REST: If this struct is used when creating a new Pool Group, this field must not be specified (it will be generated)
REST: If this struct is used when updating an existing Pool Group, this field must not be specified, uid in URL must be specified and represents unique id of Pool group which will be updated

Responses

Request samples

Content type
application/json
{
  • "load_balance_strategy": {
    },
  • "name": "Pools",
  • "pools": [
    ],
  • "uid": "group1"
}

Response samples

Content type
application/json
{
  • "load_balance_strategy": {
    },
  • "name": "Pools",
  • "pools": [
    ],
  • "uid": "group1"
}

Delete a pool group by UID

Deletes a pool group configuration based on the provided UID.

path Parameters
uid
required
string

The UID of the pool group to be deleted.

Responses

Version

Get API version

Returns current API version with informations about major, minor and patch version numbers.

Responses

Response samples

Content type
application/json
{
  • "major": 1,
  • "minor": 0,
  • "patch": 0
}