GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → postApiV4ProjectsIdFork

AI-generated

Summary

Create a fork of a GitLab project by specifying the project's ID or URL-encoded path and providing the required request body parameters.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to fork.
  • postApiV4ProjectsIdFork (required) — Request body parameters as defined by the GitLab API schema for forking a project.
  • skipAuthentication — Optionally skip authentication; defaults to false.
  • baseUrl — Base URL of the GitLab instance; defaults to https://gitlab.com.

Output shape

The API response returned by the GitLab /api/v4/projects/{id}/fork endpoint, typically the data of the newly created project fork.

Requires the 'id' path parameter and the appropriate request body payload according to GitLab's API specification. Authentication is required unless skipped. The operation uses HTTP POST.

Examples

Example 1: Fork a project by providing its ID and fork details in the request body.

Set the 'id' path parameter to the project ID, fill the request body parameters for the fork, and execute the POST method on /api/v4/projects/{id}/fork.

Links

Discussion