# List sessions

Endpoint: GET /api/sessions
Version: 1.0
Security: ApiKeyAuth

## Query parameters:

  - `last_id` (integer)
    List sessions whose ID is smaller than this ID for pagination. Sessions are returned in descending order by ID.

  - `page_size` (integer)
    number of sessions to return

## Response 200 fields (application/json):

  - `sessions` (array)

  - `sessions.id` (string, required)
    session ID
    Example: "123456"

  - `sessions.lastAttempt` (object)
    Attempts of session

  - `sessions.lastAttempt.cancelRequested` (boolean, required)
    true if kill requested

  - `sessions.lastAttempt.createdAt` (string, required)
    created time
    Example: "2023-08-18T06:52:33Z"

  - `sessions.lastAttempt.done` (boolean, required)
    true if the attempt finished

  - `sessions.lastAttempt.finishedAt` (string)
    finished time
    Example: "2023-08-18T06:52:33Z"

  - `sessions.lastAttempt.id` (string, required)
    attempt ID
    Example: "123456"

  - `sessions.lastAttempt.params` (object, required)
    passed parameters as JSON

  - `sessions.lastAttempt.poolId` (string)
    ID of the pool to which this attempt is assigned.
    Example: "42"

  - `sessions.lastAttempt.retryAttemptName` (string)

  - `sessions.lastAttempt.status` (string, required)
    The current status of the attempt.
    Enum: "blocked", "queued", "running", "canceling", "success", "error", "killed"

  - `sessions.lastAttempt.success` (boolean, required)
    true if the attempt finished successfully

  - `sessions.project` (object, required)
    Name and ID

  - `sessions.project.id` (string, required)
    ID
    Example: "123456"

  - `sessions.project.name` (string, required)
    name
    Example: "abcdefg"

  - `sessions.sessionTime` (string, required)
    session time
    Example: "2022-12-31T23:59:00+00:00"

  - `sessions.sessionUuid` (string)

  - `sessions.workflow` (object, required)
    Name and optional ID

  - `sessions.workflow.id` (string)
    ID
    Example: "123456"

  - `sessions.workflow.name` (string, required)
    name
    Example: "abcdefg"


