Use this API to manage releases for a project, list the releases across a group, and manage the asset links attached to a release.

Asset links support the http, https, and ftp protocols.

List all releases in a group

GET /api/v4/groups/{id}/releases

Lists all releases for projects in a specified group.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the group owned by the authenticated user
sort
Query
StringThe direction of the order. Either desc (default) for descending order or asc for ascending order
Allowed values: asc, desc
Default: desc
simple
Query
BooleanReturn only limited fields for each release
Default: false
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesRelease
400Bad request—
403Forbidden—
404Not found—

List all releases in a project

GET /api/v4/projects/{id}/releases

Lists all releases for a specified project. Sorted by released_at.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20
order_by
Query
StringThe field to use as order. Either released_at (default) or created_at
Allowed values: released_at, created_at
Default: released_at
sort
Query
StringThe direction of the order. Either desc (default) for descending order or asc for ascending order
Allowed values: asc, desc
Default: desc
include_html_description
Query
BooleanIf true, a response includes HTML rendered markdown of the release description
updated_before
Query
String (date-time)Return releases updated before the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ
updated_after
Query
String (date-time)Return releases updated after the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ

Responses

CodeDescriptionSchema
200OKAPIEntitiesRelease
400Bad Request—
404Not Found—

Create a release

POST /api/v4/projects/{id}/releases

Creates a release. Developer level access to the project is required to create a release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (application/json)

PropertyTypeDescription
assetsObjectObject that contains assets for the release
assets.linksArray of objectsLink information about the release
assets.links[].direct_asset_pathStringOptional path for a direct asset link
assets.links[].filepathStringDeprecated: optional path for a direct asset link
assets.links[].link_typeStringThe type of the link: other, runbook, image, package. Defaults to other
assets.links[].name
Required
StringThe name of the link. Link names must be unique within the release
assets.links[].url
Required
StringThe URL of the link. Link URLs must be unique within the release
descriptionStringThe description of the release. You can use Markdown
legacy_catalog_publishBooleanIf true, the release will be published to the CI catalog. This parameter is for internal use only and will be removed in a future release. If the feature flag ci_release_cli_catalog_publish_option is disabled, this parameter will be ignored and the release will published to the CI catalog as it was before this parameter was introduced
milestone_idsString or integerThe ID of each milestone the release is associated with. GitLab Premium customers can specify group milestones. Cannot be combined with milestones parameter. Mutually exclusive with milestones
milestonesArray of stringsThe title of each milestone the release is associated with. GitLab Premium customers can specify group milestones. Cannot be combined with milestone_ids parameter. Mutually exclusive with milestone_ids
nameStringThe release name
refStringIf a tag specified in tag_name doesn’t exist, the release is created from ref and tagged with tag_name. It can be a commit SHA, another tag name, or a branch name
released_atString (date-time)Date and time for the release. Defaults to the current time. Expected in ISO 8601 format (2019-03-15T08:00:00Z). Only provide this field if creating an upcoming or historical release
tag_messageStringMessage to use if creating a new annotated tag
tag_name
Required
StringThe tag where the release is created from

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesRelease
400Bad request—
401Unauthorized—
403Forbidden—
404Not found—
409Conflict—
422Unprocessable entity—

Get the latest project release

GET /api/v4/projects/{id}/releases/permalink/latest

This feature was introduced in GitLab 15.4.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not found—

Get the latest project release

GET /api/v4/projects/{id}/releases/permalink/latest/{suffix_path}

This feature was introduced in GitLab 15.4.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
suffix_path
Path, required
StringThe path to be suffixed to the latest release

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not found—

Retrieve a release by tag name

GET /api/v4/projects/{id}/releases/{tag_name}

Retrieves a release with a specified tag name.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe Git tag the release is associated with
include_html_description
Query
BooleanIf true, a response includes HTML rendered markdown of the release description

Responses

CodeDescriptionSchema
200OKAPIEntitiesRelease
400Bad Request—
401Unauthorized—
404Not found—

Update a release

PUT /api/v4/projects/{id}/releases/{tag_name}

