Back to API Documentation

Tasks API

Task creation, assignment, and workflow management

Version
1.0.0
Base URL
ws://hyperion:9999/tasks-api
Endpoints
35+

Categories

GET/api/v1/tasks

List tasks with optional filters

Parameters

status
string

Filter by status (pending, in-progress, completed, failed, cancelled)

assignedToId
string

Filter by assignee ID

priority
string

Filter by priority (low, medium, high, urgent)

limit
integer

Maximum results (default: 100)

Response

{
  "tasks": [
    {
      "id": "507f1f77bcf86cd799439011",
      "processId": "507f1f77bcf86cd799439012",
      "name": "Implement user authentication",
      "description": "Add JWT-based authentication to the API",
      "status": "in-progress",
      "priority": "high",
      "assignedTo": {
        "type": "human",
        "id": "user123",
        "name": "John Doe"
      },
      "dependencies": ["507f1f77bcf86cd799439010"],
      "startsAt": "2025-01-08T09:00:00Z",
      "dueAt": "2025-01-10T17:00:00Z",
      "createdAt": "2025-01-07T10:00:00Z",
      "updatedAt": "2025-01-08T14:30:00Z"
    }
  ],
  "total": 42,
  "limit": 100
}
POST/api/v1/tasks

Create a new task with flexible assignment

Request Body

{
  "processId": "507f1f77bcf86cd799439012",
  "name": "Implement user authentication",
  "description": "Add JWT-based authentication with refresh tokens",
  "priority": "high",
  "assignedTo": {
    "type": "human",
    "id": "user123",
    "name": "John Doe"
  },
  "dependencies": ["507f1f77bcf86cd799439010"],
  "startsAt": "2025-01-08T09:00:00Z",
  "dueAt": "2025-01-10T17:00:00Z"
}

Response

{
  "id": "507f1f77bcf86cd799439013",
  "processId": "507f1f77bcf86cd799439012",
  "name": "Implement user authentication",
  "status": "pending",
  "priority": "high",
  "createdAt": "2025-01-08T15:00:00Z"
}
GET/api/v1/tasks/{taskId}

Get detailed information about a specific task

Parameters

taskId
stringrequired

MongoDB ObjectID of the task

Response

{
  "id": "507f1f77bcf86cd799439011",
  "processId": "507f1f77bcf86cd799439012",
  "name": "Implement user authentication",
  "description": "Add JWT-based authentication to the API",
  "status": "in-progress",
  "priority": "high",
  "assignedTo": {
    "type": "human",
    "id": "user123",
    "name": "John Doe"
  },
  "dependencies": [
    {
      "taskId": "507f1f77bcf86cd799439010",
      "name": "Set up database schema",
      "status": "completed"
    }
  ],
  "context": {
    "jwtLibrary": "jsonwebtoken",
    "tokenExpiry": "24h"
  },
  "attachments": [
    {
      "id": "att123",
      "fileName": "auth-spec.pdf",
      "fileSize": 245678,
      "uploadedAt": "2025-01-07T11:00:00Z"
    }
  ],
  "comments": 3,
  "timeEntries": 2,
  "totalTimeSpent": 180,
  "createdAt": "2025-01-07T10:00:00Z",
  "updatedAt": "2025-01-08T14:30:00Z"
}
PUT/api/v1/tasks/{taskId}/status

Update task status with optional comment

Request Body

{
  "status": "completed",
  "comment": "Authentication implemented and tested successfully"
}

Response

{
  "id": "507f1f77bcf86cd799439011",
  "status": "completed",
  "completedAt": "2025-01-08T16:00:00Z",
  "updatedAt": "2025-01-08T16:00:00Z"
}
DELETE/api/v1/tasks/{taskId}

Delete a task permanently (requires confirmation)

Request Body

{
  "confirm": true,
  "reason": "Task no longer needed due to requirement changes"
}

Response

{
  "success": true,
  "message": "Task deleted successfully"
}