MicroMonitor API Documentation

Integrate MicroMonitor into your applications and workflows

Overview

The MicroMonitor API provides programmatic access to server monitoring data. All public endpoints are rate-limited to 60 requests per minute per IP address.

Base URL: https://claude.dwyer.co.za/api/v1

Public Endpoints

GET /status

Get current server status and metrics

Response Example:

{
  "status": "healthy",
  "timestamp": "2025-07-25T18:00:00.000Z",
  "current": {
    "cpu": {
      "usage": "23.45",
      "load": [0.5, 0.6, 0.7]
    },
    "memory": {
      "usage": "45.67",
      "available": 4096,
      "total": 8192
    },
    "disk": {
      "usage": "67.89",
      "available": 50000,
      "total": 100000
    },
    "uptime": 1234567
  },
  "averages": {
    "cpu": "25.30",
    "memory": "48.20"
  },
  "links": {
    "documentation": "https://claude.dwyer.co.za/api-docs",
    "status_page": "https://claude.dwyer.co.za/status/demo"
  }
}
GET /health

Simple health check endpoint

Response Example:

{
  "status": "ok",
  "service": "MicroMonitor",
  "version": "1.0.0",
  "timestamp": "2025-07-25T18:00:00.000Z"
}

Integration Examples

Bash / cURL

Monitor your server from the command line:

#!/bin/bash
# Check server status
curl https://claude.dwyer.co.za/api/v1/status | jq '.status'

# Get CPU usage
curl https://claude.dwyer.co.za/api/v1/status | jq '.current.cpu.usage'

# Health check
curl https://claude.dwyer.co.za/api/v1/health
Python

Integrate MicroMonitor into your Python applications:

import requests
import json

# Get server status
response = requests.get('https://claude.dwyer.co.za/api/v1/status')
data = response.json()

if data['status'] == 'healthy':
    print(f"Server is healthy! CPU: {data['current']['cpu']['usage']}%")
else:
    print(f"Warning: Server status is {data['status']}")

# Monitor continuously
import time

while True:
    response = requests.get('https://claude.dwyer.co.za/api/v1/status')
    data = response.json()
    print(f"CPU: {data['current']['cpu']['usage']}% | Memory: {data['current']['memory']['usage']}%")
    time.sleep(30)  # Check every 30 seconds
Node.js / JavaScript

Use MicroMonitor in your Node.js applications:

const axios = require('axios');

// Async function to check server status
async function checkServerStatus() {
    try {
        const response = await axios.get('https://claude.dwyer.co.za/api/v1/status');
        const data = response.data;
        
        console.log(`Server Status: ${data.status}`);
        console.log(`CPU Usage: ${data.current.cpu.usage}%`);
        console.log(`Memory Usage: ${data.current.memory.usage}%`);
        
        // Alert if CPU is high
        if (parseFloat(data.current.cpu.usage) > 80) {
            console.warn('⚠️  High CPU usage detected!');
        }
    } catch (error) {
        console.error('Failed to fetch server status:', error.message);
    }
}

// Check every minute
setInterval(checkServerStatus, 60000);
GitHub Actions

Monitor your server in CI/CD pipelines:

name: Server Health Check

on:
  schedule:
    - cron: '*/30 * * * *'  # Every 30 minutes
  workflow_dispatch:

jobs:
  health-check:
    runs-on: ubuntu-latest
    steps:
      - name: Check Server Status
        run: |
          STATUS=$(curl -s https://claude.dwyer.co.za/api/v1/status | jq -r '.status')
          echo "Server status: $STATUS"
          if [ "$STATUS" != "healthy" ]; then
            echo "::error::Server is not healthy!"
            exit 1
          fi
      
      - name: Check Resource Usage
        run: |
          RESPONSE=$(curl -s https://claude.dwyer.co.za/api/v1/status)
          CPU=$(echo $RESPONSE | jq -r '.current.cpu.usage')
          MEMORY=$(echo $RESPONSE | jq -r '.current.memory.usage')
          echo "CPU: $CPU% | Memory: $MEMORY%"

Status Badges

Display real-time status badges in your README or website:

GET /api/badge/:statusId

Generate SVG status badge for embedding

Example:

Status Badge

Markdown:

![Server Status](https://claude.dwyer.co.za/api/badge/1ewxbj3gc5j)

HTML:

<img src="https://claude.dwyer.co.za/api/badge/1ewxbj3gc5j" alt="Server Status">

Rate Limits

Public API endpoints are rate-limited to ensure fair usage:

Need More?

For authenticated access with higher rate limits and more features:

Create Account