/api/program/status

GET

Returns program version information, currently active wallet, and server time.

Description

The `/api/program/status` endpoint provides basic information about the CloudCoin Console server including the software version, currently active wallet details, server timestamp, and maintenance alerts. This endpoint is useful for health checks and verifying the server is running correctly.

💡 Use Case

This endpoint is perfect for:

  • Health check monitoring
  • Verifying server connectivity
  • Confirming the active wallet before operations
  • Checking server time synchronization
  • Detecting when maintenance tasks need to be run
  • Monitoring encryption health across all wallets

Parameters

This endpoint does not require any parameters.

Response

Returns a JSON object with program status information.

Response Properties

status string
Always "success" for this endpoint.
operation string
Always "status".
version string
CloudCoin Console version number (e.g., "1.0.0").
active_wallet string
Name of the currently active wallet, or "None" if no wallet is active.
wallet_path string
Full filesystem path to the active wallet directory.
server_time string
Current server timestamp in format "YYYY-MM-DD HH:MM:SS".
has_lost_encryption_connections boolean
True if at least one RAIDA has no coins with 'p' (pass) status, indicating lost encryption keys. Scans Bank and Fracked folders across all wallets. When true, run the "Detect Lost Encryption Connections" command.
has_unfinished_tasks boolean
True if Suspect or Grade folders contain coins that need processing. Checks all configured wallets. When true, run Grade or Import commands to complete pending operations.
🔧 Maintenance Flags

The has_lost_encryption_connections and has_unfinished_tasks flags help detect when maintenance is needed:

  • Lost Encryption Connections: RAIDAs without encryption keys cannot process encrypted requests. Run Command 68 (Detect Lost Encryption Connections) followed by Command 69 (Recover Lost Connections) to restore encryption capability.
  • Unfinished Tasks: Coins in Suspect or Grade folders are awaiting authentication or sorting. Run Command 14 (Import/Grade) to move them to their final destinations (Bank, Fracked, or Counterfeit).

Example Response

{
  "status": "success",
  "operation": "status",
  "version": "1.0.0",
  "active_wallet": "Default",
  "wallet_path": "C:\\MyWallet3\\Default",
  "server_time": "2025-01-31 15:30:45",
  "has_lost_encryption_connections": false,
  "has_unfinished_tasks": true
}

Examples

JavaScript (fetch)

const API_HOST = 'http://localhost:8080';

async function getProgramStatus() {
    try {
        const response = await fetch(`${API_HOST}/api/program/status`);
        const result = await response.json();

        console.log('Program Status:');
        console.log(`Version: ${result.version}`);
        console.log(`Active Wallet: ${result.active_wallet}`);
        console.log(`Wallet Path: ${result.wallet_path}`);
        console.log(`Server Time: ${result.server_time}`);
        console.log('');

        // Check maintenance flags
        if (result.has_lost_encryption_connections) {
            console.warn('⚠️ Lost encryption connections detected!');
            console.log('   Run "Detect Lost Encryption Connections" to identify affected RAIDAs');
        }

        if (result.has_unfinished_tasks) {
            console.warn('⚠️ Unfinished tasks detected!');
            console.log('   Coins in Suspect/Grade folders need processing');
        }

        if (!result.has_lost_encryption_connections && !result.has_unfinished_tasks) {
            console.log('✅ No maintenance required');
        }
    } catch (error) {
        console.error('Error fetching status:', error);
    }
}

getProgramStatus();

cURL

# Get program status
curl -X GET "http://localhost:8080/api/program/status"

# Pretty print with jq
curl -s "http://localhost:8080/api/program/status" | jq .

# Check maintenance flags
curl -s "http://localhost:8080/api/program/status" | \
  jq '{has_lost_encryption_connections, has_unfinished_tasks}'

# Check if any maintenance needed
curl -s "http://localhost:8080/api/program/status" | \
  jq 'if .has_lost_encryption_connections or .has_unfinished_tasks
      then "⚠️ Maintenance required"
      else "✅ No maintenance required"
      end'

Go

package main

import (
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

const ApiHost = "http://localhost:8080"

type StatusResponse struct {
    Status                        string `json:"status"`
    Operation                     string `json:"operation"`
    Version                       string `json:"version"`
    ActiveWallet                  string `json:"active_wallet"`
    WalletPath                    string `json:"wallet_path"`
    ServerTime                    string `json:"server_time"`
    HasLostEncryptionConnections  bool   `json:"has_lost_encryption_connections"`
    HasUnfinishedTasks            bool   `json:"has_unfinished_tasks"`
}

func main() {
    resp, err := http.Get(fmt.Sprintf("%s/api/program/status", ApiHost))
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)

    var result StatusResponse
    if err := json.Unmarshal(body, &result); err != nil {
        panic(err)
    }

    fmt.Printf("Version: %s\n", result.Version)
    fmt.Printf("Active Wallet: %s\n", result.ActiveWallet)
    fmt.Printf("Wallet Path: %s\n", result.WalletPath)
    fmt.Printf("Server Time: %s\n", result.ServerTime)
    fmt.Println()

    // Check maintenance flags
    if result.HasLostEncryptionConnections {
        fmt.Println("⚠️ Lost encryption connections detected!")
        fmt.Println("   Run 'Detect Lost Encryption Connections' to identify affected RAIDAs")
    }

    if result.HasUnfinishedTasks {
        fmt.Println("⚠️ Unfinished tasks detected!")
        fmt.Println("   Coins in Suspect/Grade folders need processing")
    }

    if !result.HasLostEncryptionConnections && !result.HasUnfinishedTasks {
        fmt.Println("✅ No maintenance required")
    }
}

Related Endpoints

/api/program/echo

Test RAIDA network connectivity and get health status of all 25 RAIDA servers.

/api/program/total-balance

Get total balance across all wallets with denomination breakdown and maintenance flags.

/api/wallet/list

Get a complete list of all configured wallets with their locations.