GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → postApiV4ProjectsIdForkForkedFromId

AI-generated

Summary

Fork a GitLab project identified by its ID from another existing project specified by the forked_from_id.

Inputs

  • id (required) — The ID or URL-encoded path of the project to fork.
  • forked_from_id (required) — The ID of the project it was forked from.
  • skipAuthentication — Optional flag to skip authentication for this request.

Output shape

a single project record object representing the newly forked project

The operation sends a POST request to the GitLab API endpoint /api/v4/projects/{id}/fork/{forked_from_id} and returns the project data of the forked project. Authentication is required unless explicitly skipped.

Examples

Example 1: Fork a project with required IDs

Set 'id' to the target project ID to fork into and 'forked_from_id' to the source project ID to fork from. Execute this operation to create a new fork project returned as output.

Links

Discussion