API

RepositoryImport

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}/pages/repository_import load Connected source accounts for repository import

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:

repository_import, err := client.RepositoryImport(nil).Load(map[string]any{"organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(repository_import)

Lua

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

local repository_import, err = client:RepositoryImport():load({ organization_id = "example" })

PHP

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

$repository_import = $client->RepositoryImport()->load(["organization_id" => "example"]);

Python

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

repository_import = client.RepositoryImport().load({"organization_id": "example"})

Ruby

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

repository_import = client.RepositoryImport.load({ "organization_id" => "example" })

TypeScript

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

const repository_import = await client.RepositoryImport().load({ organization_id: "example" })

Fields

Field Type Required Description
can_manage_connections boolean Yes Can Manage Connections
github_imports array Yes Github Imports
github_installations array Yes Github Installations
gitlab_configured boolean Yes Gitlab Configured
gitlab_imports array Yes Gitlab Imports
gitlab_integrations array Yes Gitlab Integrations
gitlab_redirect_uri one,string,null Yes Gitlab Redirect Uri
gitlab_self_managed_available boolean Yes Gitlab Self Managed Available
inventory_errors array Yes Inventory Errors
organization_id string Yes Organization Id
repositories array Yes Repositories

load

GET /api/v1/organizations/{org_slug}/pages/repository_import

Operation ID: api_v1_pages_repository_import.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
search query string No
accounts_only query boolean No Return accounts and resumable imports without fetching provider repository inventories.

Responses

200: Connected source accounts for repository import

application/json

Property Type Required Description
can_manage_connections boolean Yes
github_imports array of object Yes
github_imports[].account_login string Yes
github_imports[].complete boolean Yes
github_imports[].id string Yes
github_imports[].import_outcome enum: success, attention Yes
github_installations array of object Yes
github_installations[].account_avatar_url string (uri) Yes
github_installations[].account_id string Yes
github_installations[].account_login string Yes
github_installations[].created_at string (date-time) Yes
github_installations[].created_at_label string Yes
github_installations[].id string Yes
github_installations[].installation_id string Yes
github_installations[].installed_at string (date-time) Yes
github_installations[].installed_at_label string Yes
github_installations[].manage_access_url string (uri) Yes
github_installations[].organization_id string Yes
github_installations[].permission_entries array of object Yes GitHub's permission hash as a display-ready list, sorted by name.
github_installations[].permission_entries[].access string Yes
github_installations[].permission_entries[].key string Yes
github_installations[].permission_entries[].name string Yes
github_installations[].permissions object Yes
github_installations[].status enum: active, suspended Yes
github_installations[].suspended_at string (date-time) Yes
github_installations[].suspended_at_label string Yes
github_installations[].updated_at string (date-time) Yes
github_installations[].updated_at_label string Yes
gitlab_configured boolean Yes
gitlab_imports array of object Yes
gitlab_imports[].can_retry boolean Yes
gitlab_imports[].error_message string Yes
gitlab_imports[].gitlab_project_id integer Yes
gitlab_imports[].id string Yes
gitlab_imports[].import_detail string Yes
gitlab_imports[].import_status enum: queued, running, succeeded, failed Yes
gitlab_imports[].import_terminal boolean Yes
gitlab_imports[].integration_id string No
gitlab_imports[].path_with_namespace string Yes
gitlab_imports[].repo_slug string Yes
gitlab_imports[].repository_id string Yes The workspace repository, reserved when the import starts.
gitlab_imports[].source_branch string Yes
gitlab_imports[].status string Yes
gitlab_imports[].web_url string Yes
gitlab_integrations array of object Yes
gitlab_integrations[].avatar_url string Yes
gitlab_integrations[].host string Yes
gitlab_integrations[].id string Yes
gitlab_integrations[].name string Yes
gitlab_integrations[].status string Yes
gitlab_integrations[].username string Yes
gitlab_integrations[].webhook_authentication enum: signing_token, secret_token Yes
gitlab_redirect_uri string Yes
gitlab_self_managed_available boolean Yes
inventory_errors array of string Yes
organization_id string Yes
repositories array of object Yes
repositories[].account_id string Yes
repositories[].account_name string Yes
repositories[].connection_id string Yes
repositories[].default_branch string Yes
repositories[].full_name string Yes
repositories[].id string Yes
repositories[].name string Yes
repositories[].owner string Yes
repositories[].project_id integer Yes
repositories[].provider enum: github, gitlab Yes
repositories[].unavailable_reason string Yes
repositories[].visibility string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway