取得聊天專案用量
GET/v1/organizations/analytics/apps/chat/projects
取得指定日期的每個專案活動,並支援以游標為基礎的分頁。
傳回組織中每個專案的活動指標,依
專案 ID 排序。使用 group_by[] 依成員或 RBAC
群組細分專案,並使用 filter[] 限定結果;參數說明列出了
支援的維度。適用於採用 Claude Enterprise
方案的組織。需要具有 read:analytics 範圍的 API 金鑰。
Parameters
Returns
取得聊天專案用量
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
page = client.beta.organization.analytics.apps.chat.projects.list()
page = page.data[0]
print(page.project_id)Response 200
{
"data": [
{
"distinct_user_count": 0,
"message_count": 0,
"project_id": "project_id",
"project_name": "project_name",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"email_address": "email_address",
"type": "user"
},
"distinct_conversation_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"distinct_user_count": 0,
"message_count": 0,
"project_id": "project_id",
"project_name": "project_name",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"email_address": "email_address",
"type": "user"
},
"distinct_conversation_count": 0,
"product": "product",
"rbac_group_id": "rbac_group_id",
"rbac_group_name": "rbac_group_name",
"user_id": "user_id"
}
],
"next_page": "next_page"
}