API Reference
SOFE Server (FastAPI) and hosted API (api.sofe.dev) endpoints.
Authentication
X-API-Key: sk_sofe_your_key_here
Get your key at platform.sofe.dev/keys
Endpoints
POST
/evaluateRun policies against connected account
Request body:
{"policies": ["no-idle-ec2"], "regions": ["us-east-1"]}Response:
{"findings_count": 48, "resources_scanned": 64,
"resources_by_type": {"aws.lambda": 12, "aws.s3": 8, ...},
"findings": [{policy_name, severity, resource_id, recommendation,
remediation_commands: [{label, command, risk, note}]}]}POST
/validateCheck policy YAML syntax
Request body:
{"policy_yaml": "apiVersion: sofe/v1\nkind: Policy..."}Response:
{"valid": true, "errors": []}GET
/policiesList available policies
Response:
{"policies": [{name, severity, description}], "total": 20}GET
/evaluationsEvaluation history (paginated)
Response:
{"evaluations": [{id, timestamp, findings_count}], "total": 15}GET
/evaluations/:idFull evaluation detail with findings
Response:
{"findings": [...], "resources_by_type": {...}, "trigger": "manual"}GET
/collectorsList all available collectors
Response:
[{name, resource_type, metrics}]GET
/healthStatus check (public, no auth)
Response:
{"status": "ok", "version": "0.2.0"}Rate Limits
Rate limits apply only to POST /evaluate. All read endpoints (GET /evaluations, /collectors, /policies) are unlimited.
| Tier | Evaluations/day | API Keys |
|---|---|---|
| Free | 10 | 1 |
| Pro ($29/mo) | 1,000 | 10 |
| Enterprise | Unlimited | Unlimited |
Error Codes
401Missing or invalid API key429Rate limit exceeded (try again tomorrow or upgrade)422Invalid request (malformed policy YAML, unknown policy name)500Internal error (AWS API failure, please retry)