Workspaces
Workspaces are logical groupings of repositories. Use them to organize repositories by team, product, or service area.
The workspace object
Section titled “The workspace object”{ "id": "w_xxxx", "name": "Backend Services", "description": "Core backend microservices", "repo_count": 5, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z"}| Field | Type | Description |
|---|---|---|
id |
string | Unique workspace identifier |
name |
string | Display name of the workspace |
description |
string | Optional description |
repo_count |
integer | Number of repositories in the workspace |
created_at |
string | ISO 8601 creation timestamp |
updated_at |
string | ISO 8601 last-updated timestamp |
Create a workspace
Section titled “Create a workspace”POST /v1/workspacesCreates a new workspace within your tenant.
Request body
Section titled “Request body”{ "name": "Backend Services", "description": "Core backend microservices"}| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Display name of the workspace |
description |
string | No | Optional description |
Response
Section titled “Response”Returns 201 Created with the workspace object.
curl -X POST https://api.intellirag.io/v1/workspaces \ -H "Authorization: Bearer rag_xxxx" \ -H "Content-Type: application/json" \ -d '{"name": "Backend Services", "description": "Core backend microservices"}'List workspaces
Section titled “List workspaces”GET /v1/workspacesReturns a paginated list of workspaces in your tenant.
Query parameters
Section titled “Query parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
cursor |
string | - | Pagination cursor from a previous response |
limit |
integer | 50 | Number of items per page (max 100) |
Response
Section titled “Response”{ "items": [ { "id": "w_xxxx", "name": "Backend Services", "description": "Core backend microservices", "repo_count": 5, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ], "next_cursor": "eyJ...", "has_more": true}curl https://api.intellirag.io/v1/workspaces?limit=10 \ -H "Authorization: Bearer rag_xxxx"Get a workspace
Section titled “Get a workspace”GET /v1/workspaces/{workspace_id}Returns a single workspace by ID.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
workspace_id |
string | The workspace ID |
Response
Section titled “Response”Returns 200 OK with the workspace object.
curl https://api.intellirag.io/v1/workspaces/w_xxxx \ -H "Authorization: Bearer rag_xxxx"Update a workspace
Section titled “Update a workspace”PATCH /v1/workspaces/{workspace_id}Updates an existing workspace. Only include the fields you want to change.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
workspace_id |
string | The workspace ID |
Request body
Section titled “Request body”{ "name": "Updated Name"}| Field | Type | Required | Description |
|---|---|---|---|
name |
string | No | New display name |
description |
string | No | New description |
Response
Section titled “Response”Returns 200 OK with the updated workspace object.
curl -X PATCH https://api.intellirag.io/v1/workspaces/w_xxxx \ -H "Authorization: Bearer rag_xxxx" \ -H "Content-Type: application/json" \ -d '{"name": "Updated Name"}'Delete a workspace
Section titled “Delete a workspace”DELETE /v1/workspaces/{workspace_id}Deletes a workspace and all repositories and indexed data within it. This action is irreversible.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
workspace_id |
string | The workspace ID |
Response
Section titled “Response”Returns 204 No Content on success.
curl -X DELETE https://api.intellirag.io/v1/workspaces/w_xxxx \ -H "Authorization: Bearer rag_xxxx"