跳转到主要内容
GET
/
v2
/
enterprise
/
organizations
/
{org_id}
/
sessions
/
insights
curl -X GET "https://api.devin.ai/v2/enterprise/organizations/org_789/sessions/insights?limit=10&skip=0" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "items": [
    {
      "session_id": "xyz789",
      "url": "https://app.devin.ai/sessions/xyz789",
      "status": "exit",
      "title": "Implement new feature",
      "tags": ["feature", "enhancement"],
      "user_id": "user_123",
      "org_id": "org_789",
      "created_at": "2024-01-20T14:00:00Z",
      "updated_at": "2024-01-20T16:30:00Z",
      "acus_consumed": 32.1,
      "pull_requests": [
        {
          "pr_url": "https://github.com/example/repo/pull/789",
          "pr_state": "merged",
          "state": "merged"
        }
      ],
      "session_analysis": {
        "issues": [
          {
            "issue": "Test coverage below threshold",
            "impact": "Medium",
            "label": "Testing"
          }
        ],
        "timeline": [
          {
            "title": "Feature implementation started",
            "description": "Devin began implementing the new user dashboard feature"
          },
          {
            "title": "Tests written",
            "description": "Unit and integration tests added for the new feature"
          },
          {
            "title": "Pull request created",
            "description": "PR opened for review with comprehensive documentation"
          }
        ],
        "action_items": [
          {
            "issue_id": "issue_2",
            "type": "repo_config",
            "action_item": "Increase test coverage threshold in CI configuration"
          }
        ],
        "suggested_prompt": {
          "original_prompt": "Add a new dashboard",
          "suggested_prompt": "Implement a user dashboard feature that displays session history, ACU consumption metrics, and recent pull requests. Include unit tests and update the navigation menu.",
          "feedback_items": [
            {
              "issue_id": "issue_2",
              "summary": "Missing test requirements",
              "excerpt": "Add a new dashboard",
              "details": "The prompt should explicitly request test coverage for new features"
            }
          ]
        }
      },
      "initial_user_message": "Please add a new dashboard to show user activity"
    }
  ],
  "total": 45,
  "skip": 0,
  "limit": 10,
  "has_more": true,
  "next_cursor": 10
}
返回企业中某个特定组织的所有 Devin 会话的分页列表,包括完整的会话分析、初始用户消息、拉取请求信息以及 ACU 消耗数据。与基础版的 列出组织会话 接口相比,此端点提供更加详尽的信息。

路径参数

org_id
string
required
组织的唯一标识符

查询参数

skip
integer
default:"0"
分页时要跳过的项目数量(最小值:0)
limit
integer
default:"100"
要返回的最大项目数量(最小值:1,最大值:200)
created_date_from
string
筛选在此日期之后创建的会话(ISO 8601 格式)
created_date_to
string
筛选在此日期之前创建的会话(ISO 8601 格式)
updated_date_from
string
筛选在此日期之后更新的会话(ISO 8601 格式)
updated_date_to
string
筛选在此日期之前更新的会话(ISO 8601 格式)
user_ids
array
按用户 ID 筛选会话(字符串数组)
session_ids
array
按特定 Devin 会话 ID 筛选会话(字符串数组)
tags
array
按标签筛选会话(字符串数组)
order
string
default:"desc"
按创建日期对结果进行排序的方式。可选值:“asc” 或 “desc”

响应

项目
array
required
会话详情对象数组
total
integer
required
该组织可用的会话总数
skip
integer
required
已跳过的条目数量
limit
integer
required
每页的最大条目数
has_more
boolean
required
是否还有更多条目
next_cursor
integer
下一页的游标(如适用)
curl -X GET "https://api.devin.ai/v2/enterprise/organizations/org_789/sessions/insights?limit=10&skip=0" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "items": [
    {
      "session_id": "xyz789",
      "url": "https://app.devin.ai/sessions/xyz789",
      "status": "exit",
      "title": "Implement new feature",
      "tags": ["feature", "enhancement"],
      "user_id": "user_123",
      "org_id": "org_789",
      "created_at": "2024-01-20T14:00:00Z",
      "updated_at": "2024-01-20T16:30:00Z",
      "acus_consumed": 32.1,
      "pull_requests": [
        {
          "pr_url": "https://github.com/example/repo/pull/789",
          "pr_state": "merged",
          "state": "merged"
        }
      ],
      "session_analysis": {
        "issues": [
          {
            "issue": "Test coverage below threshold",
            "impact": "Medium",
            "label": "Testing"
          }
        ],
        "timeline": [
          {
            "title": "Feature implementation started",
            "description": "Devin began implementing the new user dashboard feature"
          },
          {
            "title": "Tests written",
            "description": "Unit and integration tests added for the new feature"
          },
          {
            "title": "Pull request created",
            "description": "PR opened for review with comprehensive documentation"
          }
        ],
        "action_items": [
          {
            "issue_id": "issue_2",
            "type": "repo_config",
            "action_item": "Increase test coverage threshold in CI configuration"
          }
        ],
        "suggested_prompt": {
          "original_prompt": "Add a new dashboard",
          "suggested_prompt": "Implement a user dashboard feature that displays session history, ACU consumption metrics, and recent pull requests. Include unit tests and update the navigation menu.",
          "feedback_items": [
            {
              "issue_id": "issue_2",
              "summary": "Missing test requirements",
              "excerpt": "Add a new dashboard",
              "details": "The prompt should explicitly request test coverage for new features"
            }
          ]
        }
      },
      "initial_user_message": "Please add a new dashboard to show user activity"
    }
  ],
  "total": 45,
  "skip": 0,
  "limit": 10,
  "has_more": true,
  "next_cursor": 10
}