Documentation

Sessions

Get session history

Returns paginated session history with optional filters

Production (Pomodoro microservice)StagingUAT
GEThttps://pomodoro.ankiren.com/api/me/pomodoro/sessions

Parameters

Query Parameters

  • startDatestring<date-time>query

    Filter sessions from this date (ISO 8601)

    format: date-time
  • endDatestring<date-time>query

    Filter sessions until this date (ISO 8601)

    format: date-time
  • type"work" | "shortBreak" | "longBreak"query

    Filter by session type

  • status"completed" | "skipped" | "abandoned"query

    Filter by completion status

  • limitintegerquery

    Maximum sessions to return (default 50)

    default: 50
  • offsetintegerquery

    Pagination offset (default 0)

    default: 0

Responses

200 · Session list

  • sessions[PomodoroSession]
    • idintegerRequired

      Session ID

    • userIdstringRequired

      User ID

    • type"work" | "shortBreak" | "longBreak"Required

      Type of Pomodoro session:

      • work: Focus/work session (default 25 min)
      • shortBreak: Short break (default 5 min)
      • longBreak: Long break after 4 work sessions (default 15 min)
    • durationSecondsintegerRequired

      Configured duration in seconds

    • actualSecondsintegerRequired

      Actual time elapsed before completion/skip/abandon

    • status"completed" | "skipped" | "abandoned"Required

      Session completion status:

      • completed: Session ran to completion
      • skipped: User skipped to next session
      • abandoned: User reset or changed session type mid-timer
    • startedAtstring<date-time>Required

      When the session started

      format: date-time
    • completedAtstring<date-time>Required

      When the session ended

      format: date-time
    • createdAtstring<date-time>Required

      Record creation timestamp

      format: date-time
  • totalinteger

    Total sessions matching filters

application/json
{
  "sessions": [
    {
      "id": 1,
      "userId": "clxyz123",
      "type": "work",
      "durationSeconds": 1500,
      "actualSeconds": 1500,
      "status": "completed",
      "startedAt": "2026-01-10T10:00:00Z",
      "completedAt": "2026-01-10T10:25:00Z",
      "createdAt": "2026-01-10T10:25:00Z"
    }
  ],
  "total": 25
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X GET 'https://pomodoro.ankiren.com/api/me/pomodoro/sessions' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'