Skip to content

Repositories

Repositories represent git repositories connected to IntelliRag. Each repository belongs to a workspace and is identified by its remote URL, which must be unique within a tenant.

{
"id": "r_xxxx",
"workspace_id": "w_xxxx",
"name": "api-server",
"remote_url": "https://github.com/org/api-server",
"default_branch": "main",
"last_indexed_at": "2024-01-01T00:00:00Z",
"index_status": "completed",
"symbol_count": 1234,
"created_at": "2024-01-01T00:00:00Z"
}
Field Type Description
id string Unique repository identifier
workspace_id string ID of the parent workspace
name string Display name of the repository
remote_url string Git remote URL (normalized: trimmed .git suffix, lowercased, SSH converted to HTTPS)
default_branch string Default branch name
last_indexed_at string ISO 8601 timestamp of the last completed index run, or null if never indexed
index_status string Current indexing status: idle, running, completed, or failed
symbol_count integer Total number of symbols extracted from this repository
created_at string ISO 8601 creation timestamp
POST /v1/workspaces/{workspace_id}/repos

Creates a new repository within a workspace. The remote_url is required and must be unique within your tenant.

Parameter Type Description
workspace_id string The workspace ID
{
"name": "api-server",
"remote_url": "https://github.com/org/api-server"
}
Field Type Required Description
name string Yes Display name of the repository
remote_url string Yes Git remote URL. Must be unique per tenant.

Returns 201 Created with the repository object.

Terminal window
curl -X POST https://api.intellirag.io/v1/workspaces/w_xxxx/repos \
-H "Authorization: Bearer rag_xxxx" \
-H "Content-Type: application/json" \
-d '{"name": "api-server", "remote_url": "https://github.com/org/api-server"}'
GET /v1/workspaces/{workspace_id}/repos

Returns a paginated list of repositories in a workspace.

Parameter Type Description
workspace_id string The workspace ID
Parameter Type Default Description
cursor string - Pagination cursor from a previous response
limit integer 50 Number of items per page (max 100)

Returns a paginated list of repository objects.

Terminal window
curl https://api.intellirag.io/v1/workspaces/w_xxxx/repos \
-H "Authorization: Bearer rag_xxxx"
GET /v1/repos/{repo_id}

Returns a single repository by ID.

Parameter Type Description
repo_id string The repository ID

Returns 200 OK with the repository object.

Terminal window
curl https://api.intellirag.io/v1/repos/r_xxxx \
-H "Authorization: Bearer rag_xxxx"
PATCH /v1/repos/{repo_id}

Updates an existing repository. Only include the fields you want to change.

Parameter Type Description
repo_id string The repository ID
Field Type Required Description
name string No New display name

Returns 200 OK with the updated repository object.

Terminal window
curl -X PATCH https://api.intellirag.io/v1/repos/r_xxxx \
-H "Authorization: Bearer rag_xxxx" \
-H "Content-Type: application/json" \
-d '{"name": "new-name"}'
DELETE /v1/repos/{repo_id}

Deletes a repository and all its indexed data across all datastores. This action is irreversible.

Parameter Type Description
repo_id string The repository ID

Returns 204 No Content on success.

Terminal window
curl -X DELETE https://api.intellirag.io/v1/repos/r_xxxx \
-H "Authorization: Bearer rag_xxxx"

These endpoints control the indexing lifecycle for a repository. While the indexer CLI handles indexing automatically, these endpoints let you trigger and monitor index runs programmatically.

GET /v1/repos/{repo_id}/index/status

Returns the current indexing status of a repository.

Parameter Type Description
repo_id string The repository ID

Returns 200 OK with the index status.

Terminal window
curl https://api.intellirag.io/v1/repos/r_xxxx/index/status \
-H "Authorization: Bearer rag_xxxx"
POST /v1/repos/{repo_id}/index/full

Triggers a full reindex of the repository. This re-processes all files regardless of whether they have changed.

Parameter Type Description
repo_id string The repository ID

Returns 202 Accepted.

Terminal window
curl -X POST https://api.intellirag.io/v1/repos/r_xxxx/index/full \
-H "Authorization: Bearer rag_xxxx"
POST /v1/repos/{repo_id}/index/incremental

Triggers an incremental index that only processes files changed since the last index run.

Parameter Type Description
repo_id string The repository ID

Returns 202 Accepted.

Terminal window
curl -X POST https://api.intellirag.io/v1/repos/r_xxxx/index/incremental \
-H "Authorization: Bearer rag_xxxx"
POST /v1/repos/{repo_id}/index/lock

Locks the repository to prevent concurrent index runs. A lock is automatically acquired when an index run starts, but you can also lock manually to prevent any indexing during maintenance windows.

Parameter Type Description
repo_id string The repository ID

Returns 200 OK.

Terminal window
curl -X POST https://api.intellirag.io/v1/repos/r_xxxx/index/lock \
-H "Authorization: Bearer rag_xxxx"
DELETE /v1/repos/{repo_id}/index/lock

Releases the index lock, allowing new index runs to proceed.

Parameter Type Description
repo_id string The repository ID

Returns 204 No Content.

Terminal window
curl -X DELETE https://api.intellirag.io/v1/repos/r_xxxx/index/lock \
-H "Authorization: Bearer rag_xxxx"