GitLab API

GitlabTool

Actions1095

Projects → postApiV4ProjectsIdForkForkedFromId

AI-generated

Summary

Create a fork of an existing GitLab project by specifying the target project ID and the source project ID it is forked from.

Inputs

  • Id (required) — The ID or URL-encoded path of the target project to create the fork in.
  • Forked_from_id (required) — The ID of the source project from which to fork.
  • Skip Authentication — Optionally skip authentication for the request (default is false).
  • baseUrl — The base URL of the GitLab instance, defaulting to https://gitlab.com.

Output shape

a single object representing the newly created forked project.

Outputs the raw API response for the created fork. Authentication is required unless explicitly skipped. The API endpoint used is POST /api/v4/projects/{id}/fork/{forked_from_id}.

Examples

Example 1: Fork a project

Specify the target project ID as '123' and the source project ID as '456' to create a fork of project 456 under project 123.

Links

Discussion