GitLab API

GitlabTool

Actions1095

Project_import → postApiV4ProjectsImport

AI-generated

Summary

Import a GitLab project from a given export file by uploading it with specified parameters to create the project in a targeted namespace, optionally overriding project attributes and settings.

Inputs

  • path (required) — The new project path and name (string).
  • file (required) — The project export file to be imported (file).
  • name — The name of the project to be imported; defaults to the path if not provided (string).
  • namespace — The ID or name of the namespace where the project will be imported; defaults to the current user's namespace (string).
  • overwrite — Whether to overwrite an existing project with the same name and namespace (boolean, default false).
  • override_params — Optional parameters to override project settings such as description, build strategy, visibility, access levels, CI configuration, feature toggles, and other project-specific options (complex object with multiple optional fields).

Output shape

a JSON object representing the imported GitLab project resource as returned by the GitLab API

The operation performs a form-data POST request to the '/api/v4/projects/import' endpoint using GitLab API credentials by default unless skipped. The response contains full project details on success.

Links

Discussion