We've recently moved some of the REST API documentation. If you can't find what you're looking for, you might try the new Branches, Collaborators, Commits, Deploy Keys, Deployments, GitHub Pages, Releases, Metrics, Webhooks REST API pages.
Repository traffic
The Repository traffic API provides access to the information provided in your repository graph.
About the Repository traffic API
For repositories that you have push access to, the Repository traffic API provides access to the information provided in your repository graph. For more information, see "Viewing traffic to a repository."
Get repository clones
Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
Parameters
| Headers |
|---|
| Name, Type, Description |
acceptstringSetting to |
| Path parameters |
| Name, Type, Description |
ownerstringRequiredThe account owner of the repository. The name is not case sensitive. |
repostringRequiredThe name of the repository. The name is not case sensitive. |
| Query parameters |
| Name, Type, Description |
perstringThe time frame to display results for. Default: Can be one of: |
HTTP response status codes
| Status code | Description |
|---|---|
200 | <