API

Repo

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{org_slug}/repos list Paginated workspace Repo inventory
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/pages/access load Repository access page contract
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/pages/sync load Git source availability and refresh capability
DELETE /api/v1/organizations/{org_slug}/repos/{repo_slug} remove Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

repos, err := client.Repo(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(repos)
removed, err := client.Repo(nil).Remove(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local repos, err = client:Repo():list({ organization_id = "example" })
local removed, err = client:Repo():remove({ id = "example_id", organization_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$repos = $client->Repo()->list(["organization_id" => "example"]);
$client->Repo()->remove(["id" => "example_id", "organization_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

repos = client.Repo().list({"organization_id": "example"})
client.Repo().remove({"id": "example_id", "organization_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

repos = client.Repo.list({ "organization_id" => "example" })
client.Repo.remove({ "id" => "example_id", "organization_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const repos = await client.Repo().list({ organization_id: "example" })
await client.Repo().remove({ id: "example_id", organization_id: "example" })

Fields

Field Type Required Description
can_retry_import boolean Yes True when a failed client import can be requeued for CLI resume.
can_retry_sync boolean Yes True when the latest sync run failed and can be retried.
disclaimer one,string,null Yes Disclaimer
federated_in_home boolean Yes True when this Space is a folder virtual repository inside the organization Home monorepo.
github_repository one,string,null Yes Github Repository
icon_name string Yes Icon Name
id string Yes Virtual repository public ID for non-Home rows; Home uses the physical repository public ID.
import_item_id one,string,null Yes Import Item Id
is_home boolean Yes Is Home
name string Yes Name
remote_repository one,string,null No Remote Repository
root_path one,string,null Yes Home-relative folder path when federated_in_home is true; null otherwise.
slug string Yes Slug
sync_error_message one,string,null Yes Sync Error Message
sync_provider string No Sync Provider
sync_status string Yes Sync Status

list

GET /api/v1/organizations/{org_slug}/repos

Operation ID: api_v1_repos.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
q query string No
sort query enum: name, github No
direction query enum: asc, desc No
page query integer No

Responses

200: Paginated workspace Repo inventory

application/json

Property Type Required Description
pagination object Yes
pagination.count integer Yes
pagination.count_label string Yes
pagination.last integer Yes
pagination.limit integer Yes
pagination.next integer No
pagination.page integer Yes
pagination.previous integer No
pagination.series array of integer or string Yes
repos array of object Yes
repos[].can_retry_import boolean Yes True when a failed client import can be requeued for CLI resume.
repos[].can_retry_sync boolean Yes True when the latest sync run failed and can be retried.
repos[].disclaimer string Yes
repos[].federated_in_home boolean Yes True when this Space is a folder virtual repository inside the organization Home monorepo. False for Home itself and for standalone physical companions.
repos[].github_repository string Yes
repos[].icon_name string Yes
repos[].id string Yes Virtual repository public ID for non-Home rows; Home uses the physical repository public ID.
repos[].import_item_id string Yes
repos[].is_home boolean Yes
repos[].name string Yes
repos[].remote_repository string No
repos[].root_path string Yes Home-relative folder path when federated_in_home is true; null otherwise.
repos[].slug string Yes
repos[].sync_error_message string Yes
repos[].sync_provider enum: none, github, git, gitlab No
repos[].sync_status enum: none, importing, syncing, failed, ready Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/pages/access

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_pages_access.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Responses

200: Repository access page contract

application/json

Property Type Required Description
catalog array of object Yes
catalog[].default_branch string Yes
catalog[].git_auth_username string Yes
catalog[].git_https_clone_url string (uri) Yes
catalog[].git_https_supported boolean Yes
catalog[].github_access_warnings array of object No
catalog[].github_access_warnings[].checked_at string Yes
catalog[].github_access_warnings[].installation_id string Yes
catalog[].github_access_warnings[].label string Yes
catalog[].github_access_warnings[].reason string Yes
catalog[].github_access_warnings[].repository string Yes
catalog[].github_access_warnings[].state enum: unknown, available, unavailable Yes
catalog[].membership_role string Yes
catalog[].organization_id string Yes
catalog[].organization_name string Yes
catalog[].organization_slug string Yes
catalog[].repository_id string Yes
catalog[].repository_name string Yes
catalog[].repository_slug string Yes
catalog_error string Yes
selected_entry object or null Yes
supports_manual_transport boolean Yes
tokens array of object Yes
tokens[].active boolean Yes
tokens[].created_at string (date-time) Yes
tokens[].created_at_label string Yes
tokens[].expires_at string (date-time) Yes
tokens[].expires_at_label string Yes
tokens[].id string Yes
tokens[].last_used_at string (date-time) Yes
tokens[].last_used_at_label string Yes
tokens[].name string Yes
tokens[].permission_level enum: read_only, read_write Yes
tokens[].revoked_at string (date-time) Yes
tokens[].revoked_at_label string Yes
tokens[].token_preview string Yes
tokens[].updated_at string (date-time) Yes
tokens[].updated_at_label string Yes
tokens_error string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/pages/sync

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_pages_sync.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Responses

200: Git source availability and refresh capability

application/json

Property Type Required Description
error string Yes
sync_targets array of object Yes
sync_targets[].can_sync boolean Yes
sync_targets[].github_app_installation_id string Yes
sync_targets[].id string Yes
sync_targets[].provider_label string Yes
sync_targets[].remote_repository string Yes
sync_targets[].source_branch string Yes
sync_targets[].status enum: ready, unavailable Yes
sync_targets[].status_description string Yes
sync_targets[].status_label string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/organizations/{org_slug}/repos/{repo_slug}

Operation ID: delete_api_v1_organizations_org_slug_repos_repo_slug_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Responses

200: Success

application/json

The response is object.

204: Repository deleted
401: Unauthorized
403: Forbidden
404: Not found
409: Repository mutation is busy or deletion is restricted
422: Unprocessable entity
502: Bad gateway