How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitLab Project import API

Use this API to [import repositories from external sources](https://docs.gitlab.com/user/import/)and to [migrate a project](https://docs.gitlab.com/user/project/settings/import_export/) betweenGitLab instances.If you first migrate the parent group structure with the[group import and export API](https://docs.gitlab.com/api/group_import_export/), you can preserverelationships that span the group, such as connections between project issues and group epics.After an import, use the [project-level CI/CD variables API](https://docs.gitlab.com/api/project_level_variables/)to restore CI/CD variables. You must still migrate your[container registry](https://docs.gitlab.com/user/packages/container_registry/) over a series ofDocker pulls and pushes, and re-run any CI/CD pipelines to retrieve build artifacts.The project relations export endpoints are used by the destination instance during[group migration by direct transfer](https://docs.gitlab.com/user/group/import/) to migrate aproject structure, and you don't usually need to call them yourself. In this context, a relation isan exportable item such as a merge request, including any related items such as a label.> [!note]> User contribution mapping is not supported when you import projects to a> [personal namespace](https://docs.gitlab.com/user/namespace/#types-of-namespaces). All> contributions are assigned to the personal namespace owner and cannot be reassigned.

GitLab Project import API is one of 189 APIs that GitLab publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

This API exposes 16 JSON Schema definitions.

Tagged areas include Project import. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, authentication docs, an API reference, rate-limit docs, an AsyncAPI specification, and 16 JSON Schemas.

This API exposes 20 operations across 19 paths, and defines 19 schemas. It is described by OpenAPI 3.2.0, at version 19.6.

Requests are made against a single base URL, https://{hostname}.

20 operations 19 paths 19 schemas 6 GET14 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
19.6
Base URL
https://gitlab.com/api/v4
Authentication
HTTP Bearer, OAuth 2.0, API Key
Terms of Service
Resource Areas
1

Authentication & Security 3

GitLab Project import API declares 3 security schemes for authenticating requests. It accepts HTTP bearer tokens (http). It supports OAuth 2.0 (oauth2) using the authorizationCode flow, exposing 9 scopes. An API key is passed in the header as PRIVATE-TOKEN (apiKey). By default, every request must be authenticated.

Paths & Operations 20

Across 19 paths, the API surfaces 20 operations — 6 GET, 14 POST. Each is listed below with its method, path, parameters, and response codes.

Project import 20

Use this API to import repositories from external sources and to migrate a project between GitLab instances. If you first migrate the parent group structure with the group import…

POST
/api/v4/projects/import/authorize
Workhorse authorize the project import upload
postApiV4ProjectsImportAuthorize → 201400
POST
/api/v4/projects/import
Import a project from a local archive
postApiV4ProjectsImport body → 201401403400404503
GET
/api/v4/projects/{id}/import
Retrieve the status of a project import
getApiV4ProjectsIdImport 1 param → 200401403400404503
POST
/api/v4/projects/{id}/import/git
Import a project from a Git URL
postApiV4ProjectsIdImportGit 1 param body → 201401403400404409422
POST
/api/v4/projects/remote-import
Import a project from a remote archive
postApiV4ProjectsRemoteImport body → 201401403400404429503
POST
/api/v4/projects/import-relation/authorize
Authorize project relation import
postApiV4ProjectsImportRelationAuthorize → 201400
POST
/api/v4/projects/import-relation
Import project resources
postApiV4ProjectsImportRelation body → 201401403400404503
GET
/api/v4/projects/{id}/relation-imports
Retrieve the status of a project resource import
getApiV4ProjectsIdRelationImports 1 param → 200401403400404503
POST
/api/v4/projects/remote-import-s3
Import a project from an AWS S3 bucket
postApiV4ProjectsRemoteImportS3 body → 201401403400404429503
GET
/api/v4/projects/{id}/export
Retrieve the status of a project export
getApiV4ProjectsIdExport 1 param → 200401403404503400
POST
/api/v4/projects/{id}/export
Export a project
postApiV4ProjectsIdExport 1 param body → 202400401403404429503
GET
/api/v4/projects/{id}/export/download
Download a project export
getApiV4ProjectsIdExportDownload 1 param → 200401403404503400
POST
/api/v4/projects/{id}/export_relations
Schedule a relations export for a project
postApiV4ProjectsIdExportRelations 1 param body → 202400401403404429503
GET
/api/v4/projects/{id}/export_relations/download
Download a relations export for a project
getApiV4ProjectsIdExportRelationsDownload 4 params → 200400401403404429500503
GET
/api/v4/projects/{id}/export_relations/status
Retrieve the status of an relations export for a project
getApiV4ProjectsIdExportRelationsStatus 2 params → 200401403404503400
POST
/api/v4/projects/{id}/github/webhooks
Receive a GitHub webhook delivery for an OAuth-connected repository
postApiV4ProjectsIdGithubWebhooks 1 param → 200400404429
POST
/api/v4/import/github
Import a repository from GitHub
postApiV4ImportGithub body → 201400401403422503
POST
/api/v4/import/github/cancel
Cancel a GitHub project import
postApiV4ImportGithubCancel body → 200400401403404503
POST
/api/v4/import/bitbucket_server
Import repository from Bitbucket Server
postApiV4ImportBitbucketServer body → 201400401403422503
POST
/api/v4/import/bitbucket
Import repository from Bitbucket Cloud
postApiV4ImportBitbucket body → 201400401403422503

Schemas 19

The contract defines 19 schemas that model the data the API accepts and returns. The most detailed are postApiV4ProjectsImportRequest (18 properties), postApiV4ProjectsImportRelationRequest (13 properties), APIEntitiesProjectImportStatus (13 properties), ProjectImportEntity (13 properties). Each schema is shown below with its type and property counts.

postApiV4ProjectsRemoteImportS3Request
object
12 properties 6 required
postApiV4ProjectsImportRelationRequest
object
13 properties 3 required
APIEntitiesProjectImportFailedRelation
object
7 properties
postApiV4ProjectsRemoteImportRequest
object
8 properties 2 required
postApiV4ImportGithubCancelRequest
object
1 property 1 required
postApiV4ProjectsIdExportRequest
object
3 properties
ProjectEntity
object
6 properties
APIEntitiesBulkImportsExportStatus
object
8 properties
APIEntitiesProjectExportStatus
object
9 properties
APIEntitiesProjectImportStatus
object
13 properties
postApiV4ImportBitbucketRequest
object
5 properties 4 required
postApiV4ImportBitbucketServerRequest
object
8 properties 5 required
postApiV4ProjectsImportRequest
object
18 properties 2 required
ProjectImportEntity
object
13 properties
postApiV4ImportGithubRequest
object
8 properties 3 required
postApiV4ProjectsIdImportGitRequest
object
3 properties 1 required
postApiV4ProjectsIdExportRelationsRequest
object
1 property
APIEntitiesBulkImportsExportBatchStatus
object
5 properties
APIEntitiesRelationImportTracker
object
6 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

gitlab-project-import-api-openapi.yml Raw ↑

Other APIs GitLab publishes across the network.

GitLab Orbit gRPC API
GitLab GraphQL API
GitLab Applications API
GitLab Authorization API
GitLab Broadcast Messages API
GitLab Groups API
GitLab Metadata API
GitLab Project Webhooks API
GitLab Projects API
GitLab Tokens API
GitLab User Info API
GitLab Webhook Configuration API
Where this information came from

This is an independent, third-party profile of GitLab Project import API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.