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

# List Usage Events

> Return newest persisted facts first, scoped to the current workspace.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/usage/events
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/usage/events:
    get:
      tags:
        - v1
        - protected
        - usage
      summary: List Usage Events
      description: Return newest persisted facts first, scoped to the current workspace.
      operationId: list_usage_events_v1_usage_events_get
      parameters:
        - in: query
          name: source
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Source
        - in: query
          name: kind
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Kind
        - in: query
          name: resource_kind
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Resource Kind
        - in: query
          name: resource_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Resource Id
        - in: query
          name: task_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Task Id
        - in: query
          name: from
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: From
        - in: query
          name: until
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Until
        - in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - pattern: ^[1-9]\d{0,18}$
                type: string
              - type: 'null'
            title: Cursor
        - in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 100
            minimum: 1
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageEventListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    UsageEventListResponse:
      properties:
        events:
          items:
            $ref: '#/components/schemas/UsageEventResponse'
          title: Events
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      required:
        - events
        - next_cursor
      title: UsageEventListResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    UsageEventResponse:
      properties:
        data_json:
          title: Data Json
          type: string
        id:
          title: Id
          type: string
        incarnation_id:
          title: Incarnation Id
          type: string
        kind:
          title: Kind
          type: string
        occurred_at:
          title: Occurred At
          type: string
        received_at:
          title: Received At
          type: string
        resource_id:
          title: Resource Id
          type: string
        resource_kind:
          title: Resource Kind
          type: string
        schema_version:
          title: Schema Version
          type: integer
        sequence:
          title: Sequence
          type: string
        source:
          title: Source
          type: string
        task_id:
          title: Task Id
          type: string
        workspace_id:
          title: Workspace Id
          type: string
      required:
        - sequence
        - id
        - schema_version
        - source
        - kind
        - workspace_id
        - resource_kind
        - resource_id
        - incarnation_id
        - task_id
        - occurred_at
        - received_at
        - data_json
      title: UsageEventResponse
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````