> ## 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 每日活跃用户

> 获取指定时间范围内每天的日活跃用户数。

如果某位用户在某个 UTC 日内创建的会话数至少为 min_sessions 次，或搜索次数至少为 min_searches 次，则被视为该日的活跃用户。

返回一个按天统计的日活跃用户数量列表，时间范围内的每一天对应一条记录。

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

需要在 Enterprise 层级拥有 `ViewAccountMetrics` 权限的服务用户。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/enterprise/metrics/dau
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/dau:
    get:
      tags:
        - metrics
      summary: GET 每日活跃用户
      description: >-
        获取指定时间范围内每天的日活跃用户数。


        如果某位用户在某个 UTC 日内创建的会话数至少为 min_sessions 次，或搜索次数至少为 min_searches
        次，则被视为该日的活跃用户。


        返回一个按天统计的日活跃用户数量列表，时间范围内的每一天对应一条记录。
      operationId: handle_get_dau_metrics_v3_enterprise_metrics_dau_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
        - in: query
          name: min_sessions
          required: false
          schema:
            default: 1
            minimum: 0
            title: Min Sessions
            type: integer
        - in: query
          name: min_searches
          required: false
          schema:
            default: 1
            minimum: 0
            title: Min Searches
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: 成功响应
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未找到
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 冲突
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 内容无法处理
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 请求过于频繁
components:
  schemas:
    ActiveUserMetricsListResponse:
      description: 已验证的活跃用户指标列表，按升序排序且各时间区间互不重叠。
      items:
        $ref: '#/components/schemas/ActiveUserMetricsResponse'
      title: ActiveUserMetricsListResponse
      type: array
    ProblemDetail:
      description: >-
        v3 API 的 RFC 9457 application/problem+json 错误响应体。


        detail 沿用自旧版 {"detail": ...} 响应体，以保持向后兼容；其他成员字段为新增字段。errors
        包含字段级验证失败信息（仅 422）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: 针对此次具体情况的、便于人理解的说明。
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: 字段级验证错误（仅适用于 422 响应）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: 此次出现对应的 URI 引用（请求路径）。
          title: Instance
        status:
          description: HTTP 状态码。
          title: Status
          type: integer
        title:
          description: 对问题类型的简短、便于理解的概述。
          title: Title
          type: string
        type:
          default: about:blank
          description: 用于标识问题类型的 URI 引用。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    ActiveUserMetricsResponse:
      description: 活跃用户数量随时间变化的单条记录。
      properties:
        active_users:
          title: Active Users
          type: integer
        end_time:
          title: End Time
          type: integer
        start_time:
          title: Start Time
          type: integer
      required:
        - start_time
        - end_time
        - active_users
      title: ActiveUserMetricsResponse
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````