Skip to main content
PUT
Bulk index repositories

Permissions

Requires a service user or personal access token. The permission check depends on how repository access is managed for your organization:
  • Organization-level permissions: the caller needs the IndexOrgRepositories permission at the organization level.
  • Granular repository grants: IndexOrgRepositories is not checked. The caller needs the Read permission at the organization level, plus both the repo.use_read and repo.index grants on every repository in the request. If any repository is missing either grant, the entire request is rejected with 403 and no repositories are indexed.

Behavior

This endpoint is idempotent — calling it multiple times with the same repositories will not create duplicate indexing jobs. It enables indexing and triggers indexing jobs for each repository in the request. You can optionally specify branch_names for each repository to index specific branches. If omitted, the default branch is used.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Path Parameters

org_id
string
required

Organization ID (prefix: org-)

Example:

"org-abc123def456"

Body

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

Response

Successful Response

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