### Workflow Example: Get Schema, Current Settings, Update, and Verify Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md A complete workflow example using grpcurl to retrieve the settings schema, fetch current settings, apply an update, and then verify the changes. ```bash # 1. Check schema grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 \ braiins.bos.v1.AdvancedSettingsService/GetSettingsSchema > schema.json # 2. Get current settings grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 \ braiins.bos.v1.AdvancedSettingsService/GetSettings > current.json # 3. Update settings grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "settings": {"min_fan_pwm": 40} }' miner:50051 braiins.bos.v1.AdvancedSettingsService/SetSettings # 4. Verify changes grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 \ braiins.bos.v1.AdvancedSettingsService/GetSettings ``` -------------------------------- ### Get Auto Upgrade Status Response Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Example JSON response for the GetAutoUpgradeStatus RPC, showing enabled status, schedule, and execution times. ```json { "enabled": true, "schedule": { "daily": { "time": { "hours": 2, "minutes": 0, "seconds": 0 } } }, "nextExecution": "2026-06-06T02:00:00Z", "lastExecution": "2026-06-05T02:00:00Z" } ``` -------------------------------- ### GetSupportArchive Request Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Example of a request to download a support archive. Specify the desired archive format. ```proto message GetSupportArchiveRequest { SupportArchiveFormat format = 1; } ``` -------------------------------- ### GetSettings (User-configured only) Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Example of calling GetSettings via grpcurl to retrieve only user-configured settings. Requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.AdvancedSettingsService/GetSettings ``` -------------------------------- ### Start Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/actions-service.md Starts the bosminer process. Requires authentication. ```APIDOC ## Start ### Description Starts the bosminer process. Requires authentication. ### Method POST ### Endpoint /braiins.bos.v1.ActionsService/Start ### Parameters #### Request Body `StartRequest` (empty) ### Response #### Success Response (200) - **already_running** (bool) - Flag indicating if bosminer was already running before this call ### Request Example ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.ActionsService/Start ``` ``` -------------------------------- ### GetLog Request Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Example of a request to download log files. Specify the type of log to retrieve. ```proto message GetLogRequest { LogType log_type = 1; } ``` -------------------------------- ### GetSettings (Including defaults) Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Example of calling GetSettings via grpcurl with the 'include_default' flag set to true to retrieve all settings, including defaults. Requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "include_default": true }' miner:50051 braiins.bos.v1.AdvancedSettingsService/GetSettings ``` -------------------------------- ### EnableHashboards Request Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Example of a request to enable one or more hashboards. Includes save action and a list of hashboard IDs. ```proto message EnableHashboardsRequest { SaveAction save_action = 1; repeated string hashboard_ids = 2; } ``` -------------------------------- ### GetSettings Response Example (User-configured) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Example JSON response for GetSettings when requesting only user-configured settings. Shows current values for modified settings. ```json { "settings": { "allow_disabling_hashboards_on_nopic_miners": true, "min_fan_pwm": 30, "rambo_mode": "aggressive" } } ``` -------------------------------- ### GetLicenseStateResponse - No License Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/license-service.md Example JSON response when no license is installed on the miner. ```json { "none": { "timeToRestricted": 2592000 } } ``` -------------------------------- ### ApplyContractKeyResponse Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/license-service.md Example JSON response indicating the success status of applying a license contract key. ```json { "successful": true } ``` -------------------------------- ### Start Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/endpoints.md Starts the bosminer process. This is a unary gRPC call. ```APIDOC ## Start ### Description Starts the bosminer process. ### Method `POST` (Conceptual - gRPC Unary Call) ### Endpoint `braiins.bos.v1.ActionsService/Start` ### Parameters #### Request Body - **StartRequest** (braiins.bos.v1.StartRequest) - Required - The request object for starting the miner. ### Response #### Success Response (200) - **StartResponse** (braiins.bos.v1.StartResponse) - The response object indicating the start operation status. ``` -------------------------------- ### GetSettingsSchema Request Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Example of how to call the GetSettingsSchema RPC using grpcurl to retrieve the JSON Schema for available settings. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.AdvancedSettingsService/GetSettingsSchema ``` -------------------------------- ### Example Protocol Buffer Imports Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/types.md Shows example import statements for protocol buffer definitions. Ensure these imports are included when working with related .proto files. ```proto import "bos/v1/units.proto"; import "bos/v1/miner.proto"; import "bos/v1/cooling.proto"; ``` -------------------------------- ### GetSettings Response Example (With defaults) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Example JSON response for GetSettings when requesting all settings including defaults. Shows user-configured values alongside default values for unset settings. ```json { "settings": { "allow_disabling_hashboards_on_nopic_miners": true, "min_fan_pwm": 30, "rambo_mode": "aggressive", "other_setting_with_default": "default_value" } } ``` -------------------------------- ### Login Response Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/authentication-service.md Example of a successful response from the Login RPC, containing the authentication token and timeout. ```json { "token": "eUInGZBQ4yGyKiDe", "timeoutS": 3600 } ``` -------------------------------- ### Get Network Configuration Response (Static) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/network-service.md Example response when a static IP configuration is set. Includes IP address, netmask, gateway, DNS servers, and hostname. ```json { "network": { "static": { "address": "192.168.1.100", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "dnsServers": ["8.8.8.8", "8.8.4.4"] }, "hostname": "miner-001" } } ``` -------------------------------- ### Start Miner Process Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/actions-service.md Use this method to start the bosminer process. It requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.ActionsService/Start ``` -------------------------------- ### gRPC Client Examples Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/INDEX.md Examples of using grpcurl to interact with the gRPC API. Demonstrates listing services, describing services, and calling RPC methods with and without input data. ```APIDOC ## Common grpcurl Examples ### List Services **Description:** Lists all available services on the gRPC server. ```bash grpcurl -plaintext miner:50051 list ``` ### Describe Service **Description:** Describes the methods and types of a specific gRPC service. ```bash grpcurl -plaintext miner:50051 describe braiins.bos.v1.ActionsService ``` ### Call RPC (No Input) **Description:** Calls a gRPC RPC method that does not require input data. ```bash grpcurl -plaintext -H 'authorization:TOKEN' \ -d '{}' \ miner:50051 braiins.bos.v1.ActionsService/Start ``` ### Call RPC (With Input) **Description:** Calls a gRPC RPC method that requires input data, such as authentication credentials. ```bash grpcurl -plaintext -H 'authorization:TOKEN' \ -d '{"username": "admin", "password": "password"}' \ miner:50051 braiins.bos.v1.AuthenticationService/Login ``` ``` -------------------------------- ### Get Network Configuration Response (DHCP) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/network-service.md Example response when DHCP is enabled. The 'dhcp' field is present and empty. ```json { "network": { "dhcp": {}, "hostname": "miner-001" } } ``` -------------------------------- ### GetSettingsSchema Response Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Example JSON response structure for GetSettingsSchema, illustrating type definitions, constraints, and defaults for various settings. ```json { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "allow_disabling_hashboards_on_nopic_miners": { "type": "boolean", "default": false, "description": "Allow disabling hashboards on non-PIC miners" }, "min_fan_pwm": { "type": "integer", "minimum": 0, "maximum": 100, "default": 25, "description": "Minimum PWM percentage for fans" }, "rambo_mode": { "type": "string", "enum": ["cautious", "normal", "aggressive"], "default": "normal", "description": "Performance tuning mode" } } } ``` -------------------------------- ### GetCoolingStateResponse Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/cooling-service.md Example JSON response for the GetCoolingState RPC, showing fan states (RPM and target speed ratio) and the highest temperature reading from a chip sensor. ```json { "fans": [ {"position": 1, "rpm": 5000, "targetSpeedRatio": 0.75}, {"position": 2, "rpm": 4800, "targetSpeedRatio": 0.72} ], "highestTemperature": { "id": 1, "location": "SENSOR_LOCATION_CHIP", "temperature": {"degreeC": 62.5} } } ``` -------------------------------- ### List Available Services using grpcurl Source: https://github.com/braiins/bos-plus-api/blob/main/README.md Use grpcurl to list available services defined in a proto file. Ensure you have the proto files and grpcurl installed. ```shell $ grpcurl -import-path ./proto -proto bos/v1/actions.proto list braiins.bos.v1.ActionsService ``` -------------------------------- ### Set Power Target Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/performance-service.md Sets an absolute power target in watts for the miner. Requires specifying the save action and the desired power target. The example uses grpcurl to send the request. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "save_action": "SAVE_ACTION_SAVE_AND_APPLY", "powerTarget": {"watt": 1200} }' miner:50051 braiins.bos.v1.PerformanceService/SetPowerTarget ``` -------------------------------- ### GetMinerDetails CLI Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Example of how to call the GetMinerDetails RPC using grpcurl. Ensure you replace 'TOKEN' with your actual authorization token and 'miner:50051' with the correct host and port. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.MinerService/GetMinerDetails ``` -------------------------------- ### Unknown Setting Error Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md This error response is returned when attempting to set a configuration parameter that does not exist in the system. ```json { "code": "INVALID_ARGUMENT", "message": "Unknown setting: 'nonexistent_setting'" } ``` -------------------------------- ### DisableHashboards Request Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Example of a request to disable one or more hashboards. Includes save action and a list of hashboard IDs. ```proto message DisableHashboardsRequest { SaveAction save_action = 1; repeated string hashboard_ids = 2; } ``` -------------------------------- ### GetLicenseStateResponse - Valid License Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/license-service.md Example JSON response for an active, valid license, including type, contract name, time to restricted mode, and device fee. ```json { "valid": { "type": "LICENSE_TYPE_STANDARD", "contractName": "Standard License", "timeToRestricted": 7776000, "devFee": {"bsp": 0} } } ``` -------------------------------- ### GetApiVersion RPC Call Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/api-version-service.md Example of how to call the GetApiVersion RPC method using grpcurl. This is useful for testing API compatibility before making authenticated requests. ```bash grpcurl -plaintext miner:50051 braiins.bos.ApiVersionService/GetApiVersion ``` -------------------------------- ### Applied Settings Response Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md This is an example of a successful response from `SetSettings`, showing the echo of the applied settings with their new values. ```json { "applied": { "allow_disabling_hashboards_on_nopic_miners": false, "min_fan_pwm": 35, "rambo_mode": "normal" } } ``` -------------------------------- ### Default Settings Response Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md This is an example of a successful response from `ResetAllSettings`, showing all settings with their default values. ```json { "settings": { "allow_disabling_hashboards_on_nopic_miners": false, "min_fan_pwm": 25, "rambo_mode": "normal", "other_setting": "default_value" } } ``` -------------------------------- ### Create Pool Group (Fixed Share Ratio) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/pool-service.md This example demonstrates creating a pool group using a fixed share ratio for load balancing. The authorization token is required. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "save_action": "SAVE_ACTION_SAVE_AND_APPLY", "group": { "name": "Load Balanced Pools", "fixedShareRatio": {"value": 0.6}, "pools": [ { "url": "stratum+tcp://primary.example.com:3333", "user": "user.primary" } ] } }' miner:50051 braiins.bos.v1.PoolService/CreatePoolGroup ``` -------------------------------- ### Network Information Response Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/network-service.md This is an example of the JSON response you can expect when successfully retrieving network information. It includes details like the interface name, MAC address, hostname, protocol, DNS servers, assigned networks, and default gateway. ```json { "name": "eth0", "macAddress": "94:e3:6d:fb:89:ad", "hostname": "miner-001", "protocol": "NETWORK_PROTOCOL_STATIC", "dnsServers": ["8.8.8.8", "8.8.4.4"], "networks": [ { "address": "192.168.1.100", "netmask": "255.255.255.0" } ], "defaultGateway": "192.168.1.1" } ``` -------------------------------- ### GetPoolGroups Response Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/pool-service.md An example JSON response from the GetPoolGroups RPC, illustrating the structure of pool groups and their associated pools and statistics. ```json { "poolGroups": [ { "uid": "pg1", "name": "Primary Pool", "quota": {"value": 100}, "pools": [ { "uid": "p1", "url": "stratum+tcp://pool.example.com:3333", "user": "user.worker1", "enabled": true, "alive": true, "active": true, "stats": { "acceptedShares": 5000, "rejectedShares": 50, "staleShares": 10, "lastDifficulty": 4096, "generatedWork": 10000, "bestShareStr": "18446744073709551615" } } ] } ] } ``` -------------------------------- ### GetPoolGroups RPC Usage Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/pool-service.md This example demonstrates how to call the GetPoolGroups RPC method using grpcurl. Ensure you replace 'TOKEN' with your actual authorization token and 'miner:50051' with the correct host and port. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.PoolService/GetPoolGroups ``` -------------------------------- ### Set Relative Power Target Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/performance-service.md Sets the power target as a percentage of a reference point. Use this to adjust power consumption relative to nominal, minimum, maximum, or current power targets. ```proto 85% of nominal power = {percentage: 85.0, reference: RELATIVE_TARGET_REFERENCE_NOMINAL} ``` -------------------------------- ### GetLicenseStateResponse - Expired License Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/license-service.md Example JSON response for an expired license, showing type, contract name, and applicable device fee. ```json { "expired": { "type": "LICENSE_TYPE_CUSTOM", "contractName": "Custom Enterprise License", "devFee": {"bsp": 250} } } ``` -------------------------------- ### Describe a gRPC Service using grpcurl Source: https://github.com/braiins/bos-plus-api/blob/main/README.md Use grpcurl to describe the methods and message types of a specific gRPC service. This requires the proto files and grpcurl to be installed. ```shell $ grpcurl -import-path ./proto -proto bos/v1/actions.proto describe braiins.bos.v1.ActionsService is a service: service ActionsService { // Method to pause mining rpc PauseMining ( .braiins.bos.v1.PauseMiningRequest ) returns ( .braiins.bos.v1.PauseMiningResponse ); // Method to reboot whole miner rpc Reboot ( .braiins.bos.v1.RebootRequest ) returns ( .braiins.bos.v1.RebootResponse ); // Method to restart bosminer rpc Restart ( .braiins.bos.v1.RestartRequest ) returns ( .braiins.bos.v1.RestartResponse ); // Method to resume mining rpc ResumeMining ( .braiins.bos.v1.ResumeMiningRequest ) returns ( .braiins.bos.v1.ResumeMiningResponse ); // Method to start bosminer rpc Start ( .braiins.bos.v1.StartRequest ) returns ( .braiins.bos.v1.StartResponse ); // Method to stop bosminer rpc Stop ( .braiins.bos.v1.StopRequest ) returns ( .braiins.bos.v1.StopResponse ); } ``` -------------------------------- ### Set Password with grpcurl Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/authentication-service.md Example of how to set a new password using grpcurl. This requires an active authentication token, which should be passed in the 'authorization' header. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{"password": "new_password"}' miner:50051 braiins.bos.v1.AuthenticationService/SetPassword ``` -------------------------------- ### Create Pool Group (Quota-based) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/pool-service.md Use this example to create a new pool group with a quota-based load balancing strategy. Ensure the authorization token is correctly set. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "save_action": "SAVE_ACTION_SAVE_AND_APPLY", "group": { "name": "Primary Pool", "quota": {"value": 100}, "pools": [ { "url": "stratum+tcp://pool1.example.com:3333", "user": "user.worker1", "password": "password123", "enabled": true }, { "url": "stratum+tcp://pool2.example.com:3333", "user": "user.worker2", "enabled": true } ] } }' miner:50051 braiins.bos.v1.PoolService/CreatePoolGroup ``` -------------------------------- ### Login User with grpcurl Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/authentication-service.md Example of how to authenticate a user using grpcurl. Ensure you replace 'your_password' with the actual password and 'miner:50051' with your miner's address. ```bash grpcurl -plaintext -d '{"username": "admin", "password": "your_password"}' miner:50051 braiins.bos.v1.AuthenticationService/Login ``` -------------------------------- ### Use Authentication Token Source: https://github.com/braiins/bos-plus-api/blob/main/README.md Authenticates requests by including the token in the 'authorization' header. This example retrieves miner details. ```shell $ grpcurl -plaintext -H 'authorization:FvZarvVQLCtzNaM6' miner:50051 braiins.bos.v1.MinerService/GetMinerDetails { "uid": "lAOJ0RbI6axyOyGf", "minerIdentity": { "brand": "MINER_BRAND_ANTMINER", "model": "MINER_MODEL_ANTMINER_S19J_PRO", // Deprecated, use miner_model "name": "Antminer S19J Pro" "miner_model": "Antminer S19J Pro", }, "platform": "PLATFORM_AM3_BBB", "bosMode": "BOS_MODE_NAND", "bosVersion": { "current": "2023-04-20-0-0ce150e9-23.03-plus", "major": "2022-09-13-0-11012d53-22.08-plus", "bosPlus": true }, "hostname": "localhost", "macAddress": "94:e3:6d:fb:89:ad", "systemUptime": "90919", // Deprecated, use system_uptime_s "bosminer_uptime_s": "5050", "system_uptime_s": "90919", "status": "MINER_STATUS_NORMAL", "kernel_version": "3.8.13+" } ``` -------------------------------- ### Describe a Specific Service with grpcurl Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/endpoints.md Use this command to get detailed information about a specific gRPC service. Replace 'braiins.bos.v1.ActionsService' with the desired service name. ```bash grpcurl -plaintext miner:50051 describe braiins.bos.v1.ActionsService ``` -------------------------------- ### Configuration Constraints Response Structure Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/configuration-service.md Example JSON structure for the response of GetConstraints. It outlines the default, minimum, and maximum values for tuner, cooling, DPS, and hashboard parameters. ```json { "tunerConstraints": { "powerTarget": { "default": {"watt": 1200}, "min": {"watt": 600}, "max": {"watt": 1500} }, "hashrateTarget": { "default": {"terahashPerSecond": 100}, "min": {"terahashPerSecond": 50}, "max": {"terahashPerSecond": 150} }, "enabled": {"default": true}, "defaultMode": "TUNER_MODE_POWER_TARGET" }, "coolingConstraints": { "defaultCoolingMode": "COOLING_MODE_AUTO", "targetTemperature": { "default": {"degreeC": 60}, "min": {"degreeC": 30}, "max": {"degreeC": 80} }, "hotTemperature": { "default": {"degreeC": 75}, "min": {"degreeC": 50}, "max": {"degreeC": 95} }, "dangerousTemperature": { "default": {"degreeC": 85}, "min": {"degreeC": 60}, "max": {"degreeC": 105} } }, "dpsConstraints": {...}, "hashboardsConstraints": { "hasboardIds": ["hb0", "hb1", "hb2"], "frequency": { "default": {"hertz": 600000000}, "min": {"hertz": 200000000}, "max": {"hertz": 800000000} }, "voltage": { "default": {"volt": 8.6}, "min": {"volt": 7.0}, "max": {"volt": 10.0} } } } ``` -------------------------------- ### GetPoolGroups Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/pool-service.md Retrieves all configured pool groups and their associated statistics. This method is used to get a comprehensive view of the current pool setup and performance. ```APIDOC ## GetPoolGroups ### Description Retrieves all configured pool groups and their statistics. This method is used to get a comprehensive view of the current pool setup and performance. ### Method GET ### Endpoint /braiins.bos.v1.PoolService/GetPoolGroups ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **pool_groups** (array of PoolGroup) - Array of pool groups with current state **PoolGroup Structure:** - **uid** (string) - Unique group identifier - **name** (string) - Group name - **strategy** (oneof) - Load balancing strategy: quota or fixed_share_ratio - **pools** (array of Pool) - Pools in this group **Pool Structure:** - **uid** (string) - Unique pool identifier - **url** (string) - Pool connection URL (stratum) - **user** (string) - Mining username - **enabled** (bool) - Whether pool is enabled - **alive** (bool) - Whether pool is currently reachable - **active** (bool) - Whether pool is currently active (mining) - **stats** (PoolStats) - Pool statistics **PoolStats Structure:** - **accepted_shares** (uint64) - Number of accepted shares - **rejected_shares** (uint64) - Number of rejected shares - **stale_shares** (uint64) - Number of stale shares - **last_difficulty** (uint64) - Last share difficulty - **generated_work** (uint64) - Total work units generated - **last_share_time** (Timestamp) - Time of last share (optional) - **best_share_str** (string) - Best share as decimal string ### Response Example ```json { "poolGroups": [ { "uid": "pg1", "name": "Primary Pool", "quota": {"value": 100}, "pools": [ { "uid": "p1", "url": "stratum+tcp://pool.example.com:3333", "user": "user.worker1", "enabled": true, "alive": true, "active": true, "stats": { "acceptedShares": 5000, "rejectedShares": 50, "staleShares": 10, "lastDifficulty": 4096, "generatedWork": 10000, "bestShareStr": "18446744073709551615" } } ] } ] } ``` ``` -------------------------------- ### Get Cooling State gRPC Request Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/cooling-service.md Example of how to call the GetCoolingState RPC method using grpcurl. Ensure you replace 'TOKEN' with your actual authorization token and 'miner:50051' with the correct miner address and port. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.CoolingService/GetCoolingState ``` -------------------------------- ### Calculate SHA256 Hash Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Demonstrates how to calculate the SHA256 hash of a firmware file using command-line tools or Python. ```bash # macOS shasum -a 256 firmware.bin # Linux sha256sum firmware.bin # Python python3 -c "import hashlib; print(hashlib.sha256(open('firmware.bin','rb').read()).hexdigest())" ``` -------------------------------- ### Set All Settings (Fails on Invalid) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Demonstrates setting multiple configuration values. The entire request fails if any single setting is invalid, ensuring atomicity. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "settings": { "valid_setting": 100, "invalid_setting": "bad_value" # Invalid } }' miner:50051 braiins.bos.v1.AdvancedSettingsService/SetSettings ``` -------------------------------- ### Setting Validation Error Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md An example of a validation error response when a setting fails to meet its defined constraints. The error message specifies the setting and the nature of the violation. ```json { "code": "INVALID_ARGUMENT", "message": "Setting validation failed: Setting 'min_fan_pwm' must be integer, got string" } ``` -------------------------------- ### List Services with grpcurl Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/endpoints.md Use this command to list all available services exposed by the gRPC server. Ensure the server is accessible at the specified host and port. ```bash grpcurl -plaintext miner:50051 list ``` -------------------------------- ### Perform Manual Firmware Upgrade Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Uploads firmware using a streaming gRPC call. Prepare metadata and then stream firmware data. Ensure the firmware file size and SHA256 hash are correctly provided. The device may reboot after a successful upgrade. ```bash # Prepare firmware file FIRMWARE_FILE="/path/to/firmware.bin" FIRMWARE_HASH=$(sha256sum "$FIRMWARE_FILE" | cut -d' ' -f1) # Linux # FIRMWARE_HASH=$(shasum -a 256 "$FIRMWARE_FILE" | cut -d' ' -f1) # macOS FIRMWARE_SIZE=$(stat -c%s "$FIRMWARE_FILE") # Linux # FIRMWARE_SIZE=$(stat -f%z "$FIRMWARE_FILE") # macOS # Upload firmware ( echo "{\"metadata\": {\"size\": $FIRMWARE_SIZE, \"hash\": \"$FIRMWARE_HASH\", \"discardSettings\": false}}" cat "$FIRMWARE_FILE" | base64 -w0 | sed 's/.*/{"data": "&"}/' ) | grpcurl -plaintext -H 'authorization:TOKEN' \ -d @ miner:50051 braiins.bos.v1.UpgradeService/SystemUpgrade ``` -------------------------------- ### GetActivePerformanceMode Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/endpoints.md Gets the currently active performance mode. This is a unary gRPC call within the PerformanceService. ```APIDOC ## GetActivePerformanceMode ### Description Gets active performance mode. ### Method Unary gRPC ### Endpoint braiins.bos.v1.PerformanceService/GetActivePerformanceMode ### Request braiins.bos.v1.GetPerformanceModeRequest ### Response braiins.bos.v1.PerformanceMode ``` -------------------------------- ### Get API Version Source: https://github.com/braiins/bos-plus-api/blob/main/README.md Retrieves the current API version of the miner. This service does not require authentication. ```shell $ grpcurl -plaintext miner:50051 braiins.bos.ApiVersionService/GetApiVersion { "major": "1", "minor": "3", "patch": "0", "pre": "", "build": "" } ``` -------------------------------- ### GetSupportArchive Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Downloads a support archive containing system information and logs. The response is streamed and requires concatenation of all chunks. ```APIDOC ## GetSupportArchive ### Description Downloads a support archive containing system information and logs. The response is streamed and requires concatenation of all chunks. ### Method RPC (GetSupportArchive) ### Request #### Request Body - **format** (SupportArchiveFormat) - Required - Archive format (ZIP, BOS, ZIP_ENCRYPTED) ### Response (streamed) #### Success Response - **chunk_data** (bytes) - Binary chunk data to concatenate ### SupportArchiveFormat Enum - **SUPPORT_ARCHIVE_FORMAT_ZIP**: Compressed ZIP format - **SUPPORT_ARCHIVE_FORMAT_BOS**: BOS custom format - **SUPPORT_ARCHIVE_FORMAT_ZIP_ENCRYPTED**: Encrypted ZIP format ### Authentication Required ### Notes - Streaming response - must concatenate all chunks - Large download, be prepared for substantial data transfer ``` -------------------------------- ### GetSettings Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/endpoints.md Retrieves current setting values. This is a unary RPC. ```APIDOC ## GetSettings ### Description Retrieves current setting values. ### Method Unary RPC ### Endpoint braiins.bos.v1.AdvancedSettingsService/GetSettings ### Request braiins.bos.v1.GetSettingsRequest ### Response braiins.bos.v1.GetSettingsResponse ``` -------------------------------- ### Remove Pool Group Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/pool-service.md This example shows how to remove a pool group by its UID. The `save_action` parameter is required. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "save_action": "SAVE_ACTION_SAVE_AND_APPLY", "uid": "pg1" }' miner:50051 braiins.bos.v1.PoolService/RemovePoolGroup ``` -------------------------------- ### Get License State Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/license-service.md Retrieves the current license state of the miner using grpcurl. Authentication is required. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.LicenseService/GetLicenseState ``` -------------------------------- ### GetSupportArchive Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/miner-service.md Initiates the download of a support archive for the miner. This is a streaming RPC. ```APIDOC ## GetSupportArchive ### Description Initiates the download of a support archive for the miner. This is a streaming RPC. ### Method STREAM ### Endpoint `braiins.bos.v1.MinerService/GetSupportArchive` ### Parameters #### Request `GetSupportArchiveRequest` (empty) ### Response (streamed) `GetSupportArchiveResponse` **Authentication:** Required ``` -------------------------------- ### LicenseType Enum Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/types.md Specifies the type of license installed on the device. Use this enum to differentiate between standard and custom licenses. ```protobuf enum LicenseType { LICENSE_TYPE_UNSPECIFIED = 0; LICENSE_TYPE_STANDARD = 1; LICENSE_TYPE_CUSTOM = 2; } ``` -------------------------------- ### RemoveTunedProfiles Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/performance-service.md Clears all saved tuner profiles. This action resets any historical tuning data, allowing for a fresh start with the tuner. ```APIDOC ## RemoveTunedProfiles ### Description Clears all saved tuner profiles. ### Method N/A (Method signature not provided, assumed to be an RPC call) ### Endpoint N/A ### Parameters None explicitly listed. ### Response None explicitly listed. ### Authentication Required ``` -------------------------------- ### Miner Configuration Response Structure Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/configuration-service.md Example JSON structure for the response of GetMinerConfiguration. It details the organization of configuration data by functional area. ```json { "poolGroups": [ { "uid": "pool-group-1", "name": "Primary Pool Group", "quota": {"value": 100}, "pools": [...] } ], "temperature": { "auto": { "targetTemperature": {"degreeC": 60}, "hotTemperature": {"degreeC": 75}, "dangerousTemperature": {"degreeC": 85}, "minFanSpeed": 20, "maxFanSpeed": 100 } }, "tuner": { "enabled": true, "tunerMode": "TUNER_MODE_POWER_TARGET", "powerTarget": {"watt": 1200} }, "dps": { "enabled": true, "powerStep": {"watt": 50}, "minPowerTarget": {"watt": 600} }, "hashboardConfig": { "globalFrequency": {"hertz": 600000000}, "globalVoltage": {"volt": 8.6} } } ``` -------------------------------- ### SystemUpgrade Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/endpoints.md Performs manual firmware upgrade. This is a client streaming RPC. ```APIDOC ## SystemUpgrade ### Description Performs manual firmware upgrade. ### Method Client streaming RPC ### Endpoint braiins.bos.v1.UpgradeService/SystemUpgrade ### Request stream braiins.bos.v1.SystemUpgradeRequest ### Response braiins.bos.v1.SystemUpgradeResponse ``` -------------------------------- ### Get API Version Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/INDEX.md Call the ApiVersionService/GetApiVersion RPC to determine the miner's supported API version. This is crucial for ensuring compatibility. ```protobuf service ApiVersionService { rpc GetApiVersion(GetApiVersionRequest) returns (GetApiVersionResponse); } message GetApiVersionRequest {} message GetApiVersionResponse { string api_version = 1; } ``` -------------------------------- ### Constraint Violation Error Example Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md This error occurs when a provided setting value exceeds its defined limits, such as a minimum or maximum allowed value. ```json { "code": "INVALID_ARGUMENT", "message": "Setting 'min_fan_pwm' value 150 exceeds maximum of 100" } ``` -------------------------------- ### List Available Services Source: https://github.com/braiins/bos-plus-api/blob/main/README.md Lists all available services on the miner. This command does not require authentication. ```shell $ grpcurl -plaintext miner:50051 list braiins.bos.ApiVersionService braiins.bos.v1.ActionsService braiins.bos.v1.AdvancedSettingsService braiins.bos.v1.AuthenticationService braiins.bos.v1.ConfigurationService braiins.bos.v1.CoolingService braiins.bos.v1.MinerService braiins.bos.v1.PoolService braiins.bos.v1.TunerService braiins.bos.v1.UpgradeService grpc.reflection.v1alpha.ServerReflection ``` -------------------------------- ### Update Auto Upgrade Configuration (Weekly) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Enables automatic upgrades and sets a weekly schedule for Sunday at 3:00 AM. Requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "enabled": true, "schedule": { "weekly": { "dayOfWeek": "DAY_OF_WEEK_SUNDAY", "time": { "hours": 3, "minutes": 0 } } } }' miner:50051 braiins.bos.v1.UpgradeService/UpdateAutoUpgradeConfig ``` -------------------------------- ### Get Network Configuration Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/network-service.md Retrieves the current network configuration. Use this to check if DHCP is enabled or to view static IP settings and hostname. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.NetworkService/GetNetworkConfiguration ``` -------------------------------- ### UpgradeService Source: https://github.com/braiins/bos-plus-api/blob/main/README.md Methods to configure and monitor automatic firmware upgrades, perform manual upgrades, or restore stock firmware. ```APIDOC ## UpdateAutoUpgradeConfig ### Description Method to enable/disable the AutoUpgrade feature and configure the upgrade schedule. ### Method (Not specified, likely RPC or gRPC) ### Endpoint (Not specified) ### Parameters (Not specified, but relates to AutoUpgrade configuration and schedule) ### Request Example (Not specified) ### Response (Not specified) ## GetAutoUpgradeStatus ### Description Method to retrieve the current AutoUpgrade configuration and execution status. ### Method (Not specified, likely RPC or gRPC) ### Endpoint (Not specified) ### Parameters (Not specified) ### Request Example (Not specified) ### Response (Not specified) ## SystemUpgrade ### Description Method to perform a manual firmware upgrade. ### Method (Not specified, likely RPC or gRPC) ### Endpoint (Not specified) ### Parameters (Not specified) ### Request Example (Not specified) ### Response (Not specified) ## RestoreStock ### Description Method to restore the stock firmware. ### Method (Not specified, likely RPC or gRPC) ### Endpoint (Not specified) ### Parameters (Not specified) ### Request Example (Not specified) ### Response (Not specified) ``` -------------------------------- ### Search Guide by Operation Type Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/INDEX.md Categorizes API operations into Read, Write, Control, Diagnostics, and Management types for easier navigation and understanding. ```APIDOC ## Search Guide by Operation Type ### Description Discover API operations classified by their type of action. ### Operation Types - **Read:** GetMinerConfiguration, GetPoolGroups, GetCoolingState, GetTunerState - **Write:** SetNetworkConfiguration, UpdatePoolGroup, SetPowerTarget, SetCoolingMode - **Control:** Start, Stop, PauseMining, ResumeMining, Restart, Reboot - **Diagnostics:** GetErrors, GetLog, GetSupportArchive, GetHashboards - **Management:** Login, ApplyContractKey, SystemUpgrade ``` -------------------------------- ### GetSettings Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/advanced-settings-service.md Retrieves the current advanced settings for the miner. This is useful for verifying current configurations or as a basis for subsequent updates. ```APIDOC ## GetSettings ### Description Retrieves the current advanced settings for the miner. This is useful for verifying current configurations or as a basis for subsequent updates. ### Method GET ### Endpoint /braiins.bos.v1.AdvancedSettingsService/GetSettings ### Response #### Success Response (200) - **settings** (object) - An object containing the current advanced settings. #### Response Example ```json { "settings": { "min_fan_pwm": 30, "valid_setting": 100 } } ``` ``` -------------------------------- ### Update Auto Upgrade Configuration (Monthly) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Enables automatic upgrades and sets a monthly schedule for the 15th day at 1:00 AM. Requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "enabled": true, "schedule": { "monthly": { "dayOfMonth": 15, "time": { "hours": 1, "minutes": 0 } } } }' miner:50051 braiins.bos.v1.UpgradeService/UpdateAutoUpgradeConfig ``` -------------------------------- ### Expected GetApiVersion Response Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/api-version-service.md Example of the expected JSON response when calling the GetApiVersion RPC method. This response indicates the current API version details. ```json { "major": "1", "minor": "12", "patch": "0", "pre": "", "build": "" } ``` -------------------------------- ### Update Auto Upgrade Configuration (Daily) Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Enables automatic upgrades and sets a daily schedule for 2:00 AM. Requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' -d '{ "enabled": true, "schedule": { "daily": { "time": { "hours": 2, "minutes": 0, "seconds": 0 } } } }' miner:50051 braiins.bos.v1.UpgradeService/UpdateAutoUpgradeConfig ``` -------------------------------- ### Get Auto Upgrade Status Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/api-reference/upgrade-service.md Retrieves the current automatic upgrade configuration and status, including next and last execution times. Requires authentication. ```bash grpcurl -plaintext -H 'authorization:TOKEN' miner:50051 braiins.bos.v1.UpgradeService/GetAutoUpgradeStatus ``` -------------------------------- ### Search Guide by Functional Area Source: https://github.com/braiins/bos-plus-api/blob/main/_autodocs/INDEX.md Organizes API services by functional areas such as Mining, Performance, Temperature, Monitoring, Networking, Firmware, License, and Advanced settings. ```APIDOC ## Search Guide by Functional Area ### Description Browse API services categorized by their primary functional area. ### Functional Areas - **Mining:** PoolService, ActionsService - **Performance:** PerformanceService - **Temperature:** CoolingService, MinerService - **Monitoring:** MinerService, CoolingService - **Networking:** NetworkService - **Firmware:** UpgradeService - **License:** LicenseService - **Advanced:** AdvancedSettingsService ```