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

> Bulk usage: one row per action, instruction, or knowledge base item with available and applied (used) counts, handoff count, and first/last-used timestamps, most recently used first.

# List usage counts for all resources of a type



## OpenAPI

````yaml get /resource-usage/{resource_type}
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /resource-usage/{resource_type}:
    get:
      summary: List usage counts for all resources of a type
      description: >-
        Bulk usage: one row per action, instruction, or KB item in the org, with
        available / applied (used) counts, the handoff count, and
        first/last-used timestamps — most recently used first. The per-item
        alternative to calling `usage-summary` once per id. Paginated via the
        opaque `cursor`; optionally bound by a date range.
      operationId: listResourceUsage
      parameters:
        - schema: {}
          in: query
          name: from
          required: false
        - schema: {}
          in: query
          name: to
          required: false
        - schema:
            type: string
          in: query
          name: cursor
          required: false
          description: Opaque pagination cursor from a previous `next`
        - schema:
            default: 50
            type: integer
            minimum: 1
            maximum: 250
          in: query
          name: limit
          required: false
        - schema:
            type: string
            enum:
              - action
              - instruction
              - knowledge
          in: path
          name: resource_type
          required: true
          description: >-
            The kind of AI resource to look up: `action` (a tool the AI can
            call), `instruction` (an AI instruction/behavior), or `knowledge` (a
            knowledge base item).
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicResourceUsageListDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    PublicResourceUsageListDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PublicResourceUsageListDto'
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              resource_id:
                type: string
              session_count:
                type: number
                description: >-
                  Distinct conversations that used this resource (usage mirror ∪
                  handoff citations)
              applied_sessions:
                type: number
                description: Distinct conversations where the resource was applied
              applied_replies:
                type: number
                description: Total applications/invocations
              available_sessions:
                type: number
                description: >-
                  Distinct conversations where an instruction was in context
                  (instructions only)
              available_replies:
                type: number
              handoff_count:
                type: number
                description: >-
                  Distinct conversations that handed off while citing this
                  resource (0 for actions)
              first_used_at:
                anyOf:
                  - type: string
                  - type: 'null'
                description: ISO 8601 timestamp of first use
              last_used_at:
                anyOf:
                  - type: string
                  - type: 'null'
                description: ISO 8601 timestamp of most recent use
            required:
              - resource_id
              - session_count
              - applied_sessions
              - applied_replies
              - available_sessions
              - available_replies
              - handoff_count
              - first_used_at
              - last_used_at
            additionalProperties: false
        next:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - items
        - next
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````