Skip to main content

Project & Work Items

Endpoints for managing projects and work items integration with external project management tools.

Project Management

GET /api/projects

Gets all projects.

Query Parameters:

  • includeStats: Include project statistics
  • limit: Maximum projects to return
  • offset: Number of projects to skip

Response:

{
"projects": [
{
"id": "project-123",
"name": "Mobile App Testing",
"description": "End-to-end testing for mobile application",
"integrationId": "plane-integration-456",
"workItemCount": 25,
"activeWorkItems": 8,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T01:00:00.000Z"
}
],
"total": 1
}

GET /api/projects/:id

Gets a specific project.

Parameters:

  • id: Project identifier

Response:

{
"id": "project-123",
"name": "Mobile App Testing",
"description": "End-to-end testing for mobile application",
"integrationId": "plane-integration-456",
"settings": {
"autoSync": true,
"syncInterval": 3600
},
"stats": {
"totalWorkItems": 25,
"completedWorkItems": 17,
"inProgressWorkItems": 8
}
}

GET /api/projects/:id/work-items

Gets work items for a specific project.

Parameters:

  • id: Project identifier

Query Parameters:

  • status: Filter by status (todo, in_progress, done)
  • assignee: Filter by assignee
  • label: Filter by label
  • limit: Maximum work items to return

GET /api/projects/:id/work-items/count

Gets work item count for a project.

Parameters:

  • id: Project identifier

Response:

{
"total": 25,
"byStatus": {
"todo": 10,
"in_progress": 8,
"done": 7
},
"byPriority": {
"urgent": 3,
"high": 5,
"medium": 12,
"low": 5
}
}

GET /api/projects/stats

Gets statistics across all projects.

Response:

{
"totalProjects": 5,
"totalWorkItems": 150,
"activeProjects": 4,
"completedWorkItems": 95,
"projectStats": [
{
"projectId": "project-123",
"name": "Mobile Testing",
"workItemCount": 25,
"completionRate": 0.68
}
]
}

PUT /api/projects/:id

Updates a project.

Parameters:

  • id: Project identifier

Request Body:

{
"name": "Updated Project Name",
"description": "Updated description",
"settings": {
"autoSync": false
}
}

DELETE /api/projects/:id

Deletes a project.

Parameters:

  • id: Project identifier

Work Items

GET /api/work-items

Gets work items with filtering.

Query Parameters:

  • projectId: Filter by project
  • status: Filter by status
  • assignee: Filter by assignee
  • label: Filter by label
  • priority: Filter by priority
  • limit: Maximum items to return
  • offset: Number of items to skip

Response:

{
"workItems": [
{
"id": "work-item-123",
"title": "Test user login flow",
"description": "Verify login functionality works correctly",
"status": "in_progress",
"priority": "high",
"assignee": "john.doe@example.com",
"projectId": "project-456",
"labels": ["login", "authentication"],
"dueDate": "2024-01-15T00:00:00.000Z",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T01:00:00.000Z"
}
],
"total": 1
}

GET /api/work-items/stats

Gets work item statistics.

Response:

{
"totalWorkItems": 150,
"byStatus": {
"todo": 45,
"in_progress": 38,
"done": 67
},
"byPriority": {
"urgent": 12,
"high": 25,
"medium": 78,
"low": 35
},
"byAssignee": {
"john.doe@example.com": 15,
"jane.smith@example.com": 22
},
"completionRate": 0.45,
"averageCycleTime": 345600000
}

POST /api/work-items/fetch/:projectId

Fetches work items from external project management tool.

Parameters:

  • projectId: Project identifier

Request Body:

{
"forceSync": false,
"includeClosed": false
}

Response:

{
"success": true,
"fetched": 25,
"updated": 5,
"created": 20,
"syncId": "sync-789"
}

POST /api/work-items/sync/:integrationId

Syncs work items for a specific integration.

Parameters:

  • integrationId: Integration identifier

Request Body:

{
"projectIds": ["project-123", "project-456"],
"syncOptions": {
"fullSync": false,
"updateExisting": true
}
}