GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows users to fork a project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/fork`. It is useful for scenarios where a user wants to create a copy of an existing project under their own namespace or group for independent development or experimentation. For example, a developer can fork a public repository to start contributing without affecting the original project.

Use Case Examples

  1. Forking a public GitLab project to create a personal copy for development.
  2. Automating the creation of project forks as part of a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters to specify the project to fork, specifically the project ID or URL-encoded path.

Output

JSON

  • id - The ID or URL-encoded path of the project to be forked.
  • forkedProject - Details of the newly created forked project returned by the GitLab API.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible.
  • Verify that the authentication token has sufficient permissions to fork projects.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error: 404 Not Found - The specified project ID does not exist or is not accessible.
  • Common error: 401 Unauthorized - Authentication failed or token lacks required scopes.

Links

Discussion