REST API Reference

Complete API documentation for QODRYX

Base URL

https://api.qodryx.com/v1

Request Format

All requests should include the following headers:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json

Response Format

All responses are returned in JSON format:

{
  "data": { ... },           // Response data
  "meta": {                  // Pagination info (for list endpoints)
    "page": 1,
    "per_page": 20,
    "total": 100,
    "total_pages": 5
  }
}

API Endpoints

Projects

GET/projects

List all projects

View example
curl -X GET "https://api.qodryx.com/v1/projects" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response
{
  "data": [
    {
      "id": "proj_abc123",
      "name": "my-app",
      "repository": "github.com/user/my-app",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": { "page": 1, "per_page": 20, "total": 1 }
}
POST/projects

Create a new project

View example
curl -X POST "https://api.qodryx.com/v1/projects" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-app",
    "repository": "github.com/user/my-app",
    "description": "My awesome application"
  }'
GET/projects/:id

Get a specific project

PATCH/projects/:id

Update a project

DELETE/projects/:id

Delete a project

Workflows

GET/workflows

List all workflows

View example
curl -X GET "https://api.qodryx.com/v1/workflows?project_id=proj_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response
{
  "data": [
    {
      "id": "wf_xyz789",
      "name": "Deploy to Production",
      "status": "completed",
      "stages": ["intake", "build", "verify", "prove", "iterate", "package"],
      "created_at": "2024-01-15T14:00:00Z"
    }
  ]
}
POST/workflows

Create and trigger a new workflow

View example
curl -X POST "https://api.qodryx.com/v1/workflows" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "prompt": "Add user authentication with OAuth",
    "config": {
      "ai_provider": "anthropic",
      "auto_deploy": false
    }
  }'
GET/workflows/:id

Get workflow details and status

GET/workflows/:id/logs

Get workflow execution logs

POST/workflows/:id/cancel

Cancel a running workflow

Security Scans

GET/security/scans

List security scans

POST/security/scans

Trigger a new security scan

View example
curl -X POST "https://api.qodryx.com/v1/security/scans" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "scan_types": ["sast", "secrets", "dependencies"],
    "branch": "main"
  }'
GET/security/scans/:id

Get scan results

GET/security/findings

List all security findings

POST/security/findings/:id/remediate

Trigger AI auto-remediation for a finding

Deployments

GET/deployments

List deployments

POST/deployments

Trigger a deployment

View example
curl -X POST "https://api.qodryx.com/v1/deployments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "environment": "production",
    "provider": "vercel",
    "config": {
      "branch": "main",
      "auto_rollback": true
    }
  }'
GET/deployments/:id

Get deployment status

POST/deployments/:id/rollback

Rollback a deployment

Tests

POST/tests/generate

Generate AI tests for code

POST/tests/run

Run tests

GET/tests/:id/results

Get test results

Pagination

List endpoints support pagination with the following query parameters:

GET /projects?page=2&per_page=50

# Response includes meta object
{
  "data": [...],
  "meta": {
    "page": 2,
    "per_page": 50,
    "total": 150,
    "total_pages": 3
  }
}

Filtering & Sorting

Most list endpoints support filtering and sorting:

# Filter by status
GET /workflows?status=running

# Filter by date range
GET /security/scans?created_after=2024-01-01&created_before=2024-01-31

# Sort results
GET /projects?sort=created_at&order=desc

# Multiple filters
GET /security/findings?severity=critical&status=open&project_id=proj_abc123

Error Responses

{
  "error": {
    "code": "validation_error",
    "message": "Invalid request parameters",
    "details": {
      "field": "project_id",
      "issue": "Project not found"
    }
  }
}

Next Steps