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

# List Activity Sessions



## OpenAPI

````yaml /openapi.json get /api/activity/sessions
openapi: 3.1.0
info:
  title: Aixy Gateway API
  version: 0.1.0
  description: >-
    Route requests to configured AI providers through OpenAI- and
    Anthropic-compatible APIs. Aixy applies project access, model policies,
    guardrails, routing, budgets, and usage attribution before forwarding
    inference traffic.
servers:
  - url: https://api.aixy-gateway.com
    description: Aixy production gateway
security: []
tags:
  - name: operations
    description: Check process liveness and traffic readiness.
  - name: authentication
    description: Authenticate trusted server-side clients.
  - name: organizations
    description: Manage the organization and its lifecycle.
  - name: projects
    description: Create projects and manage project membership.
  - name: users
    description: Manage organization users, roles, and invitations.
  - name: teams
    description: Manage teams and team membership.
  - name: api-keys
    description: Manage project-scoped gateway API keys.
  - name: provider-credentials
    description: Manage organization and project provider credentials.
  - name: provider-catalog
    description: Discover providers supported by the gateway.
  - name: provider-models
    description: Discover and control models exposed by configured providers.
  - name: routing
    description: Configure stable model aliases, routing strategies, and fallbacks.
  - name: guardrails
    description: Configure prompt and sensitive-data protection policies.
  - name: identity connections
    description: Configure tenant-scoped enterprise identity federation.
  - name: playground
    description: Exercise configured models through the gateway.
  - name: cost-control
    description: Inspect spend and enforce budgets across tenant scopes.
  - name: metrics
    description: Inspect usage, token, latency, and error metrics.
  - name: activity
    description: Diagnose individual model requests and manage opt-in content capture.
  - name: monitors
    description: Configure operational monitors and notification channels.
  - name: audit
    description: Query, verify, and export the organization audit log.
  - name: telemetry exports
    description: Export telemetry to organization-owned destinations.
  - name: billing
    description: Inspect and manage the organization subscription.
  - name: models
    description: List models available to a project-scoped gateway API key.
  - name: inference
    description: Run model inference through the Aixy data plane.
  - name: pricing
    description: Manage versioned pricing attribution rules.
  - name: system
    description: Discover gateway capabilities and providers.
  - name: MCP beta
    description: Mcp beta operations exposed by the gateway.
  - name: cost-optimization
    description: Cost optimization operations exposed by the gateway.
  - name: custom domains
    description: Custom domains operations exposed by the gateway.
  - name: data processing
    description: Data processing operations exposed by the gateway.
  - name: feature flags
    description: Feature flags operations exposed by the gateway.
  - name: privacy
    description: Privacy operations exposed by the gateway.
  - name: roles
    description: Roles operations exposed by the gateway.
paths:
  /api/activity/sessions:
    get:
      tags:
        - activity
      summary: List Activity Sessions
      operationId: list_activity_sessions
      parameters:
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Limit
        - name: request_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Request Id
        - name: session_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Session Id
        - name: session_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Session Key
        - name: project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Project Id
        - name: team_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Team Id
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: User Id
        - name: api_key_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Api Key Id
        - name: provider
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Provider
        - name: model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Model
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: unattributed_reason
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Unattributed Reason
        - name: starts_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Starts At
        - name: ends_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Ends At
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivitySessionListResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '401':
          description: Authentication is required or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '403':
          description: The authenticated account cannot perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '413':
          description: The request body exceeds the endpoint limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '503':
          description: The control-plane capability is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        4XX:
          description: The request was rejected by validation or authorization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
      security:
        - BrowserSession: []
