Skip to content
Reference
On this page
  1. Authentication
  2. GitHub-compatible endpoints (/repos/{owner}/{repo}/*)
  3. arks-native endpoints (/api/v1/* and ops)
  4. Status codes and guardrails
  5. Next

REST API reference

arks serve exposes both a GitHub-compatible REST surface (/repos/{owner}/{repo}/*) for seamless arks pr / arks issue / arks api integration and arks-native endpoints (/api/v1/*) for leases and self-hosted forge automation.

Authentication

Pass a Personal Access Token (PAT) via Authorization: Bearer <token> or HTTP Basic auth, or invoke through the built-in arks api client:

# Using curl:
curl -sS -H "Authorization: Bearer $ARKS_TOKEN" \
  http://127.0.0.1:8080/repos/acme/demo/issues

# Using arks api (pure-Rust --jq filtering built in):
arks api repos/acme/demo/issues --jq '.[].title'

GitHub-compatible endpoints (/repos/{owner}/{repo}/*)

Resource Methods Purpose
/repos/{o}/{r}/issues GET, POST List or create issues
/repos/{o}/{r}/issues/{n} GET, PATCH Read or update issue state/title/body
/repos/{o}/{r}/issues/{n}/comments GET, POST List or post issue/PR comments
/repos/{o}/{r}/pulls GET, POST List or open pull requests
/repos/{o}/{r}/pulls/{n} GET, PATCH Read or update a pull request
/repos/{o}/{r}/pulls/{n}/merge PUT Merge a PR (honors branch protection & draft guard)
/repos/{o}/{r}/releases GET, POST List or publish releases with SHA-256 assets
/repos/{o}/{r}/statuses/{sha} GET, POST Read or post commit CI statuses
/repos/{o}/{r}/rulesets GET, POST List or create push/merge rulesets
/repos/{o}/{r}/actions/runs GET List local async Actions workflow runs

arks-native endpoints (/api/v1/* and ops)

Endpoint Methods Purpose
/api/v1/leases GET, DELETE Inspect active multi-session revision leases or force-unlock a stale lease
/info/lfs/objects/batch POST Native Git LFS Batch API
/info/lfs/objects/{oid} GET, PUT Streaming SHA-256 LFS object transfer
/info/lfs/verify POST LFS upload verification callback
/healthz GET Liveness / readiness probe
/metrics GET Prometheus-format server metrics

Status codes and guardrails

Code Meaning
401 Unauthorized Missing/invalid credentials, revoked global session, or unauthenticated access to a private repository
403 Forbidden Insufficient RBAC role, CSRF failure, or write attempt against an archived repository
413 Payload Too Large Request body exceeded configured server limit
429 Too Many Requests Rate limit triggered (for example repeated login attempts)
503 Service Unavailable Server overload or graceful shutdown in progress

Next

Forge Web UI Forge security & auth Forge client Operations & deploy

Edit this page

Back to top