Overview

The eggrOS API provides programmatic access to core system operations including package management, system configuration, and status monitoring. All requests require authentication via API key.

curl "https://api.eggrOS.org/system/status" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
                        

Authentication

Access requires a valid API key. Generate one using the eggros-cli auth generate command or from your account settings.

Token Management

Scope
system:full or system:read
TTL
60 days
Revocation
/api/v1/tokens/revoke endpoint

Endpoints

All endpoints require HTTP headers: Authorization and Content-Type

GET /system/status

Returns system health metrics and configuration status

Response Sample

{
  "kernel_version": "6.4.13-eggr",
  "load_avg": [0.2, 0.4, 0.6],
  "mem_used": "780MiB / 7.6GiB",
  "package_version": "1.2.4",
  "updates_available": 15
}

Permissions Required

  • system:read
  • monitoring:view

POST /system/update

Triggers a system update check with optional dry-run

Request JSON

{
  "dry_run": true,
  "channel": "stable"
}

Permissions Required

  • system:write
  • updates:manage

Rate Limiting

All API clients are rate limited to 1000 requests per hour.

Rate Limit Headers

X-Rate-Limit
1000
X-Ratelimit-Remaining
892
X-Ratelimit-Reset
3600s

Usage Examples

Check System Status

curl -s "https://api.eggrOS.org/system/status" \
-H "Authorization: Bearer $(cat ~/.eggr-apikey)" |
jq '.updates_available'

Apply System Update

curl -s -X POST "https://api.eggrOS.org/system/update" \
-H "Authorization: Bearer $(cat ~/.eggr-apikey)" \
-d '{"channel": "beta", "dry_run": false}' |
jq
```