From c2102e6e3bf4fa5220d5fa4d3a4c1549f7385162 Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Thu, 2 Feb 2017 15:57:34 -0200 Subject: Move /projects/fork/:id to /projects/:id/fork --- doc/api/projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index bad238f57d7..e579b89d836 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -705,7 +705,7 @@ Parameters: Forks a project into the user namespace of the authenticated user or the one provided. ``` -POST /projects/fork/:id +POST /projects/:id/fork ``` Parameters: -- cgit v1.2.1 From 4e9e29d295fe2f8cd258cde4b65e244eb74a1ae6 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Wed, 1 Feb 2017 11:23:57 +0100 Subject: API: Consolidate /projects endpoint It consolidates these endpoints: - /projects - /projects/owned - /projects/visible - /projects/starred - /projects/all Into the /projects endpoint using query parameters. --- doc/api/projects.md | 186 +--------------------------------------------------- 1 file changed, 2 insertions(+), 184 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index e579b89d836..fa51158956a 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -36,6 +36,8 @@ Parameters: | `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` | | `search` | string | no | Return list of authorized projects matching the search criteria | | `simple` | boolean | no | Return only the ID, URL, name, and path of each project | +| `owned` | boolean | no | Limit by projects owned by the current user | +| `starred` | boolean | no | Limit by projects starred by the current user | ```json [ @@ -152,190 +154,6 @@ Parameters: ] ``` -Get a list of projects which the authenticated user can see. - -``` -GET /projects/visible -``` - -Parameters: - -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `archived` | boolean | no | Limit by archived status | -| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` | -| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` | -| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` | -| `search` | string | no | Return list of authorized projects matching the search criteria | -| `simple` | boolean | no | Return only the ID, URL, name, and path of each project | - -```json -[ - { - "id": 4, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 0, - "ssh_url_to_repo": "git@example.com:diaspora/diaspora-client.git", - "http_url_to_repo": "http://example.com/diaspora/diaspora-client.git", - "web_url": "http://example.com/diaspora/diaspora-client", - "tag_list": [ - "example", - "disapora client" - ], - "owner": { - "id": 3, - "name": "Diaspora", - "created_at": "2013-09-30T13:46:02Z" - }, - "name": "Diaspora Client", - "name_with_namespace": "Diaspora / Diaspora Client", - "path": "diaspora-client", - "path_with_namespace": "diaspora/diaspora-client", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "id": 3, - "name": "Diaspora", - "path": "diaspora", - "kind": "group" - }, - "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png", - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "runners_token": "b8547b1dc37721d05889db52fa2f02", - "public_builds": true, - "shared_with_groups": [] - }, - { - "id": 6, - "description": null, - "default_branch": "master", - "public": false, - "visibility_level": 0, - "ssh_url_to_repo": "git@example.com:brightbox/puppet.git", - "http_url_to_repo": "http://example.com/brightbox/puppet.git", - "web_url": "http://example.com/brightbox/puppet", - "tag_list": [ - "example", - "puppet" - ], - "owner": { - "id": 4, - "name": "Brightbox", - "created_at": "2013-09-30T13:46:02Z" - }, - "name": "Puppet", - "name_with_namespace": "Brightbox / Puppet", - "path": "puppet", - "path_with_namespace": "brightbox/puppet", - "issues_enabled": true, - "open_issues_count": 1, - "merge_requests_enabled": true, - "builds_enabled": true, - "wiki_enabled": true, - "snippets_enabled": false, - "container_registry_enabled": false, - "created_at": "2013-09-30T13:46:02Z", - "last_activity_at": "2013-09-30T13:46:02Z", - "creator_id": 3, - "namespace": { - "id": 4, - "name": "Brightbox", - "path": "brightbox", - "kind": "group" - }, - "permissions": { - "project_access": { - "access_level": 10, - "notification_level": 3 - }, - "group_access": { - "access_level": 50, - "notification_level": 3 - } - }, - "archived": false, - "avatar_url": null, - "shared_runners_enabled": true, - "forks_count": 0, - "star_count": 0, - "runners_token": "b8547b1dc37721d05889db52fa2f02", - "public_builds": true, - "shared_with_groups": [] - } -] -``` - -### List owned projects - -Get a list of projects which are owned by the authenticated user. - -``` -GET /projects/owned -``` - -Parameters: - -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `archived` | boolean | no | Limit by archived status | -| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` | -| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` | -| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` | -| `search` | string | no | Return list of authorized projects matching the search criteria | -| `simple` | boolean | no | Return only the ID, URL, name, and path of each project | -| `statistics` | boolean | no | Include project statistics | - -### List starred projects - -Get a list of projects which are starred by the authenticated user. - -``` -GET /projects/starred -``` - -Parameters: - -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `archived` | boolean | no | Limit by archived status | -| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` | -| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` | -| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` | -| `search` | string | no | Return list of authorized projects matching the search criteria | -| `simple` | boolean | no | Return only the ID, URL, name, and path of each project | - -### List ALL projects - -Get a list of all GitLab projects (admin only). - -``` -GET /projects/all -``` - -Parameters: - -| Attribute | Type | Required | Description | -| --------- | ---- | -------- | ----------- | -| `archived` | boolean | no | Limit by archived status | -| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` | -| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` | -| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` | -| `search` | string | no | Return list of authorized projects matching the search criteria | -| `statistics` | boolean | no | Include project statistics | - ### Get single project Get a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by the authenticated user. -- cgit v1.2.1 From 6676b4f0dd05ffb6071a3329cca4459e7cddcdc3 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 14 Feb 2017 16:03:24 +0200 Subject: Use Namespace#full_path instead of Namespace#path Signed-off-by: Dmitriy Zaporozhets --- doc/api/projects.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'doc/api/projects.md') diff --git a/doc/api/projects.md b/doc/api/projects.md index bad238f57d7..f4679d29a4b 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -75,7 +75,8 @@ Parameters: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "archived": false, "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png", @@ -125,7 +126,8 @@ Parameters: "id": 4, "name": "Brightbox", "path": "brightbox", - "kind": "group" + "kind": "group", + "full_path": "brightbox" }, "permissions": { "project_access": { @@ -207,7 +209,8 @@ Parameters: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "archived": false, "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png", @@ -254,7 +257,8 @@ Parameters: "id": 4, "name": "Brightbox", "path": "brightbox", - "kind": "group" + "kind": "group", + "full_path": "brightbox" }, "permissions": { "project_access": { @@ -389,7 +393,8 @@ Parameters: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "permissions": { "project_access": { @@ -767,7 +772,8 @@ Example response: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "archived": true, "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", @@ -832,7 +838,8 @@ Example response: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "archived": true, "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", @@ -903,7 +910,8 @@ Example response: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "permissions": { "project_access": { @@ -985,7 +993,8 @@ Example response: "id": 3, "name": "Diaspora", "path": "diaspora", - "kind": "group" + "kind": "group", + "full_path": "diaspora" }, "permissions": { "project_access": { -- cgit v1.2.1