GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to perform operations related to importing projects from Bitbucket Server. Specifically, the 'postApiV4ImportBitbucketServer' operation allows users to initiate an import of a Bitbucket Server project into GitLab by sending a POST request to the '/api/v4/import/bitbucket_server' endpoint. This is useful for automating migration workflows from Bitbucket Server to GitLab within an n8n automation.

Use Case Examples

  1. Automate the migration of repositories from Bitbucket Server to GitLab by triggering the import process via this node.
  2. Integrate project import workflows into CI/CD pipelines to streamline project setup in GitLab after Bitbucket Server exports.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent, defaulting to https://gitlab.com.
Method The HTTP method used for the API request, defaulting to GET but set to POST for the import operation.
Parameter Schema Defines the schema for the parameters sent in the request body for the import operation.
Request Body Schema Defines the schema for the request body content for the import operation.
Request Path The API endpoint path for the Bitbucket Server import operation, fixed to '/api/v4/import/bitbucket_server'.

Output

JSON

  • response - The JSON response from the GitLab API after initiating the Bitbucket Server import, typically containing import status and project details.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is valid and has sufficient permissions to perform project imports.
  • Verify the baseUrl is correctly set to the target GitLab instance URL.
  • Check that the request body matches the expected schema for the Bitbucket Server import operation to avoid validation errors.
  • Common error messages may include authentication failures, permission denied, or invalid request body format. Resolving these involves verifying credentials, permissions, and request payload structure.

Links

Discussion