diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/project_statistics.md | 49 | ||||
-rw-r--r-- | doc/user/permissions.md | 1 | ||||
-rw-r--r-- | doc/user/project/index.md | 26 |
3 files changed, 73 insertions, 3 deletions
diff --git a/doc/api/project_statistics.md b/doc/api/project_statistics.md new file mode 100644 index 00000000000..34d73abfcbf --- /dev/null +++ b/doc/api/project_statistics.md @@ -0,0 +1,49 @@ +# Project statistics API + +Every API call to [project](../user/project/index.md) statistics must be authenticated. + +## Get the statistics of the last 30 days + +Retrieving the statistics requires write access to the repository. +Currently only HTTP fetches statistics are returned. +Fetches statistics includes both clones and pulls count and are HTTP only, SSH fetches are not included. + +``` +GET /projects/:id/statistics +``` + +| Attribute | Type | Required | Description | +| ---------- | ------ | -------- | ----------- | +| `id ` | integer / string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | + +Example response: + +```json +{ + "fetches": { + "total": 50, + "days": [ + { + "count": 10, + "date": "2018-01-10" + }, + { + "count": 10, + "date": "2018-01-09" + }, + { + "count": 10, + "date": "2018-01-08" + }, + { + "count": 10, + "date": "2018-01-07" + }, + { + "count": 10, + "date": "2018-01-06" + } + ] + } +} +``` diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 74a966f3a17..5fc24e175ae 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -111,6 +111,7 @@ The following table depicts the various user permission levels in a project. | Force push to protected branches [^4] | | | | | | | Remove protected branches [^4] | | | | | | | View project Audit Events | | | | ✓ | ✓ | +| View project statistics | | | | ✓ | ✓ | ## Project features permissions diff --git a/doc/user/project/index.md b/doc/user/project/index.md index 6a1aadf058e..4a1b164bf37 100644 --- a/doc/user/project/index.md +++ b/doc/user/project/index.md @@ -8,7 +8,7 @@ Your projects can be [available](../../public_access/public_access.md) publicly, internally, or privately, at your choice. GitLab does not limit the number of private projects you create. -## Project's features +## Project features When you create a project in GitLab, you'll have access to a large number of [features](https://about.gitlab.com/features/): @@ -82,7 +82,7 @@ your code blocks, overriding GitLab's default choice of language. the source, build output, and other metadata or artifacts associated with a released version of your code. -### Project's integrations +### Project integrations [Integrate your project](integrations/index.md) with Jira, Mattermost, Kubernetes, Slack, and a lot more. @@ -116,7 +116,7 @@ Read through the documentation on [project settings](settings/index.md). - [Export a project from GitLab](settings/import_export.md#exporting-a-project-and-its-data) - [Importing and exporting projects between GitLab instances](settings/import_export.md) -## Project's members +## Project members Learn how to [add members to your projects](members/index.md). @@ -170,3 +170,23 @@ password <personal_access_token> To quickly access a project from the GitLab UI using the project ID, visit the `/projects/:id` URL in your browser or other tool accessing the project. + +## Project APIs + +There are numerous [APIs](../../api/README.md) to use with your projects: + +- [Badges](../../api/project_badges.md) +- [Clusters](../../api/project_clusters.md) +- [Discussions](../../api/discussions.md) +- [General](../../api/projects.md) +- [Import/export](../../api/project_import_export.md) +- [Issue Board](../../api/boards.md) +- [Labels](../../api/labels.md) +- [Markdown](../../api/markdown.md) +- [Merge Requests](../../api/merge_requests.md) +- [Milestones](../../api/milestones.md) +- [Services](../../api/services.md) +- [Snippets](../../api/project_snippets.md) +- [Templates](../../api/project_templates.md) +- [Traffic](../../api/project_statistics.md) +- [Variables](../../api/project_level_variables.md) |