Sample - GitHub REST API
GET/repos/{owner}/{repo}/releases/assets/{asset_id}

Get a release asset

To download the asset's binary content:

  • If within a browser, fetch the location specified in the browser_download_url key provided in the response.
  • Alternatively, set the Accept header of the request to application/octet-stream. The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response.
  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
asset_idintegerrequired
The unique identifier of the asset.

3 status codes
200Response
urlstringrequired
browser_download_urlstringrequired
idintegerrequired
node_idstringrequired
namestringrequired
The file name of the asset.
labelstringrequired
statestringrequired
State of the release asset.
Allowed:uploadedopen
content_typestringrequired
sizeintegerrequired
digeststringrequired
download_countintegerrequired
created_atstringrequired
updated_atstringrequired
uploaderobjectrequired
A GitHub user.
302Found
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.