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

# API 请求日志列表

> 获取当前工作区的 API 请求日志分页列表。每条记录对应一次使用 `pubrio-api-key` 调用的请求，包含路径、方法、状态码、耗时、响应大小和消耗的积分。如需查看某条日志的完整请求和响应内容，请使用 [日志详情查询](/cn/api-reference/endpoint/api-keys/logs_lookup) 接口。



## OpenAPI

````yaml cn-openapi POST /api_keys/logs
openapi: 3.0.0
info:
  description: Pubrio API 用于搜索、预览和增强联系人及账户信息。Pubrio 数据库提供丰富的 B2B 联系人和销售情报数据。
  version: 1.0.0
  title: Pubrio OpenAPI
  termsOfService: https://pubrio.com/zh-CN/terms-of-service
  contact:
    email: king.lai@pubrio.com
    name: King Lai
    url: https://pubrio.com/zh-CN/get-in-touch
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.pubrio.com
security:
  - pubrio_api_key: []
tags:
  - name: Profile
    description: 工作区配置信息和使用统计
  - name: Enrichment
    description: 通过详细的 B2B 数据丰富人员和公司记录
  - name: Lookalike
    description: 查找与指定公司相似的公司
  - name: Search
    description: 使用筛选条件搜索人员、公司、职位、新闻和广告
  - name: Lookup
    description: 查找特定人员、公司、职位、新闻、广告和技术的详细信息
  - name: LinkedIn
    description: 通过 LinkedIn 个人资料 URL 查找人员和公司数据
  - name: Redeem
    description: 兑换积分以解锁人员联系方式（单个和批量）
  - name: Channels
    description: 管理外展渠道模板（创建、更新、删除、列表）
  - name: Monitor
    description: 创建和管理数据监控，包括 Webhook、统计和处理
  - name: Filters
    description: 获取搜索参数的可用筛选值（技术、地点、垂直领域等）
  - name: API Keys
    description: 查看 API 密钥的请求日志和使用情况分析
externalDocs:
  description: Pubrio API 用于搜索、预览和增强联系人及账户信息。Pubrio 数据库提供丰富的 B2B 联系人和销售情报数据。
  url: https://docs.pubrio.com
