Skip to content

API Reference

All API endpoints are hosted at https://cloud.sweny.ai.

Two authentication methods are supported:

Authorization: Bearer <project-token>
X-GitHub-Installation-Id: <installation-id>

The installation ID is available in the GitHub Actions runtime context.


Report Action run results to the cloud.

Request body:

{
"owner": "swenyai",
"repo": "sweny",
"status": "completed",
"workflow": "triage",
"trigger": "schedule",
"branch": "main",
"commit_sha": "abc1234",
"duration_ms": 45000,
"issues_found": true,
"recommendation": "implement",
"issue_url": "https://github.com/swenyai/sweny/issues/42",
"pr_url": "https://github.com/swenyai/sweny/pull/10",
"nodes": [
{ "id": "prepare", "name": "Prepare", "status": "success" },
{ "id": "investigate", "name": "Investigate", "status": "success" }
]
}

Response: { "ok": true, "run_id": "uuid", "run_url": "...", "comment": "..." }


Stream real-time execution events for live DAG visualization.

{ "event": "start", "owner": "swenyai", "repo": "sweny", "workflow": "triage" }

Response: { "ok": true, "run_id": "uuid" }

{ "event": "node", "run_id": "uuid", "node_id": "investigate", "name": "Investigate", "status": "running" }
{ "event": "complete", "run_id": "uuid", "status": "completed", "duration_ms": 45000 }

Returns time-series run data and enriched totals.

Query params: ?project_id=uuid&days=30

Response: { "daily": [...], "totals": { "runs": 150, "issues_found": 89, ... } }


Returns a rich activity feed from GitHub events and Action runs.

Query params: ?project_id=uuid&limit=30

Response: { "events": [{ "type": "pr.merged", "message": "...", "actor": "...", ... }] }


Returns aggregated GitHub event data (issue velocity, PR merge rate, contributors).

Query params: ?project_id=uuid&days=30


Returns an AI-synthesized summary of recent activity (Individual+ plans).

Query params: ?days=7

Response: { "insight": "...", "days": 7, "generated_at": "..." }


JSON-RPC 2.0 endpoint for MCP (Model Context Protocol). Team+ plans only.

Tools:

  • sweny_list_projects — list all projects
  • sweny_get_runs — get recent runs for a project
  • sweny_get_stats — get aggregated stats
  • sweny_get_run_detail — get full details for a specific run

Returns a dynamic SVG badge for README files.

![SWEny](https://cloud.sweny.ai/api/badge/swenyai/sweny)