REST API Reference
GitWire exposes a REST API with 154 endpoints across 25 route files.
Authentication
All API endpoints (except /health and /webhooks) require authentication. Two methods are supported:
API Key (Bearer token):
curl https://gitwire.yourdomain.com/api/repos \
-H "Authorization: Bearer YOUR_API_KEY"Session cookie (dashboard login):
Dashboard login creates a Redis-backed session stored in an httpOnly cookie (gitwire-session). The cookie is automatically sent with subsequent requests.
Set your API key via the API_KEY or API_KEYS environment variable. See Environment Variables.
Pagination
List endpoints support pagination via query parameters:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
per_page | 20 | Items per page (max 100) |
Response includes pagination metadata:
{
"data": [...],
"meta": {
"page": 1,
"per_page": 20,
"total": 142,
"total_pages": 8
}
}Error Format
All errors follow this structure:
{
"error": "Not Found",
"message": "Repository owner/repo not found",
"status": 404
}| Status | Meaning |
|---|---|
| 400 | Bad request (missing parameters) |
| 401 | Unauthorized (missing/invalid API key) |
| 404 | Resource not found |
| 429 | Rate limited |
| 500 | Internal server error |
Rate Limiting
API requests are rate-limited via Redis. Default: 100 requests per minute per IP. Health endpoint exempt.
Base URL
All endpoints are relative to your GitWire instance:
https://gitwire.yourdomain.com/apiEndpoint Summary
| Route File | Prefix | Endpoints | Section |
|---|---|---|---|
repos.js | /api/repos | 3 | Repos |
issues.js | /api/issues | 3 | Issues |
pullRequests.js | /api/pull-requests | 3 | Pull Requests |
ciRuns.js | /api/ci | 5 | CI Runs |
insights.js | /api/insights | 5 | Insights |
fix.js | /api/fix | 3 | Fix Attempts |
healHistory.js | /api/heal | 4 | Heal History |
duplicates.js | /api/duplicates | 7 | Duplicates |
maintainer.js | /api/maintainer | 17 | Maintainer |
enforcement.js | /api/enforcement | 12 | Enforcement |
phase2.js | /api/phase2 | 15 | Merge Queue |
phase3.js | /api/phase3 | 16 | Trust |
phase4.js | /api | 13 | Intelligence |
actions.js | /api/actions | 6 | Actions |
activity.js | /api/activity | 2 | Activity Feed |
auth.js | /api/auth | 4 | Auth (login/logout/session) |
config.js | /api/config | 8 | Config |
decisions.js | /api/decisions | 2 | Decisions |
gates.js | /api/gates | 8 | Quality Gates |
githubRelay.js | /api/github | 3 | GitHub API Relay |
readiness.js | /api/readiness | 2 | Repo Readiness |
transfers.js | /api/transfers | 3 | Repo Transfers |
waivers.js | /api/waivers | 4 | Waivers |
webhookDeliveries.js | /api/deliveries | 5 | Webhook Deliveries |
webhooks.js | /webhooks | 1 | Webhooks |
In This Section
- Repos
- Issues
- Pull Requests
- CI Runs
- Insights
- Fix Attempts
- Heal History
- Duplicates
- Decisions
- Maintainer
- Enforcement
- Merge Queue & Automation
- Trust & Dependencies
- Intelligence & Audit
- Quality Gates
- Waivers
- Webhooks
Last validated: v0.13.0