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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
sortQuery | String | Sort results in ascending or descending order Allowed values: asc,descDefault: desc |
simpleQuery | Boolean | If true,Default: false |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad request | — |
403 | Forbidden | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
order_Query | String | Sort results by the specified field Allowed values: released_,created_Default: released_ |
sortQuery | String | Sort results in ascending or descending order Allowed values: asc,descDefault: desc |
include_Query | Boolean | If true, |
updated_Query | String (date- | Return releases updated on or before the specified time |
updated_Query | String (date- | Return releases updated on or after the specified time |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
404 | Not 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. Release creates and updates are rate limited per project (release_writes_limit_per_project application setting) and per user (release_writes_limit_per_user application setting). Requests over a limit are blocked when its feature flag (rate_limit_release_writes_per_project or rate_limit_release_writes_per_user) is enabled, and only logged otherwise. When the release_evidence_size_limit feature flag is enabled, the response includes warnings if the release evidence would exceed the release_evidence_max_size_bytes application setting even without its issues.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
assets | Object | Object that contains assets for the release |
assets. | Array of objects | Array of links to include as release assets |
assets. | String | Path for a direct asset link |
assets. | String | Deprecated: |
assets. | String | The type of the link Allowed values: other,runbook,package,imageDefault: other |
assets.Required | String | Name of the link. |
assets.Required | String | URL of the link. |
description | String | Description of the release. |
legacy_ | Boolean | If true,ci_ feature flag is disabled, |
milestone_ | String or integer | ID of each milestone the release is associated with.milestones parameter.milestones |
milestones | Array of strings | Title of each milestone the release is associated with.milestone_ parameter.milestone_ |
name | String | Name of the release |
ref | String | If the tag named in tag_ doesn’t exist,tag_. |
released_ | String (date- | Date and time for the release. |
tag_ | String | Message to use if creating a new annotated tag |
tag_Required | String | Tag the release is created from |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
409 | Conflict | — |
422 | Unprocessable entity | — |
429 | Too many requests | — |
Get the latest project release
GET /api/v4/projects/{id}/releases/permalink/latest
Retrieves the latest release through a permanent API URL. To call any other GET endpoint that requires a release tag, append a suffix to the permalink/latest path, for example permalink/latest/evidence, or permalink/latest/downloads/bin/asset.exe to download an asset of the latest release. The request redirects to the endpoint for the tag of the latest release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Get the latest project release
GET /api/v4/projects/{id}/releases/permalink/latest/{suffix_path}
Retrieves the latest release through a permanent API URL. To call any other GET endpoint that requires a release tag, append a suffix to the permalink/latest path, for example permalink/latest/evidence, or permalink/latest/downloads/bin/asset.exe to download an asset of the latest release. The request redirects to the endpoint for the tag of the latest release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
suffix_Path, | String | The path to be suffixed to the latest release |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Retrieve a release by tag name
GET /api/v4/projects/{id}/releases/{tag_name}
Retrieves a release with a specified tag name.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Git tag the release is associated with |
include_Query | Boolean | If true, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not 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. Release creates and updates are rate limited per project (release_writes_limit_per_project application setting) and per user (release_writes_limit_per_user application setting). Requests over a limit are blocked when its feature flag (rate_limit_release_writes_per_project or rate_limit_release_writes_per_user) is enabled, and only logged otherwise.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Git tag the release is associated with |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
description | String | Description of the release. |
milestone_ | String or integer | ID of each milestone the release is associated with.milestones parameter.[].milestones |
milestones | Array of strings | Title of each milestone to associate with the release.milestone_ parameter.[].milestone_ |
name | String | Name of the release |
released_ | String (date- | Date when the release is or was ready |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
429 | Too many requests | — |
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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Git tag the release is associated with |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
List all release links
GET /api/v4/projects/{id}/releases/{tag_name}/assets/links
Lists all assets as links from a release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Tag associated with the release |
pageQuery | Integer | Page number of results to retrieve Default: 1Example: 1 |
per_Query | Integer | Number of items to list per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | Array of APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Create a release link
POST /api/v4/projects/{id}/releases/{tag_name}/assets/links
Creates an asset link for a specified release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Tag associated with the release |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
direct_ | String | Path for a direct asset link |
filepath | String | Path for a direct asset link.direct_ instead |
link_ | String | Type of the link Allowed values: other,runbook,image,packageDefault: other |
nameRequired | String | Name of the link. |
urlRequired | String | URL of the link. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Retrieve a release link
GET /api/v4/projects/{id}/releases/{tag_name}/assets/links/{link_id}
Retrieves a specified asset as a link from a release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Tag associated with the release |
link_Path, | Integer | ID of the link |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Update a release link
PUT /api/v4/projects/{id}/releases/{tag_name}/assets/links/{link_id}
Updates a specified asset link for a release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Tag associated with the release |
link_Path, | Integer | ID of the link |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
direct_ | String | Path for a direct asset link |
filepath | String | Path for a direct asset link.direct_ instead |
link_ | String | Type of the link Allowed values: other,runbook,image,packageDefault: other |
name | String | Name of the link.name,url must be provided |
url | String | URL of the link.name,url must be provided |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Delete a release link
DELETE /api/v4/projects/{id}/releases/{tag_name}/assets/links/{link_id}
Deletes a specified asset link from a release.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Tag associated with the release |
link_Path, | Integer | ID of the link |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Download a project release asset file
GET /api/v4/projects/{id}/releases/{tag_name}/downloads/{direct_asset_path}
Downloads a release asset file. The request redirects to the URL of the release link that has the specified direct asset path. This feature was introduced in GitLab 15.4.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
tag_Path, | String | Git tag the release is associated with |
direct_Path, | String | The path to the file to download, |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCommit
| Property | Type | Description |
|---|---|---|
author_ | String | Email address of the commit author Example: john@example. |
author_ | String | Name of the commit author Example: John Smith |
authored_ | String (date- | Date and time when the commit was authored Example: 2012- |
committed_ | String (date- | Date and time when the commit was committed Example: 2012- |
committer_ | String | Email address of the committer Example: jack@example. |
committer_ | String | Name of the committer Example: Jack Smith |
created_ | String (date- | Date and time when the commit was created.committed_Example: 2017- |
extended_ | Object | Git trailers parsed from the commit message, Example: {"Signed- |
id | String | Full SHA of the commit Example: 2695effb5807a22ff3d1 |
message | String | Full commit message Example: Initial commit |
parent_ | Array of strings | SHAs of the parent commits Example: ["2a4b78934375d7f53875 |
short_ | String | Short SHA of the commit Example: 2695effb |
title | String | Title of the commit message Example: Initial commit |
trailers | Object | Git trailers parsed from the commit message. Example: {"Merged- |
web_ | String | URL to view the commit in the Git Example: https: |
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesMilestoneWithStats
| Property | Type | Description |
|---|---|---|
created_ | String | — |
description | String | — |
due_ | String | — |
expired | Boolean | — |
group_ | String | — |
id | Integer (int64) | — |
iid | Integer (int64) | — |
issue_ | Object | — |
issue_ | Integer | Example:5 |
issue_ | Integer | Example:10 |
project_ | Integer (int64) | — |
start_ | String | — |
state | String | — |
title | String | — |
updated_ | String | — |
web_ | String | — |
APIEntitiesRelease
| Property | Type | Description |
|---|---|---|
_ | Object | Links of the release |
_ | String | HTTP URL of the release’s closed issues |
_ | String | HTTP URL of the release’s closed merge requests |
_ | String | HTTP URL of the release’s edit page |
_ | String | HTTP URL of the release’s merged merge requests |
_ | String | HTTP URL of the release’s open issues |
_ | String | HTTP URL of the release’s open merge requests |
_ | String | HTTP URL of the release |
assets | Object | — |
assets. | Integer | Example:2 |
assets. | Array of APIEntities | — |
assets. | Array of APIEntities | — |
author | APIEntities | — |
commit | APIEntities | — |
commit_ | String | Example:/ |
created_ | String (date- | Example:2019- |
description | String | Example:Finally released v1. |
description_ | String | — |
evidences | Array of APIEntities | — |
milestones | Array of APIEntities | — |
name | String | Example:Release v1. |
released_ | String (date- | Example:2019- |
tag_ | String | Example:v1. |
tag_ | String | Example:/ |
upcoming_ | Boolean | — |
warnings | Array of strings | Example:["No evidence was collected for this release. |
APIEntitiesReleasesEvidence
| Property | Type | Description |
|---|---|---|
collected_ | String (date- | Example:2019- |
filepath | String | Example:https: |
sha | String | Example:760d6cdfb0879c3ffede |
APIEntitiesReleasesLink
| Property | Type | Description |
|---|---|---|
direct_ | String | Example:https: |
id | Integer (int64) | Example:1 |
link_ | String | Example:other |
name | String | Example:app- |
url | String | Example:https: |
APIEntitiesReleasesSource
| Property | Type | Description |
|---|---|---|
format | String | Example:zip |
url | String | Example:https: |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | URL of the user’s avatar Example: https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | ID of the user Example: 1 |
locked | Boolean | If true, |
name | String | Name of the user.**** if the current user cannot read the bot’s project or groupExample: Administrator |
public_ | String | Public email address of the user Example: john@example. |
state | String | State of the user account.active,blocked,ldap_,blocked_,banned,deactivatedExample: active |
username | String | Username of the user Example: admin |
web_ | String | URL of the user’s profile Example: https: |