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

# Get Usage Metrics

> Get aggregated usage metrics for the organization.

## Permissions

Requires a service user with the `ViewAccountMetrics` permission at the organization level.


## OpenAPI

````yaml /v3-openapi.yaml GET /v3/organizations/{org_id}/metrics/usage
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/metrics/usage:
    get:
      tags:
        - metrics
      summary: Get Usage Metrics
      description: Get aggregated usage metrics for the organization.
      operationId: handle_get_usage_metrics_v3_organizations__org_id__metrics_usage_get
      parameters:
        - in: query
          name: time_before
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Time Before
        - in: query
          name: time_after
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageMetrics'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    UsageMetrics:
      properties:
        prs_created_count:
          title: Prs Created Count
          type: integer
        prs_merged_count:
          title: Prs Merged Count
          type: integer
        searches_count:
          title: Searches Count
          type: integer
        sessions_count:
          title: Sessions Count
          type: integer
      required:
        - sessions_count
        - searches_count
        - prs_created_count
        - prs_merged_count
      title: UsageMetrics
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        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:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````