diff options
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/api_resources.md | 1 | ||||
-rw-r--r-- | doc/api/statistics.md | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/doc/api/api_resources.md b/doc/api/api_resources.md index 9af5430f1c8..e2ddc2cbc18 100644 --- a/doc/api/api_resources.md +++ b/doc/api/api_resources.md @@ -126,6 +126,7 @@ The following API resources are available outside of project and group contexts | [Runners](runners.md) | `/runners` (also available for projects) | | [Search](search.md) | `/search` (also available for groups and projects) | | [Settings](settings.md) | `/application/settings` | +| [Statistics](statistics.md) | `/application/statistics` | | [Sidekiq metrics](sidekiq_metrics.md) | `/sidekiq` | | [Suggestions](suggestions.md) | `/suggestions` | | [System hooks](system_hooks.md) | `/hooks` | diff --git a/doc/api/statistics.md b/doc/api/statistics.md new file mode 100644 index 00000000000..5078b2f26d4 --- /dev/null +++ b/doc/api/statistics.md @@ -0,0 +1,35 @@ +# Application statistics API + +## Get current application statistics + +List the current statistics of the GitLab instance. You have to be an +administrator in order to perform this action. + +NOTE: **Note:** +These statistics are approximate. + +``` +GET /application/statistics +``` + +```bash +curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/application/statistics +``` + +Example response: + +```json +{ + "forks": "10", + "issues": "76", + "merge_requests": "27", + "notes": "954", + "snippets": "50", + "ssh_keys": "10", + "milestones": "40", + "users": "50", + "groups": "10", + "projects": "20", + "active_users": "50" +} +``` |