GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows importing a project into GitLab by sending a project export file along with various optional parameters to customize the imported project. It is useful for automating the migration or restoration of projects in GitLab environments. For example, users can import a project backup file, specify the target namespace, and override project settings such as visibility, CI/CD configurations, and access levels.

Use Case Examples

  1. Import a project export file to GitLab, specifying the new project path and name.
  2. Overwrite an existing project in the same namespace by enabling the overwrite option.
  3. Customize the imported project by setting parameters like description, visibility, and enabling/disabling features such as issues, merge requests, and CI/CD settings.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
baseUrl The base URL of the GitLab instance. Defaults to https://gitlab.com.
Method HTTP method to use for the request. Defaults to GET.
Parameter Schema Schema defining the parameters for the project import operation, including required and optional form data fields such as path, file, name, namespace, overwrite, and many override parameters to customize project settings.

Output

JSON

  • id - The unique identifier of the imported project.
  • name - The name of the imported project.
  • path - The path of the imported project.
  • namespace - The namespace into which the project is imported.
  • visibility - The visibility level of the imported project (e.g., private, internal, public).
  • import_status - The status of the project import process.
  • created_at - Timestamp when the project was created.
  • last_activity_at - Timestamp of the last activity in the project.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project export file is correctly formatted and accessible.
  • Verify that the specified namespace exists and the user has permission to import projects into it.
  • Check that the overwrite flag is used carefully to avoid unintentional data loss.
  • Authentication errors may occur if the API token is invalid or missing; ensure proper credentials are configured.

Links

Discussion