API

GitlabImport

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/imports create 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:

created, err := client.GitlabImport(nil).Create(map[string]any{"organization_id": "example", "integration_id": "example", "project_id": 1}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local created, err = client:GitlabImport():create({ organization_id = "example", integration_id = "example", project_id = 1 })

PHP

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

$created = $client->GitlabImport()->create(["organization_id" => "example", "integration_id" => "example", "project_id" => 1]);

Python

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

created = client.GitlabImport().create({ "organization_id": "example", "integration_id": "example", "project_id": 1 })

Ruby

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

created = client.GitlabImport.create({ "organization_id" => "example", "integration_id" => "example", "project_id" => 1 })

TypeScript

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

const created = await client.GitlabImport().create({ organization_id: "example", integration_id: "example", project_id: 1 })

Fields

Field Type Required Description
integration_id string Yes Integration Id
project_id integer Yes Project Id
repo_slug string No Repo Slug
source_branch string No Source Branch

create

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

Operation ID: api_v1_imports.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

Property Type Required Description
integration_id string Yes
project_id integer Yes
repo_slug string No
source_branch string No

Responses

200: Success

application/json

The response is object.

202: GitLab source integration

application/json

Property Type Required Description
can_retry boolean Yes
error_message string Yes
gitlab_project_id integer Yes
id string Yes
import_detail string Yes
import_status enum: queued, running, succeeded, failed Yes
import_terminal boolean Yes
integration_id string No
path_with_namespace string Yes
repo_slug string Yes
repository_id string Yes The workspace repository, reserved when the import starts.
source_branch string Yes
status string Yes
web_url string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway