GitLab API

GitlabTool

Actions905

Overview

This node operation allows importing a group into GitLab via the GitLab API v4. It is useful for automating the process of importing group data from an export file into a GitLab instance, including specifying the group path, name, and optionally the parent group or organization. Practical examples include migrating groups between GitLab instances or restoring group data from backups.

Use Case Examples

  1. Import a group export file into a GitLab instance, specifying the group path and name.
  2. Import a group into a specific parent group or organization within GitLab.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance to which the request is sent.
Method The HTTP method used for the request, defaulting to GET but can be POST for this operation.
path The API endpoint path for the group import operation, fixed to /api/v4/groups/import.
Parameter Schema Defines the parameters required for the group import, including group path, name, export file, optional parent group ID, and optional organization ID.

Output

JSON

  • id - The unique identifier of the imported group.
  • name - The name of the imported group.
  • path - The path of the imported group.
  • parent_id - The ID of the parent group if specified.
  • organization_id - The ID of the organization the group belongs to if specified.
  • status - The status of the import operation.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the export file is correctly formatted and valid for import to avoid errors.
  • Verify that the authentication credentials are correct and have sufficient permissions to import groups.
  • Check that the parent_id and organization_id, if provided, exist and are accessible by the authenticated user.
  • Common error messages may include authentication failures, invalid file format, or permission denied errors. Resolving these involves verifying credentials, file integrity, and user permissions.

Links

Discussion