跳转到主要内容
POST
/
api_keys
/
usage
/
breakdown
按密钥和端点获取 API 使用情况明细
curl --request POST \
  --url https://api.pubrio.com/api_keys/usage/breakdown \
  --header 'Content-Type: application/json' \
  --header 'pubrio-api-key: <api-key>' \
  --data '
{
  "start_date": "2026-05-01",
  "end_date": "2026-05-14",
  "profile_id": 123,
  "keys": [
    "<string>"
  ],
  "log_type_slugs": [
    "<string>"
  ]
}
'
{
  "metadata": {
    "filters": {
      "start_date": "2026-04-01",
      "end_date": "2026-05-14"
    }
  },
  "data": {
    "by_key": [
      {
        "name": "2••••••••••••••••a37",
        "requests": 929,
        "credits": 42766,
        "last_used": "2026-05-05 11:09:42.508",
        "percent_of_requests": 17.892,
        "percent_of_credits": 99.425
      },
      {
        "name": "0••••••••••••••••f39",
        "requests": 175,
        "credits": 187,
        "last_used": "2026-05-14 12:04:21.651",
        "percent_of_requests": 3.37,
        "percent_of_credits": 0.434
      }
    ],
    "by_endpoint": [
      {
        "slug": "people_redeem",
        "name": "Redeem People",
        "requests": 4088,
        "credits": 41215,
        "cost_per_call": 10.08,
        "percent_of_requests": 78.73,
        "percent_of_credits": 95.82
      },
      {
        "slug": "people_search",
        "name": "People Search",
        "requests": 368,
        "credits": 1101,
        "cost_per_call": 2.99,
        "percent_of_requests": 7.08,
        "percent_of_credits": 2.55
      }
    ],
    "totals": {
      "credits": 43013,
      "requests": 5192
    }
  }
}

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.

授权

pubrio-api-key
string
header
必填

一个唯一的 API 令牌,用于标识您通过 API 执行的操作以及相应的权限和操作。您可以在 设置 部分创建该令牌。

请求体

application/json
start_date
string
必填

日期范围起始日,格式为 YYYY-MM-DD,使用工作区时区。

示例:

"2026-05-01"

end_date
string
必填

日期范围结束日,格式为 YYYY-MM-DD,使用工作区时区。

示例:

"2026-05-14"

profile_id
integer

可选。发起请求的团队标识符。由于 API 密钥已包含您的工作区信息,此参数不再是必填项。如果提供,该 ID 有助于将查找与特定团队(工作区)关联,实现数据检索和额度追踪。

更多信息请参见团队标签下的 user details 端点。

keys
string[]

可选。按掩码 API 密钥标识符(如 0••••••••••••••••f39)筛选结果,可使用 /api_keys 接口或日志条目中 masked_authentication 字段的值。

log_type_slugs
string[]

可选。按日志类型 slug(如 people_searchcompany_searchpeople_redeem)筛选结果,将范围限定为指定的端点。

响应

成功响应,返回 API 使用情况明细。

metadata
object
data
object