GitLab API

GitlabTool

Actions1095

Projects → postApiV4ProjectsIdFork

AI-generated

Summary

Create a fork of a specified GitLab project by its ID or URL-encoded path, invoking the POST method on the /api/v4/projects/{id}/fork endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the project to fork, provided as a path parameter.

Output shape

a single JSON object representing the newly created forked project.

The returned data includes the complete project object as defined by the GitLab API for project details.

Examples

Example 1: Fork a project with ID 12345

Set 'id' to '12345' to fork the project with that ID.

Links

Discussion