paths:
  /api_keys/logs:
    post:
      tags:
        - API Keys
      summary: 获取 API 请求日志列表
      description: >-
        获取当前工作区的 API 请求日志分页列表。每条记录对应一次使用 `pubrio-api-key`
        调用的请求，包含路径、方法、状态码、耗时、响应大小和消耗的积分。如需查看某条日志的完整请求和响应内容，请使用
        [日志详情查询](/cn/api-reference/endpoint/api-keys/logs_lookup) 接口。
      operationId: api_keys_get_logs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                profile_id:
                  $ref: '#/components/schemas/profile_id'
                page:
                  $ref: '#/components/schemas/page'
                per_page:
                  $ref: '#/components/schemas/per_page'
                order_by:
                  type: string
                  enum:
                    - created_at
                    - duration_ms
                    - status_code
                  default: created_at
                  description: 日志列表的排序字段。
                is_ascending_order:
                  type: boolean
                  default: false
                  description: 排序方向。`true` 为升序，`false`（默认）为降序。
                search_term:
                  type: string
                  description: 全文搜索，匹配请求路径、日志类型 slug 以及原始请求体内容。
                log_types:
                  type: array
                  items:
                    type: integer
                  description: 按日志类型 ID 筛选。
                log_type_slugs:
                  type: array
                  items:
                    type: string
                  description: 按日志类型 slug 筛选（如 `people_search`、`company_search`）。
                status_codes:
                  type: array
                  items:
                    type: integer
                  description: 按 HTTP 状态码筛选（如 `[200, 400, 500]`）。
                methods:
                  type: array
                  items:
                    type: string
                  description: 按 HTTP 方法筛选（如 `["POST", "GET"]`）。
      responses:
        '200':
          description: 成功响应，返回分页的 API 请求日志。
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: object
                    properties:
                      filters:
                        type: object
                        description: 本次响应所使用请求过滤条件的回显，已剔除空值。
                        additionalProperties: true
                  data:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          page:
                            type: integer
                            description: 当前页码。
                          per_page:
                            type: integer
                            description: 每页结果数。
                          total_entries:
                            type: integer
                            description: 日志条目总数。
                          total_pages:
                            type: integer
                            description: 总页数。
                          total_display_pages:
                            type: integer
                            description: 当前订阅可显示的最大页数。
                          is_timeout:
                            type: boolean
                            description: 总数查询是否超时。
                      query_logs:
                        type: array
                        items:
                          type: object
                          properties:
                            query_log_id:
                              type: string
                              format: uuid
                              description: 日志条目唯一标识符，传入 `/api_keys/logs/lookup` 可获取完整内容。
                            created_at:
                              type: string
                              description: 请求接收时间（UTC）。
                            profile_id:
                              type: integer
                              description: 请求关联的工作区配置 ID。
                            user_id:
                              type: string
                              format: uuid
                              description: API 密钥所属用户的 ID。
                            method:
                              type: string
                              description: 请求的 HTTP 方法。
                            path:
                              type: string
                              description: 请求路径。
                            status_code:
                              type: integer
                              description: 返回的 HTTP 状态码。
                            duration_ms:
                              type: integer
                              description: 请求处理耗时（毫秒）。
                            log_type_id:
                              type: integer
                              description: 内部日志类型 ID。如果请求未对应到计费日志类型则为 `0`。
                            log_type_slug:
                              type: string
                              nullable: true
                              description: 日志类型 slug（如 `people_search`），未计费请求为 `null`。
                            log_type_name:
                              type: string
                              nullable: true
                              description: 可读的日志类型名称。
                            authentication_type:
                              type: string
                              description: 使用的认证方式。API 密钥请求始终为 `pubrio-api-key`。
                            authentication_type_name:
                              type: string
                              description: 可读的认证方式名称。
                            masked_authentication:
                              type: string
                              description: 本次请求所用 API 密钥的掩码表示。
                            response_size:
                              type: integer
                              description: 响应体大小（字节）。
                            credits:
                              type: number
                              description: 本次请求扣除的总积分。
                            ip:
                              type: string
                              description: 调用方的客户端 IP 地址。
                            email:
                              type: string
                              description: API 密钥所属用户的邮箱。
                            nickname:
                              type: string
                              description: API 密钥所属用户的昵称。
                            user:
                              type: object
                              properties:
                                user_id:
                                  type: string
                                  format: uuid
                                nickname:
                                  type: string
                                email:
                                  type: string
              example:
                metadata:
                  filters:
                    page: 1
                    per_page: 3
                    status_codes:
                      - 200
                data:
                  pagination:
                    page: 1
                    per_page: 3
                    total_entries: 1109
                    total_pages: 370
                    total_display_pages: 250
                    is_timeout: false
                  query_logs:
                    - query_log_id: fc1ce3dd-39f7-4fbd-9d22-569a17115c11
                      created_at: '2026-05-14 12:04:32.243'
                      profile_id: 1
                      user_id: 2981d4b3-f8b1-44d8-9759-889f3bfa2faf
                      method: POST
                      path: /api_keys/usage/daily
                      status_code: 200
                      duration_ms: 1821
                      log_type_id: 0
                      authentication_type: pubrio-api-key
                      masked_authentication: 0••••••••••••••••f39
                      response_size: 2180
                      ip: 127.0.0.1
                      email: you@example.com
                      nickname: Example User
                      user:
                        user_id: 2981d4b3-f8b1-44d8-9759-889f3bfa2faf
                        nickname: Example User
                        email: you@example.com
                      log_type_slug: null
                      credits: 0
                      log_type_name: null
                      authentication_type_name: API Key
        '400':
          $ref: '#/components/responses/general_error'
        '429':
          $ref: '#/components/responses/rate_limit_error'
        '500':
          $ref: '#/components/responses/server_error'
components:
  schemas:
    profile_id:
      type: integer
      description: >-
        可选。发起请求的团队标识符。由于 API 密钥已包含您的工作区信息，此参数不再是必填项。如果提供，该 ID
        有助于将查找与特定团队（工作区）关联，实现数据检索和额度追踪。


        更多信息请参见团队标签下的 `user details` 端点。
    page:
      type: integer
      example: 1
      description: 要检索的数据页码。
    per_page:
      type: integer
      example: 25
      description: 每页应返回的搜索结果数量。限制每页结果数量可提升接口性能。
  responses:
    general_error:
      description: 请求错误。请求格式不正确或包含无效参数。请检查错误代码和消息以获取详细信息。
      content:
        application/json:
          schema:
            required:
              - code
              - message
              - details
            type: object
            properties:
              code:
                example: 40001
                type: integer
              message:
                example: 错误及代码会根据不同场景有所不同，详情请参阅文档。
                type: string
              details:
                type: object
    rate_limit_error:
      description: 超出速率限制。在给定时间段内发送了过多请求。请在速率限制窗口重置后重试。
      content:
        application/json:
          schema:
            required:
              - error
            type: object
            properties:
              error:
                example: 请求频率超出限制。请稍后再试。
                type: string
    server_error:
      description: 内部服务器错误。服务器发生意外错误。如果错误持续存在，请联系支持团队。
      content:
        application/json:
          schema:
            required:
              - error
            type: object
            properties:
              error:
                example: 服务器在处理请求时遇到了未预料的异常。
                type: string
  securitySchemes:
    pubrio_api_key:
      type: apiKey
      name: pubrio-api-key
      description: >-
        一个唯一的 API 令牌，用于标识您通过 API 执行的操作以及相应的权限和操作。您可以在
        [设置](https://dashboard.pubrio.com/#/settings/) 部分创建该令牌。
      in: header

````