Create Project management API endpoints #28

Closed
opened 2025-12-29 23:48:22 +00:00 by cardosofelipe · 0 comments

Description

Implement REST API endpoints for Project CRUD operations.

Requirements

Endpoints

POST   /api/v1/projects                 - Create project
GET    /api/v1/projects                 - List user's projects
GET    /api/v1/projects/{id}            - Get project details
GET    /api/v1/projects/slug/{slug}     - Get project by slug
PATCH  /api/v1/projects/{id}            - Update project
DELETE /api/v1/projects/{id}            - Archive project
POST   /api/v1/projects/{id}/pause      - Pause project
POST   /api/v1/projects/{id}/resume     - Resume project

Authorization

  • Users can only access their own projects
  • Superusers can access all projects
  • Owner check on all mutations

Response Schema

{
  "id": "uuid",
  "name": "string",
  "slug": "string",
  "description": "string",
  "autonomy_level": "string",
  "status": "string",
  "settings": {},
  "owner": {...},
  "stats": {
    "active_agents": 0,
    "open_issues": 0,
    "current_sprint": null
  },
  "created_at": "datetime",
  "updated_at": "datetime"
}

Tests

  • All endpoints with valid data
  • Authorization (own projects only)
  • Validation errors
  • 404 handling
  • Status transitions

Acceptance Criteria

  • All endpoints implemented
  • Authorization enforced
  • Proper error responses
  • Rate limiting configured
  • Integration tests
  • OpenAPI schema updated

Dependencies

  • Depends on: #23 (Project entity)

Assignable To

backend-engineer agent

## Description Implement REST API endpoints for Project CRUD operations. ## Requirements ### Endpoints ``` POST /api/v1/projects - Create project GET /api/v1/projects - List user's projects GET /api/v1/projects/{id} - Get project details GET /api/v1/projects/slug/{slug} - Get project by slug PATCH /api/v1/projects/{id} - Update project DELETE /api/v1/projects/{id} - Archive project POST /api/v1/projects/{id}/pause - Pause project POST /api/v1/projects/{id}/resume - Resume project ``` ### Authorization - Users can only access their own projects - Superusers can access all projects - Owner check on all mutations ### Response Schema ```json { "id": "uuid", "name": "string", "slug": "string", "description": "string", "autonomy_level": "string", "status": "string", "settings": {}, "owner": {...}, "stats": { "active_agents": 0, "open_issues": 0, "current_sprint": null }, "created_at": "datetime", "updated_at": "datetime" } ``` ### Tests - All endpoints with valid data - Authorization (own projects only) - Validation errors - 404 handling - Status transitions ## Acceptance Criteria - [ ] All endpoints implemented - [ ] Authorization enforced - [ ] Proper error responses - [ ] Rate limiting configured - [ ] Integration tests - [ ] OpenAPI schema updated ## Dependencies - Depends on: #23 (Project entity) ## Assignable To backend-engineer agent
cardosofelipe added the backendphase-1 labels 2025-12-29 23:49:59 +00:00
Sign in to join this conversation.