> ## Documentation Index
> Fetch the complete documentation index at: https://docs.albus.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# List all sessions



## OpenAPI

````yaml /openapi/openapi.yaml get /sessions
openapi: 3.0.3
info:
  title: Albus API
  description: Albus service REST API
  version: 1.0.0
servers:
  - url: https://albus.sh/api
    description: Production server
  - url: http://localhost:8080
    description: Local development server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Auth
    description: Identify the authenticated user.
  - name: Health
    description: Check service availability.
  - name: Secrets
    description: Manage secrets available to agent sessions.
  - name: Sessions
    description: Run and inspect agent sessions.
  - name: Tokens
    description: Manage organization API keys.
paths:
  /sessions:
    get:
      tags:
        - Sessions
      summary: List all sessions
      operationId: listSessions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSessionsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrUnauthorized'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    ListSessionsResponse:
      type: object
      required:
        - sessions
      properties:
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/Session'
    ErrUnauthorized:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human-readable error message
          example: Invalid or expired token
    Session:
      type: object
      required:
        - id
        - state
        - invocation_count
        - created_at
        - updated_at
      properties:
        id:
          type: string
          minLength: 2
          maxLength: 100
          pattern: ^[0-9a-zA-Z._:-]+$
          description: Client-provided session identifier.
        state:
          type: string
          enum:
            - RUNNING
            - DONE
            - FAILED
            - CANCELED
          description: Lifecycle state of the session.
        current_invocation_id:
          type: string
          description: >
            The invocation currently running, if any. Omitted when the session
            is idle.
        invocation_count:
          type: integer
          format: int64
          description: Number of times this session has been run.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: http
      scheme: bearer
      description: Org-scoped API key issued via POST /tokens

````