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

Delete a release asset

Deletes a release asset from a repository. Use the repository owner, repository name, and asset identifier to select the asset to remove. The operation returns no response body when deletion succeeds.

  • 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 repository name without the `.git` extension; the name is not case sensitive.
asset_idintegerrequired
The unique identifier of the release asset to delete.

2 status codes
204Confirms that the release asset was deleted successfully; the response has no body.
404Returned when the repository or release asset cannot be found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned when the repository or release asset identified by owner, repo, and asset_id cannot be found. repo must omit the .git extension, and asset_id must identify the asset to delete.