Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 1.28 KB

project_statistics.md

File metadata and controls

56 lines (48 loc) · 1.28 KB
stage group info type
Create
Source Code
To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
reference, api

Project statistics API (FREE)

Every API call to project statistics must be authenticated. Retrieving these statistics requires write access to the repository.

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"
      }
    ]
  }
}