API

Gitlab

Operations

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

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/gitlab/authorize create Success
GET /api/v1/organizations/{org_slug}/gitlab load GitLab source integration

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:

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

Lua

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

local gitlab, err = client:Gitlab():load({ organization_id = "example" })

PHP

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

$gitlab = $client->Gitlab()->load(["organization_id" => "example"]);

Python

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

gitlab = client.Gitlab().load({"organization_id": "example"})

Ruby

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

gitlab = client.Gitlab.load({ "organization_id" => "example" })

TypeScript

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

const gitlab = await client.Gitlab().load({ organization_id: "example" })

Fields

Field Type Required Description
configured boolean Yes Configured
connections array Yes Connections
integrations array Yes Integrations
inventory_error one,string,null No Inventory Error
next_page one,integer,null Yes Next Page
organization object Yes Organization
projects array Yes Projects
redirect_uri one,string,null Yes The OAuth redirect URI a self-managed GitLab application must use; null when GitLab callbacks aren't configured.
selected_integration_id one,string,null Yes Selected Integration Id

create

POST /api/v1/organizations/{org_slug}/gitlab/authorize

Operation ID: api_v1_authorize.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

Property Type Required Description
client_id string No
client_secret string No
instance_url string No
integration_id string No
return_target string No Return to this first-run wizard path (<org>/verify/start/<app id>) after GitLab sign-in.
webhook_authentication string No

Responses

200: Success

application/json

The response is object.

201: GitLab source integration

application/json

Property Type Required Description
authorization_url string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

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

Operation ID: get_api_v1_organizations_org_slug_gitlab.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
page query integer No
search query string No
integration_id query string No
connection_ids query string No Comma-separated import connection IDs to resume; scoped to this organization.
sort query enum: newest, alphabetical No

Responses

200: GitLab source integration

application/json

Property Type Required Description
configured boolean Yes
connections array of object Yes
connections[].can_retry boolean Yes
connections[].error_message string Yes
connections[].gitlab_project_id integer Yes
connections[].id string Yes
connections[].import_detail string Yes
connections[].import_status enum: queued, running, succeeded, failed Yes
connections[].import_terminal boolean Yes
connections[].integration_id string No
connections[].path_with_namespace string Yes
connections[].repo_slug string Yes
connections[].repository_id string Yes The workspace repository, reserved when the import starts.
connections[].source_branch string Yes
connections[].status string Yes
connections[].web_url string Yes
integrations array of object Yes
integrations[].avatar_url string Yes
integrations[].host string Yes
integrations[].id string Yes
integrations[].name string Yes
integrations[].status string Yes
integrations[].username string Yes
integrations[].webhook_authentication enum: signing_token, secret_token Yes
inventory_error string No
next_page integer Yes
organization object Yes
organization.id string Yes
organization.name string Yes
organization.slug string Yes
projects array of object Yes
projects[].can_link boolean Yes Whether a Verify project can link this project now: it has no connection yet, or its connection is queued, importing or ready.
projects[].connection_id string Yes
projects[].default_branch string Yes
projects[].import_status string Yes
projects[].name string Yes
projects[].path_with_namespace string Yes
projects[].project_id integer Yes
projects[].repository_id string Yes The workspace repository its connection reserved, if any.
projects[].unavailable_reason string Yes
projects[].visibility string Yes
projects[].web_url string Yes
redirect_uri string Yes The OAuth redirect URI a self-managed GitLab application must use; null when GitLab callbacks aren't configured.
selected_integration_id string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway