Project statistics API

原文:https://docs.gitlab.com/ee/api/project_statistics.html

Project statistics API

每个对项目统计信息的 API 调用都必须经过验证.

Get the statistics of the last 30 days

检索统计信息需要对存储库的写权限. 当前仅返回 HTTP 提取统计信息. 提取统计信息包括克隆和提取计数,并且仅用于 HTTP,不包括 SSH 提取.

  1. GET /projects/:id/statistics
Attribute Type Required Description
id 整数/字符串 yes 项目的 ID 或URL 编码的路径

响应示例:

  1. { "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" } ] } }