Skip to content

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):

bash
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:

ParameterDefaultDescription
page1Page number
per_page20Items per page (max 100)

Response includes pagination metadata:

json
{
  "data": [...],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 142,
    "total_pages": 8
  }
}

Error Format

All errors follow this structure:

json
{
  "error": "Not Found",
  "message": "Repository owner/repo not found",
  "status": 404
}
StatusMeaning
400Bad request (missing parameters)
401Unauthorized (missing/invalid API key)
404Resource not found
429Rate limited
500Internal 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/api

Endpoint Summary

Route FilePrefixEndpointsSection
repos.js/api/repos3Repos
issues.js/api/issues3Issues
pullRequests.js/api/pull-requests3Pull Requests
ciRuns.js/api/ci5CI Runs
insights.js/api/insights5Insights
fix.js/api/fix3Fix Attempts
healHistory.js/api/heal4Heal History
duplicates.js/api/duplicates7Duplicates
maintainer.js/api/maintainer17Maintainer
enforcement.js/api/enforcement12Enforcement
phase2.js/api/phase215Merge Queue
phase3.js/api/phase316Trust
phase4.js/api13Intelligence
actions.js/api/actions6Actions
activity.js/api/activity2Activity Feed
auth.js/api/auth4Auth (login/logout/session)
config.js/api/config8Config
decisions.js/api/decisions2Decisions
gates.js/api/gates8Quality Gates
githubRelay.js/api/github3GitHub API Relay
readiness.js/api/readiness2Repo Readiness
transfers.js/api/transfers3Repo Transfers
waivers.js/api/waivers4Waivers
webhookDeliveries.js/api/deliveries5Webhook Deliveries
webhooks.js/webhooks1Webhooks

In This Section

Last validated: v0.13.0

Released under the MIT License.