GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows importing a remote project into GitLab by sending a POST request to the GitLab API endpoint `/api/v4/projects/remote-import`. It is useful for automating the import of projects from external URLs into a GitLab instance, with options to customize project settings and override default parameters.

Use Case Examples

  1. Import a remote Git repository into GitLab by specifying the repository URL and desired project path.
  2. Overwrite an existing project in a namespace by enabling the overwrite option during import.
  3. Customize project features such as enabling/disabling issues, merge requests, or setting access levels during the import process.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, hidden unless Skip Authentication is false.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the request, default is GET but POST is used for this operation.
Parameter Schema Defines the form data parameters for the remote project import, including required fields like URL and path, and optional 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.
  • description - The description of the imported project.
  • visibility - The visibility level of the imported project (e.g., private, internal, public).
  • import_status - The status of the 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 URL provided for the remote import is accessible and correct to avoid import failures.
  • If authentication is required, verify that the GitLab API credentials are valid and have sufficient permissions.
  • Check that the project path and namespace are correctly specified to prevent conflicts or errors.
  • If overwrite is enabled, be cautious as it will replace existing projects with the same name and namespace.

Links

Discussion