Project statistics API
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
Every API call to project statistics must be authenticated. Retrieving these statistics requires read access to the repository.
For use with a personal access token,
use a token with read_api
scope. For a group access token,
you can use Reporter role and read_api
scope.
This API retrieves the number of times the project is either cloned or pulled with the HTTP method. SSH fetches are not included.
Get the statistics of the last 30 days
GET /projects/:id/statistics
Attribute | Type | Required | Description |
---|---|---|---|
id | integer or string | yes | The ID or URL-encoded path of the project |
Example response:
{
"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"
}
]
}
}
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support