跳转到主要内容
GET
/
v3
/
enterprise
/
metrics
/
sessions
获取会话指标
curl --request GET \
  --url https://api.devin.ai/v3/enterprise/metrics/sessions \
  --header 'Authorization: Bearer <token>'
{
  "avg_acus_per_session": 123,
  "sessions_created_by_origin": {
    "api": 0,
    "automation": 0,
    "desktop": 0,
    "jira": 0,
    "linear": 0,
    "slack": 0,
    "teams": 0,
    "webapp": 0
  },
  "sessions_created_by_size": {
    "l": 0,
    "m": 0,
    "s": 0,
    "xl": 0,
    "xs": 0
  },
  "sessions_created_count": 123,
  "sessions_created_with_playbook_count": 123,
  "sessions_created_with_search_count": 123,
  "sessions_with_merged_prs_by_size": {
    "l": 0,
    "m": 0,
    "s": 0,
    "xl": 0,
    "xs": 0
  },
  "sessions_with_merged_prs_count": 123
}

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.

权限

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

授权

Authorization
string
header
必填

服务用户凭据(前缀:cog_)

查询参数

user_ids
string[] | null
service_user_ids
string[] | null
time_before
integer
必填
time_after
integer
必填
org_ids
string[] | null
playbook_id
string | null

响应

成功响应

用于会话指标的响应模型。

avg_acus_per_session
number
必填
sessions_created_by_origin
SessionCountsByOrigin · object
必填

按来源类型划分的会话数量,在 v3 metrics API 中提供。

这是 SessionOrigin 中经过筛选的一个子集:旧版来源(cli、 vscode_extension、devin_spaces)会被有意隐藏,不对外提供; 此外,scheduled 被归入 automation,因为后者是一个更大的集合, 未来计划功能将迁移到其中。

sessions_created_by_size
SessionCountsBySize · object
必填

按规模分类的会话数量。

sessions_created_count
integer
必填
sessions_created_with_playbook_count
integer
必填
sessions_created_with_search_count
integer
必填
sessions_with_merged_prs_by_size
SessionCountsBySize · object
必填

按规模分类的会话数量。

sessions_with_merged_prs_count
integer
必填