From f030ee846ed39c5e0a326e8ba117ec79f40e230d Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Wed, 1 Oct 2014 10:20:40 +0200 Subject: API: Initial support for forking a project via the API This change adds POST /projects/fork/:id to the API for forking a project into the namespace of the authenticated user, like the "create fork" link in the GUI does. It also calls the same code. Failure and permission checks (except for conflict) are already implemented and handled in ForkService and the API, so the added code is simple and does not alter anything. --- doc/api/projects.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/api') diff --git a/doc/api/projects.md b/doc/api/projects.md index 9f6f6741093..8385e11b805 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -281,6 +281,18 @@ Parameters: - `visibility_level` (optional) - `import_url` (optional) +### Fork project + +Forks a project into the user namespace of the authenticated user. + +``` +POST /projects/fork/:id +``` + +Parameters: + +- `id` (required) - The ID of the project to be forked + ### Remove project Removes a project including all associated resources (issues, merge requests etc.) -- cgit v1.2.1