Updates a release. Developer level access to the project is required to update a release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe Git tag the release is associated with

Request body (application/json)

PropertyTypeDescription
descriptionStringThe description of the release. You can use Markdown
milestone_idsString or integerThe ID of each milestone the release is associated with. GitLab Premium customers can specify group milestones. Cannot be combined with milestones parameter. To remove all milestones from the release, specify []. Mutually exclusive with milestones
milestonesArray of stringsThe title of each milestone to associate with the release. GitLab Premium customers can specify group milestones. Cannot be combined with milestone_ids parameter. To remove all milestones from the release, specify []. Mutually exclusive with milestone_ids
nameStringThe release name
released_atString (date-time)The date when the release is/was ready. Expected in ISO 8601 format (2019-03-15T08:00:00Z)

Responses

CodeDescriptionSchema
200OKAPIEntitiesRelease
400Bad request—
401Unauthorized—
403Forbidden—
404Not found—

Delete a release

DELETE /api/v4/projects/{id}/releases/{tag_name}

Delete a release. Deleting a release doesn’t delete the associated tag. Requires at least the Developer role for the project. This feature was introduced in GitLab 11.7.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe Git tag the release is associated with

Responses

CodeDescriptionSchema
200OKAPIEntitiesRelease
400Bad request—
401Unauthorized—
403Forbidden—
404Not found—

GET /api/v4/projects/{id}/releases/{tag_name}/assets/links

Lists all assets as links from a release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe tag associated with the release
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesReleasesLink
400Bad Request—
401Unauthorized—
404Not found—

POST /api/v4/projects/{id}/releases/{tag_name}/assets/links

Creates an asset link for a specified release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe tag associated with the release

Request body (application/json)

PropertyTypeDescription
direct_asset_pathStringOptional path for a direct asset link
filepathStringDeprecated: optional path for a direct asset link
link_typeStringThe type of the link: other, runbook, image, or package. Defaults to other
Allowed values: other, runbook, image, package
Default: other
name
Required
StringThe name of the link. Link names must be unique in the release
url
Required
StringThe URL of the link. Link URLs must be unique in the release

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesReleasesLink
400Bad request—
401Unauthorized—
404Not Found—

GET /api/v4/projects/{id}/releases/{tag_name}/assets/links/{link_id}

Retrieves a specified asset as a link from a release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe tag associated with the release
link_id
Path, required
IntegerThe ID of the link

Responses

CodeDescriptionSchema
200OKAPIEntitiesReleasesLink
400Bad Request—
401Unauthorized—
404Not found—

PUT /api/v4/projects/{id}/releases/{tag_name}/assets/links/{link_id}

Updates a specified asset link for a release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe tag associated with the release
link_id
Path, required
IntegerThe ID of the link

Request body (application/json)

PropertyTypeDescription
direct_asset_pathStringOptional path for a direct asset link
filepathStringDeprecated: optional path for a direct asset link
link_typeStringThe type of the link: other, runbook, image, or package. Defaults to other
Allowed values: other, runbook, image, package
Default: other
nameStringThe name of the link
urlStringThe URL of the link

Responses

CodeDescriptionSchema
200OKAPIEntitiesReleasesLink
400Bad request—
401Unauthorized—
404Not Found—

DELETE /api/v4/projects/{id}/releases/{tag_name}/assets/links/{link_id}

Deletes a specified asset link from a release.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe tag associated with the release
link_id
Path, required
IntegerThe ID of the link

Responses

CodeDescriptionSchema
200OKAPIEntitiesReleasesLink
400Bad request—
401Unauthorized—
404Not Found—

Download a project release asset file

GET /api/v4/projects/{id}/releases/{tag_name}/downloads/{direct_asset_path}

This feature was introduced in GitLab 15.4.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
tag_name
Path, required
StringThe Git tag the release is associated with
direct_asset_path
Path, required
StringThe path to the file to download, as specified when creating the release asset

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesCommit

