From 6b02e36660e00cb06237921025d57efc00dd456e Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 5 Jul 2018 11:28:38 +0200 Subject: [PATCH] Mention the forked_from_project field in projects API --- doc/api/projects.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/api/projects.md b/doc/api/projects.md index b4599fdc97e..1e06f6d01f3 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -511,6 +511,39 @@ GET /projects/:id } ``` +If the project is a fork, and you provide a valid token to authenticate, the +`forked_from_project` field will appear in the response. + +```json +{ + "id":3, + + ... + + "forked_from_project":{ + "id":13083, + "description":"GitLab Community Edition", + "name":"GitLab Community Edition", + "name_with_namespace":"GitLab.org / GitLab Community Edition", + "path":"gitlab-ce", + "path_with_namespace":"gitlab-org/gitlab-ce", + "created_at":"2013-09-26T06:02:36.000Z", + "default_branch":"master", + "tag_list":[], + "ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-ce.git", + "http_url_to_repo":"https://gitlab.com/gitlab-org/gitlab-ce.git", + "web_url":"https://gitlab.com/gitlab-org/gitlab-ce", + "avatar_url":"https://assets.gitlab-static.net/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png", + "star_count":3812, + "forks_count":3561, + "last_activity_at":"2018-01-02T11:40:26.570Z" + } + + ... + +} +``` + ## Get project users Get the users list of a project.