GitHub v3 REST API

Delete a release asset

delete
{protocol}://{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

Get the latest release

View the latest published full release for the repository.

The latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/releases/latest

Path Parameters

ownerstringrequired
repostringrequired

Response

200 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
get/repos/{owner}/{repo}/releases/latest
 
200 application/json

Get a release by tag name

Get a published release with the specified tag.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/releases/tags/{tag}

Path Parameters

ownerstringrequired
repostringrequired
tagstringrequired

tag parameter

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
get/repos/{owner}/{repo}/releases/tags/{tag}
 
application/json

Get a release

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/releases/{release_id}

Path Parameters

ownerstringrequired
repostringrequired
release_idintegerrequired

release_id parameter

Response

application/json

Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.

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
get/repos/{owner}/{repo}/releases/{release_id}
 
application/json

Update a release

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

patch
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/releases/{release_id}

Path Parameters

ownerstringrequired
repostringrequired
release_idintegerrequired

release_id parameter

Body

application/json
tag_namestring

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 makes the release a draft, and false publishes the release.

prereleaseboolean

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

Response

200 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
patch/repos/{owner}/{repo}/releases/{release_id}

Body

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