PropertyTypeDescription
author_emailStringExample: john@example.com
author_nameStringExample: John Smith
authored_dateString (date-time)Example: 2012-05-28T04:42:42-07:00
committed_dateString (date-time)Example: 2012-05-28T04:42:42-07:00
committer_emailStringExample: jack@example.com
committer_nameStringExample: Jack Smith
created_atString (date-time)Example: 2017-07-26T11:08:53.000+02:00
extended_trailersObjectExample: {"Signed-off-by":["John Doe \u003cjohndoe@gitlab.com\u003e","Jane Doe \u003cjanedoe@gitlab.com\u003e"]}
idStringExample: 2695effb5807a22ff3d138d593fd856244e155e7
messageStringExample: Initial commit
parent_idsArray of stringsExample: ["2a4b78934375d7f53875269ffd4f45fd83a84ebe"]
short_idStringExample: 2695effb
titleStringExample: Initial commit
trailersObjectExample: {"Merged-By":"Jane Doe janedoe@gitlab.com"}
web_urlStringExample: https://gitlab.example.com/janedoe/gitlab-foss/-/commit/ed899a2f4b50b4370feeea94676502b42383c746

APIEntitiesCustomAttribute

PropertyTypeDescription
keyStringExample: foo
valueStringExample: bar

APIEntitiesMilestoneWithStats

PropertyTypeDescription
created_atString—
descriptionString—
due_dateString—
expiredBoolean—
group_idString—
idInteger (int64)—
iidInteger (int64)—
issue_statsObject—
issue_stats.closedIntegerExample: 5
issue_stats.totalIntegerExample: 10
project_idInteger (int64)—
start_dateString—
stateString—
titleString—
updated_atString—
web_urlString—

APIEntitiesRelease

PropertyTypeDescription
_linksObject—
_links.closed_issues_urlString—
_links.closed_merge_requests_urlString—
_links.edit_urlString—
_links.merged_merge_requests_urlString—
_links.opened_issues_urlString—
_links.opened_merge_requests_urlString—
_links.selfString—
assetsObject—
assets.countIntegerExample: 2
assets.linksAPIEntitiesReleasesLink—
assets.sourcesAPIEntitiesReleasesSource—
authorAPIEntitiesUserBasic—
commitAPIEntitiesCommit—
commit_pathStringExample: /root/app/commit/588440f66559714280628a4f9799f0c4eb880a4a
created_atString (date-time)Example: 2019-01-03T01:56:19.539Z
descriptionStringExample: Finally released v1.0
description_htmlString—
evidencesAPIEntitiesReleasesEvidence—
milestonesAPIEntitiesMilestoneWithStats—
nameStringExample: Release v1.0
released_atString (date-time)Example: 2019-01-03T01:56:19.539Z
tag_nameStringExample: v1.0
tag_pathStringExample: /root/app/-/tags/v1.0
upcoming_releaseBoolean—

APIEntitiesReleasesEvidence

PropertyTypeDescription
collected_atString (date-time)Example: 2019-01-03T01:56:19.539Z
filepathStringExample: https://gitlab.example.com/root/app/-/releases/v1.0/evidence.json
shaStringExample: 760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d
PropertyTypeDescription
direct_asset_urlStringExample: https://gitlab.example.com/root/app/-/releases/v1.0/downloads/app-v1.0.dmg
idInteger (int64)Example: 1
link_typeStringExample: other
nameStringExample: app-v1.0.dmg
urlStringExample: https://gitlab.example.com/root/app/-/jobs/688/artifacts/raw/bin/app-v1.0.dmg

APIEntitiesReleasesSource

PropertyTypeDescription
formatStringExample: zip
urlStringExample: https://gitlab.example.com/root/app/-/archive/v1.0/app-v1.0.zip

APIEntitiesUserBasic

PropertyTypeDescription
avatar_pathStringExample: /user/avatar/28/The-Big-Lebowski-400-400.png
avatar_urlStringExample: https://gravatar.com/avatar/1
custom_attributesArray of APIEntitiesCustomAttribute—
idInteger (int64)Example: 1
lockedBoolean—
nameStringExample: Administrator
public_emailStringExample: john@example.com
stateStringExample: active
usernameStringExample: admin
web_urlStringExample: https://gitlab.example.com/root