From 3aca8b6557a638e0634065a1c72d87861b9ace4a Mon Sep 17 00:00:00 2001 From: Mark Fletcher Date: Mon, 1 May 2017 17:39:38 +0800 Subject: Update Projects API documentation to include statistics parameter * Only supported for the GET /projects endpoint --- doc/api/projects.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/projects.md b/doc/api/projects.md index 51de4fef7ff..873b1ca9b2b 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -40,6 +40,7 @@ Parameters: | `owned` | boolean | no | Limit by projects owned by the current user | | `membership` | boolean | no | Limit by projects that the current user is a member of | | `starred` | boolean | no | Limit by projects starred by the current user | +| `statistics` | boolean | no | Include project statistics | ```json [ @@ -91,7 +92,14 @@ Parameters: "shared_with_groups": [], "only_allow_merge_if_pipeline_succeeds": false, "only_allow_merge_if_all_discussions_are_resolved": false, - "request_access_enabled": false + "request_access_enabled": false, + "statistics": { + "commit_count": 37, + "storage_size": 1038090, + "repository_size": 1038090, + "lfs_objects_size": 0, + "job_artifacts_size": 0 + } }, { "id": 6, @@ -151,7 +159,14 @@ Parameters: "shared_with_groups": [], "only_allow_merge_if_pipeline_succeeds": false, "only_allow_merge_if_all_discussions_are_resolved": false, - "request_access_enabled": false + "request_access_enabled": false, + "statistics": { + "commit_count": 12, + "storage_size": 2066080, + "repository_size": 2066080, + "lfs_objects_size": 0, + "job_artifacts_size": 0 + } } ] ``` -- cgit v1.2.1 From 21f5515a5ffb46bb2e710c17690122903bca126e Mon Sep 17 00:00:00 2001 From: Mark Fletcher Date: Mon, 1 May 2017 17:42:42 +0800 Subject: Expose project statistics on single requests via the API + The statistics parameter was already accepted * This commit ensure that it is respected for GET /projects/:id endpoint + Add documentation of the parameter and update the example response for stats --- doc/api/projects.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc/api') diff --git a/doc/api/projects.md b/doc/api/projects.md index 873b1ca9b2b..188fbe7447d 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -185,6 +185,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | +| `statistics` | boolean | no | Include project statistics | ```json { @@ -256,7 +257,14 @@ Parameters: ], "only_allow_merge_if_pipeline_succeeds": false, "only_allow_merge_if_all_discussions_are_resolved": false, - "request_access_enabled": false + "request_access_enabled": false, + "statistics": { + "commit_count": 37, + "storage_size": 1038090, + "repository_size": 1038090, + "lfs_objects_size": 0, + "job_artifacts_size": 0 + } } ``` -- cgit v1.2.1