Skip to main content
PUT
批量索引代码仓库

权限

需要具有组织级别 IndexOrgRepositories 权限的服务用户。

行为

此端点具有幂等性——使用相同的代码仓库多次调用它,不会创建重复的索引作业。它会为请求中的每个代码仓库启用索引,并触发相应的索引作业。 你也可以选择为每个代码仓库指定 branch_names,以索引特定分支。若省略,则使用默认分支。

授权

Authorization
string
header
必填

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

路径参数

org_id
string
必填

组织 ID(前缀:org-)

示例:

"org-abc123def456"

请求体

application/json
repositories
RepositoryIndexingItem · object[]
必填
Required array length: 1 - 100 elements

响应

成功响应

branches
string[]
必填
indexing_enabled
boolean
必填
repository_path
string
必填
indexing_status
RepoIndexingStatusResponse · object | null