components:
  schemas:
    ActivitySessionListResponse:
      properties:
        object:
          type: string
          const: list
          title: Object
          default: list
        data:
          items:
            $ref: '#/components/schemas/ActivitySessionResponse'
          type: array
          title: Data
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        period:
          $ref: '#/components/schemas/ActivitySessionPeriodResponse'
        unavailable_sources:
          items:
            type: string
          type: array
          title: Unavailable Sources
          default: []
        tool_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tool Retention Days
      type: object
      required:
        - data
        - next_cursor
        - period
      title: ActivitySessionListResponse
    GatewayErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/GatewayErrorDetail'
      type: object
      required:
        - error
      title: GatewayErrorResponse
    ActivitySessionResponse:
      properties:
        object:
          type: string
          const: activity.session
          title: Object
          default: activity.session
        session_key:
          type: string
          title: Session Key
        session_id:
          type: string
          title: Session Id
        identity:
          $ref: '#/components/schemas/ActivityIdentityResponse'
        first_seen_at:
          type: string
          title: First Seen At
        last_seen_at:
          type: string
          title: Last Seen At
        requests:
          type: integer
          title: Requests
        errors:
          type: integer
          title: Errors
        tokens:
          $ref: '#/components/schemas/ActivityTokensResponse'
        usage_reported_requests:
          type: integer
          title: Usage Reported Requests
        cost:
          $ref: '#/components/schemas/ActivitySessionCostResponse'
        models:
          items:
            type: string
          type: array
          title: Models
        clients:
          items:
            type: string
          type: array
          title: Clients
        mcp_calls:
          type: integer
          title: Mcp Calls
          default: 0
        mcp_errors:
          type: integer
          title: Mcp Errors
          default: 0
        mcp_unknown:
          type: integer
          title: Mcp Unknown
          default: 0
      type: object
      required:
        - session_key
        - session_id
        - identity
        - first_seen_at
        - last_seen_at
        - requests
        - errors
        - tokens
        - usage_reported_requests
        - cost
        - models
        - clients
      title: ActivitySessionResponse
    ActivitySessionPeriodResponse:
      properties:
        starts_at:
          type: string
          title: Starts At
        ends_at:
          type: string
          title: Ends At
      type: object
      required:
        - starts_at
        - ends_at
      title: ActivitySessionPeriodResponse
    GatewayErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
      title: GatewayErrorDetail
    ActivityIdentityResponse:
      properties:
        organization:
          anyOf:
            - $ref: '#/components/schemas/ActivityResourceResponse'
            - type: 'null'
        project:
          anyOf:
            - $ref: '#/components/schemas/ActivityResourceResponse'
            - type: 'null'
        team:
          anyOf:
            - $ref: '#/components/schemas/ActivityResourceResponse'
            - type: 'null'
        api_key:
          anyOf:
            - $ref: '#/components/schemas/ActivityResourceResponse'
            - type: 'null'
        user:
          anyOf:
            - $ref: '#/components/schemas/ActivityUserResourceResponse'
            - type: 'null'
      type: object
      required:
        - organization
        - project
        - team
        - api_key
        - user
      title: ActivityIdentityResponse
    ActivityTokensResponse:
      properties:
        input:
          anyOf:
            - type: integer
            - type: 'null'
          title: Input
        output:
          anyOf:
            - type: integer
            - type: 'null'
          title: Output
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
        uncached_input:
          anyOf:
            - type: integer
            - type: 'null'
          title: Uncached Input
        cached_input:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cached Input
        cache_write_input:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cache Write Input
        reasoning:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reasoning
      type: object
      required:
        - input
        - output
        - total
        - uncached_input
        - cached_input
        - cache_write_input
        - reasoning
      title: ActivityTokensResponse
    ActivitySessionCostResponse:
      properties:
        amount_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Amount Usd
        attributed_requests:
          type: integer
          title: Attributed Requests
        unattributed_requests:
          type: integer
          title: Unattributed Requests
        partial_requests:
          type: integer
          title: Partial Requests
        statuses:
          items:
            type: string
          type: array
          title: Statuses
      type: object
      required:
        - amount_usd
        - attributed_requests
        - unattributed_requests
        - partial_requests
        - statuses
      title: ActivitySessionCostResponse
    ActivityResourceResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - id
        - name
      title: ActivityResourceResponse
    ActivityUserResourceResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - id
        - name
        - email
      title: ActivityUserResourceResponse
  securitySchemes:
    BrowserSession:
      type: apiKey
      description: Secure same-origin browser session cookie.
      in: cookie
      name: gateway_session

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.