Downloads

Downloads API is Deprecated

The Downloads API (described below) was deprecated on December 11, 2012. It will be removed at a future date. We recommend using Releases instead.

The downloads API is for package downloads only. If you want to get source tarballs you should use this instead.

List downloads for a repository

GET /repos/:owner/:repo/downloads

Response

Status: 200 OK
Link: <https://api.github.com/resource?page=2>; rel="next",
      <https://api.github.com/resource?page=5>; rel="last"
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
[
  {
    "url": "https://api.github.com/repos/octocat/Hello-World/downloads/1",
    "html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg",
    "id": 1,
    "name": "new_file.jpg",
    "description": "Description of your download",
    "size": 1024,
    "download_count": 40,
    "content_type": ".jpg"
  }
]

Get a single download

GET /repos/:owner/:repo/downloads/:id

Response

Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
  "url": "https://api.github.com/repos/octocat/Hello-World/downloads/1",
  "html_url": "https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg",
  "id": 1,
  "name": "new_file.jpg",
  "description": "Description of your download",
  "size": 1024,
  "download_count": 40,
  "content_type": ".jpg"
}

Delete a download

DELETE /repos/:owner/:repo/downloads/:id

Response

Status: 204 No Content
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999