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

# GET 利用状況メトリクス

> Enterprise アカウントの利用状況指標の集計データを取得します。

指定した期間内のセッション数、検索数、PR（オープン、クローズ、マージ）の件数を返します。

<div id="permissions">
  ## 権限
</div>

Enterprise レベルで `ViewAccountMetrics` 権限を持つサービス ユーザーが必要です。


## OpenAPI

````yaml ja/v3-openapi.yaml GET /v3/enterprise/metrics/usage
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/metrics/usage:
    get:
      tags:
        - metrics
      summary: GET 利用状況メトリクス
      description: |-
        Enterprise アカウントの利用状況指標の集計データを取得します。

        指定した期間内のセッション数、検索数、PR（オープン、クローズ、マージ）の件数を返します。
      operationId: handle_get_usage_metrics_v3_enterprise_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: 正常なレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 検証エラー
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: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````