Skip to content

REST API Reference

Base URL: http://<master>:6880

All endpoints except /api/v1/health and /metrics require authentication via bearer token:

Authorization: Bearer <token>

Endpoints

Health & Metrics

MethodPathAuthDescription
GET/api/v1/healthNoCluster health check
GET/metricsNoPrometheus metrics

Services

MethodPathAuthDescription
POST/api/v1/deployYesDeploy services
GET/api/v1/status?project=YesService status
POST/api/v1/services/{name}/scaleYesScale replicas
DELETE/api/v1/services/{name}YesStop service
DELETE/api/v1/projects/{name}YesStop all in project
POST/api/v1/stopYesStop ALL services
GET/api/v1/services/{name}/logsYesContainer logs
POST/api/v1/services/{name}/promoteYesPromote canary
POST/api/v1/services/{name}/rollbackYesRollback deploy

Cluster

MethodPathAuthDescription
GET/api/v1/cluster/infoYesNode list and cluster info
POST/api/v1/cluster/nodes/{id}/drainYesDrain a node
POST/api/v1/cluster/nodes/{id}/undrainYesUndrain a node

Webhooks

MethodPathAuthDescription
POST/api/v1/webhooks/githubSignatureGit push webhook
GET/api/v1/webhooksYesList registered webhooks

Deploy Payload

json
POST /api/v1/deploy
Content-Type: application/json

{
  "services": [{
    "name": "my-app",
    "project": "frontend",
    "image": "nginx:alpine",
    "replicas": 2,
    "port": 80,
    "domain": "app.example.com",
    "health": "/healthz",
    "env": {
      "KEY": "${secrets.KEY}"
    },
    "resources": {
      "memory": "512Mi",
      "cpu": 1.0
    },
    "internal": true,
    "placement": {
      "node": "worker-1"
    }
  }]
}

Response

json
{
  "deployed": ["my-app"],
  "errors": []
}

Scale Payload

json
POST /api/v1/services/my-app/scale
Content-Type: application/json

{
  "replicas": 5
}

Log Query

GET /api/v1/services/my-app/logs?tail=100

Returns plaintext log output.

Status Response

json
GET /api/v1/status

{
  "services": [
    {
      "name": "my-app",
      "project": "frontend",
      "status": "running",
      "replicas": 2,
      "running_replicas": 2,
      "image": "nginx:alpine",
      "domain": "app.example.com"
    }
  ]
}

Webhook Verification

GitHub/Gitea webhooks are verified using HMAC-SHA256. The webhook secret is configured when registering the webhook via orca webhooks add.

Error Responses

All errors return JSON:

json
{
  "error": "service not found: my-app"
}
StatusMeaning
401Missing or invalid token
403Insufficient role permissions
404Service or resource not found
500Internal server error

Released under the AGPL-3.0 License.