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 | The ID or URL- |
sortQuery | String | The direction of the order.desc (default) for descending order or asc for ascending orderAllowed values: asc,descDefault: desc |
simpleQuery | Boolean | Return only limited fields for each release Default: false |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | 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 | The ID or URL- |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
order_Query | String | The field to use as order.released_ (default) or created_Allowed values: released_,created_Default: released_ |
sortQuery | String | The direction of the order.desc (default) for descending order or asc for ascending orderAllowed values: asc,descDefault: desc |
include_Query | Boolean | If true, |
updated_Query | String (date- | Return releases updated before the specified datetime. |
updated_Query | String (date- | Return releases updated after the specified datetime. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | 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.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
assets | Object | Object that contains assets for the release |
assets. | Array of objects | Link information about the release |
assets. | String | Optional path for a direct asset link |
assets. | String | Deprecated: |
assets. | String | The type of the link:other,runbook,image,package.other |
assets.Required | String | The name of the link. |
assets.Required | String | The URL of the link. |
description | String | The description of the release. |
legacy_ | Boolean | If true, |
milestone_ | String or integer | The ID of each milestone the release is associated with.milestones parameter.milestones |
milestones | Array of strings | The title of each milestone the release is associated with.milestone_ parameter.milestone_ |
name | String | The release name |
ref | String | If a tag specified in tag_ doesn’t exist,ref and tagged with tag_. |
released_ | String (date- | Date and time for the release.2019-). |
tag_ | String | Message to use if creating a new annotated tag |
tag_Required | String | The tag where 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 | — |
Get the latest project release
GET /api/v4/projects/{id}/releases/permalink/latest
This feature was introduced in GitLab 15.4.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The 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}
This feature was introduced in GitLab 15.4.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The 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 | The ID or URL- |
tag_Path, | String | The 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.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
tag_Path, | String | The Git tag the release is associated with |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
description | String | The description of the release. |
milestone_ | String or integer | The ID of each milestone the release is associated with.milestones parameter.[].milestones |
milestones | Array of strings | The title of each milestone to associate with the release.milestone_ parameter.[].milestone_ |
name | String | The release name |
released_ | String (date- | The date when the release is/2019-) |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not 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
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
tag_Path, | String | The 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 | The ID or URL- |
tag_Path, | String | The tag associated with the release |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | 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 | The ID or URL- |
tag_Path, | String | The tag associated with the release |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
direct_ | String | Optional path for a direct asset link |
filepath | String | Deprecated: |
link_ | String | The type of the link:other,runbook,image,package.otherAllowed values: other,runbook,image,packageDefault: other |
nameRequired | String | The name of the link. |
urlRequired | String | The 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 | The ID or URL- |
tag_Path, | String | The tag associated with the release |
link_Path, | Integer | The 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 | The ID or URL- |
tag_Path, | String | The tag associated with the release |
link_Path, | Integer | The ID of the link |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
direct_ | String | Optional path for a direct asset link |
filepath | String | Deprecated: |
link_ | String | The type of the link:other,runbook,image,package.otherAllowed values: other,runbook,image,packageDefault: other |
name | String | The name of the link |
url | String | The URL of the link |
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 | The ID or URL- |
tag_Path, | String | The tag associated with the release |
link_Path, | Integer | The 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}
This feature was introduced in GitLab 15.4.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
tag_Path, | String | The 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 | Example:john@example. |
author_ | String | Example:John Smith |
authored_ | String (date- | Example:2012- |
committed_ | String (date- | Example:2012- |
committer_ | String | Example:jack@example. |
committer_ | String | Example:Jack Smith |
created_ | String (date- | Example:2017- |
extended_ | Object | Example:{"Signed- |
id | String | Example:2695effb5807a22ff3d1 |
message | String | Example:Initial commit |
parent_ | Array of strings | Example:["2a4b78934375d7f53875 |
short_ | String | Example:2695effb |
title | String | Example:Initial commit |
trailers | Object | Example:{"Merged- |
web_ | String | 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 | — |
_ | String | — |
_ | String | — |
_ | String | — |
_ | String | — |
_ | String | — |
_ | String | — |
_ | String | — |
assets | Object | — |
assets. | Integer | Example:2 |
assets. | APIEntities | — |
assets. | APIEntities | — |
author | APIEntities | — |
commit | APIEntities | — |
commit_ | String | Example:/ |
created_ | String (date- | Example:2019- |
description | String | Example:Finally released v1. |
description_ | String | — |
evidences | APIEntities | — |
milestones | APIEntities | — |
name | String | Example:Release v1. |
released_ | String (date- | Example:2019- |
tag_ | String | Example:v1. |
tag_ | String | Example:/ |
upcoming_ | Boolean | — |
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 | Example:https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | Example:1 |
locked | Boolean | — |
name | String | Example:Administrator |
public_ | String | Example:john@example. |
state | String | Example:active |
username | String | Example:admin |
web_ | String | Example:https: |