GitLab API

GitlabTool

Actions905

Overview

This node operation allows importing projects from Bitbucket into GitLab using the GitLab API. It is useful for users who want to migrate or synchronize their Bitbucket repositories with GitLab projects programmatically. For example, a user can automate the import of multiple Bitbucket repositories into GitLab as part of a migration workflow.

Use Case Examples

  1. Automate migration of Bitbucket repositories to GitLab.
  2. Synchronize project imports from Bitbucket to GitLab in CI/CD pipelines.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication Specifies the authentication method to use for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET but supporting POST, PUT, DELETE, HEAD, and PATCH.
Parameter Schema Defines the schema for the parameters sent in the request body for the postApiV4ImportBitbucket operation, required for the import.
Request Body Schema Schema for the request body, used to validate the data sent in the import request.
Request Path The API endpoint path for importing Bitbucket projects into GitLab, fixed to /api/v4/import/bitbucket.

Output

JSON

  • id - The unique identifier of the imported project.
  • name - The name of the imported project.
  • path - The path or URL slug of the imported project.
  • import_status - The status of the import process (e.g., started, finished, failed).
  • import_error - Any error message related to the import process if it failed.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to perform project imports.
  • Verify the baseUrl is correct and accessible from the n8n environment.
  • Check that the request body matches the expected schema for the import operation to avoid validation errors.
  • Common error messages include authentication failures, permission denied, or invalid request body format. Resolving these typically involves correcting credentials, permissions, or request data.

Links

Discussion