> ## 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.

# 获取搜索指标

> 获取 Enterprise 账户的搜索指标汇总。

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

需要一个在企业级别具有 `ViewAccountMetrics` 权限的服务用户。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/enterprise/metrics/searches
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/searches:
    get:
      tags:
        - metrics
      summary: 获取搜索指标
      description: 获取 Enterprise 账户的搜索指标汇总。
      operationId: handle_get_search_metrics_v3_enterprise_metrics_searches_get
      parameters:
        - in: query
          name: time_before
          required: true
          schema:
            title: Time Before
            type: integer
        - in: query
          name: time_after
          required: true
          schema:
            title: Time After
            type: integer
        - in: query
          name: org_ids
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchMetricsResponse'
          description: 成功响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    SearchMetricsResponse:
      description: 用于搜索指标的响应模型。
      properties:
        searches_created_count:
          title: Searches Created Count
          type: integer
      required:
        - searches_created_count
      title: SearchMetricsResponse
      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

````