REST API Reference

Programmatic access to the #divisions platform. All endpoints return JSON and require HTTPS.

https://api.divisions.dev/v1

🔐 Authentication

All requests must include your API key in the Authorization header. Keys can be generated from your dashboard.

Authorization: Bearer <YOUR_API_KEY> Content-Type: application/json

👤 Users

GET /users Retrieve all authenticated users
Query Parameters
NameTypeDescription
limitintMax results (1-100)
offsetintPage offset
rolestringFilter by role
Response 200
{
  "success": true,
  "data": [
    {
      "id": "usr_123",
      "name": "Alex Chen",
      "role": "admin",
      "status": "active"
    }
  ],
  "meta": { "limit": 10, "offset": 0, "total": 142 }
}
POST /users Create a new user
Body Parameters
NameTypeDescription
email*stringUser email
name*stringFull name
rolestringadmin, editor, viewer
metadataobjectCustom key-value pairs
Response 201
{
  "success": true,
  "data": {
    "id": "usr_456",
    "email": "dev@company.com",
    "role": "viewer",
    "created_at": "2025-01-15T10:30:00Z"
  }
}

📁 Projects

GET /projects/:id Fetch project details
Path Parameters
NameTypeDescription
id*stringProject UUID
Response 200
{
  "success": true,
  "data": {
    "id": "prj_789",
    "name": "Alpha Release",
    "status": "active",
    "team_count": 12,
    "deployments": 45
  }
}
PATCH /projects/:id Update project configuration
Body Parameters
NameTypeDescription
namestringNew project name
settingsobjectFeature flags & configs
visibilitystringpublic, private, team
Response 200
{
  "success": true,
  "message": "Project updated",
  "updated_fields": ["name", "settings"]
}

📊 Analytics

GET /analytics/metrics Retrieve platform performance metrics
Query Parameters
NameTypeDescription
start_date*dateISO 8601
end_date*dateISO 8601
granularitystringhour, day, week
Response 200
{
  "success": true,
  "data": {
    "requests": 15420,
    "success_rate": 99.8,
    "avg_latency_ms": 42,
    "bandwidth_gb": 12.4
  }
}
DELETE /analytics/history Clear cached analytics data
Headers
NameTypeDescription
X-Confirm-Clear*stringMust be 'true'
Response 204
No Content
400 Bad Request if header missing
403 Forbidden without admin role