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

> 获取整个企业的审计日志。

# 获取审计日志

需要企业管理员的个人 API key。


## OpenAPI

````yaml zh/v2-openapi.yaml GET /v2/enterprise/audit-logs
openapi: 3.1.0
info:
  description: 供企业管理员使用的 Devin v2 API（个人 API key）
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/audit-logs:
    get:
      tags:
        - audit-logs
        - audit-logs
      summary: 获取审计日志
      description: 获取当前用户所属组织的审计日志。仅限企业管理员访问。
      operationId: get_audit_logs_v2_enterprise_audit_logs_get
      parameters:
        - in: query
          name: before
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Before
        - in: query
          name: after
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
        - in: query
          name: limit
          required: false
          schema:
            default: 100
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogsResponse'
          description: 成功的响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    AuditLogsResponse:
      description: 包含审计日志的响应。
      properties:
        audit_logs:
          items:
            $ref: '#/components/schemas/AuditLogEntry'
          title: Audit Logs
          type: array
      required:
        - audit_logs
      title: AuditLogsResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AuditLogEntry:
      additionalProperties: true
      description: 审计日志条目。
      properties:
        audit_log_id:
          title: Audit Log Id
          type: string
      required:
        - audit_log_id
      title: AuditLogEntry
      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: 仅供 Enterprise 管理员使用的个人 API Key（apk_user_*）
      scheme: bearer
      type: http

````