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}.
Metadata
The identity and technical contract details declared by the specification.
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.
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…
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.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from GitLab 12
Other APIs GitLab publishes across the network.
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.