GitHub v3 REST API

List releases

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/releases

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

A release.

urlstring(uri)required
html_urlstring(uri)required
assets_urlstring(uri)required
upload_urlstringrequired
tarball_urlstring | null(uri)required
zipball_urlstring | null(uri)required
idintegerrequired
node_idstringrequired
tag_namestringrequired

The name of the tag.

Example:v1.0.0

target_commitishstringrequired

Specifies the commitish value that determines where the Git tag is created from.

Example:master

namestring | nullrequired
bodystring | null
draftbooleanrequired

true to create a draft (unpublished) release, false to create a published one.

Example:false

prereleasebooleanrequired

Whether to identify the release as a prerelease or a full release.

Example:false

created_atstring(date-time)required
published_atstring | null(date-time)required
authorobjectrequired

Simple User

Show Child Parameters
assetsarray[object]required

Data related to a release.

Show Child Parameters
body_htmlstring
body_textstring
reactionsobject
Show Child Parameters
get/repos/{owner}/{repo}/releases
 
application/json

Create a release

Users with push access to the repository can create a release.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See “Secondary rate limits” and “Dealing with secondary rate limits” for details.

post
http://HOSTNAME/api/v3/repos/{owner}/{repo}/releases

Path Parameters

ownerstringrequired
repostringrequired

Body

application/json
tag_namestringrequired

The name of the tag.

target_commitishstring

Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository’s default branch (usually master).

namestring

The name of the release.

bodystring

Text describing the contents of the tag.

draftboolean

true to create a draft (unpublished) release, false to create a published one.

Default:false

prereleaseboolean

true to identify the release as a prerelease. false to identify the release as a full release.

Default:false

Response

application/json

Response

Release

A release.

urlstring(uri)required
html_urlstring(uri)required
assets_urlstring(uri)required
upload_urlstringrequired
tarball_urlstring | null(uri)required
zipball_urlstring | null(uri)required
idintegerrequired
node_idstringrequired
tag_namestringrequired

The name of the tag.

Example:v1.0.0

target_commitishstringrequired

Specifies the commitish value that determines where the Git tag is created from.

Example:master

namestring | nullrequired
bodystring | null
draftbooleanrequired

true to create a draft (unpublished) release, false to create a published one.

Example:false

prereleasebooleanrequired

Whether to identify the release as a prerelease or a full release.

Example:false

created_atstring(date-time)required
published_atstring | null(date-time)required
authorobjectrequired

Simple User

Show Child Parameters
assetsarray[object]required

Data related to a release.

Show Child Parameters
body_htmlstring
body_textstring
reactionsobject
Show Child Parameters
post/repos/{owner}/{repo}/releases

Body

{ "tag_name": "v1.0.0", "target_commitish": "master", "name": "v1.0.0", "body": "Description of the release", "draft": false, "prerelease": false }
 
application/json

Get a release asset

To download the asset’s binary content, 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.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/releases/assets/{asset_id}

Path Parameters

ownerstringrequired
repostringrequired
asset_idintegerrequired

asset_id parameter

Response

application/json

To download the asset’s binary content, 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.

Release Asset

Data related to a release.

urlstring(uri)required
browser_download_urlstring(uri)required
idintegerrequired
node_idstringrequired
namestringrequired

The file name of the asset.

Example:Team Environment

labelstring | nullrequired
statestringrequired

State of the release asset.

Allowed values:uploadedopen

content_typestringrequired
sizeintegerrequired
download_countintegerrequired
created_atstring(date-time)required
updated_atstring(date-time)required
uploaderobject | nullrequired

Simple User

Show Child Parameters
get/repos/{owner}/{repo}/releases/assets/{asset_id}
 
application/json

Update a release asset

Users with push access to the repository can edit a release asset.

patch
http://HOSTNAME/api/v3/repos/{owner}/{repo}/releases/assets/{asset_id}

Path Parameters

ownerstringrequired
repostringrequired
asset_idintegerrequired

asset_id parameter

Body

application/json
namestring

The file name of the asset.

labelstring

An alternate short description of the asset. Used in place of the filename.

statestring

Example:"uploaded"

Response

200 application/json

Response

Release Asset

Data related to a release.

urlstring(uri)required
browser_download_urlstring(uri)required
idintegerrequired
node_idstringrequired
namestringrequired

The file name of the asset.

Example:Team Environment

labelstring | nullrequired
statestringrequired

State of the release asset.

Allowed values:uploadedopen

content_typestringrequired
sizeintegerrequired
download_countintegerrequired
created_atstring(date-time)required
updated_atstring(date-time)required
uploaderobject | nullrequired

Simple User

Show Child Parameters
patch/repos/{owner}/{repo}/releases/assets/{asset_id}

Body

{ "name": "foo-1.0.0-osx.zip", "label": "Mac binary" }
 
200 application/json

Delete a release asset

delete
http://HOSTNAME/api/v3/repos/{owner}/{repo}/releases/assets/{asset_id}

Path Parameters

ownerstringrequired
repostringrequired
asset_idintegerrequired

asset_id parameter

Response

204

Response

delete/repos/{owner}/{repo}/releases/assets/{asset_id}
 
204