跳转到主要内容
GET
/
v3
/
enterprise
/
code-scans
/
findings
列出代码扫描发现项
curl --request GET \
  --url https://api.devin.ai/v3/enterprise/code-scans/findings \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "category": "<string>",
      "code_owners": [
        "<string>"
      ],
      "created_at": 123,
      "description": "<string>",
      "finding_id": "<string>",
      "note": "<string>",
      "orchestrator_session_id": "<string>",
      "pr_url": "<string>",
      "recommendation": "<string>",
      "reference_snippets": [
        {
          "commentary": "<string>",
          "end_line": 123,
          "file_path": "<string>",
          "start_line": 123,
          "code": "<string>"
        }
      ],
      "repo_name": "<string>",
      "scan_id": "<string>",
      "session_id": "<string>",
      "title": "<string>"
    }
  ],
  "end_cursor": "<string>",
  "has_next_page": false,
  "total": 123
}

权限

需要一个在企业级别具有 ViewAccountCodeScans 权限的服务用户。

授权

Authorization
string
header
必填

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

查询参数

after
string | null
first
integer
默认值:100
必填范围: 1 <= x <= 200
org_ids
string[] | null

筛选这些组织中的发现项。

scan_id
string | null

筛选由此次扫描产生的发现项。

repo_name
string | null

筛选在此代码仓库中报告的发现项。

severity
enum<string>[] | null

筛选严重程度为以下任一值的发现项(critical、high、medium、low)。

可用选项:
critical,
high,
medium,
low
status
enum<string>[] | null

筛选状态为以下任一值的发现项(open、已忽略、解析)。

可用选项:
open,
dismissed,
resolved

响应

成功响应

items
CodeScanFindingResponse · object[]
必填
end_cursor
string | null

用于获取下一页的游标;如果这是最后一页,则为 None。

has_next_page
boolean
默认值:false

此页之后是否还有更多条目。

total
integer | null

可选的总数(出于性能考虑可省略)。