Skip to main content
PUT
Index a repository

Permissions

Requires a service user with the IndexOrgRepositories permission at the organization level.

Behavior

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

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Path Parameters

repository_path
string
required
org_id
string
required

Organization ID (prefix: org-)

Example:

"org-abc123def456"

Body

application/json
branch_names
string[]

Response

Successful Response

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