Documentation/REST API Reference

Ocaq Cloud REST API Reference

Automate project deployments, monitor container health, and query runtime logs via standard HTTPS REST endpoints.

API Authentication (Bearer Token)

All API requests require an `Authorization: Bearer <TOKEN>` header. You can generate Personal Access Tokens in your dashboard under Settings -> API Tokens.

cURL Example
curl -H "Authorization: Bearer ocaq_pat_your_token" https://api.ocaq.dev/v1/projects

Core Endpoints

GET/v1/projects

List all active projects in your workspace.

Response 200 OK (application/json)
{
  "projects": [
    {
      "id": "proj_9f8a1bc2",
      "name": "my-web-app",
      "framework": "nextjs",
      "status": "ready",
      "productionUrl": "https://my-web-app.ocaq.app"
    }
  ]
}
POST/v1/projects/:id/deploys

Trigger a new deployment build for a specified project.

Response 200 OK (application/json)
{
  "deployId": "dpl_3b7e41ac",
  "status": "building",
  "createdAt": "2026-10-21T11:30:00Z",
  "previewUrl": "https://preview-dpl3b7.ocaq.app"
}
GET/v1/deploys/:id/status

Check real-time execution status of a deployment.

Response 200 OK (application/json)
{
  "deployId": "dpl_3b7e41ac",
  "status": "ready",
  "buildDurationSeconds": 24,
  "healthCheck": "passed"
}
GET/v1/projects/:id/logs

Stream recent stdout and stderr logs for a project.

Response 200 OK (application/json)
{
  "logs": [
    "[info] Server listening on port 3000",
    "[info] Connected to PostgreSQL"
  ]
}