Release links API

Introduced in GitLab 11.7.

Using this API you can manipulate GitLab’s Release links. For manipulating other Release assets, see Release API. GitLab supports links links to http, https, and ftp assets.

Get assets as links from a Release.

GET /projects/:id/releases/:tag_name/assets/links
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the project.
tag_namestringyesThe tag associated with the Release.

Example request:

curl --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links"

Example response:

[
   {
      "id":2,
      "name":"awesome-v0.2.msi",
      "url":"http://192.168.10.15:3000/msi",
      "external":true
   },
   {
      "id":1,
      "name":"awesome-v0.2.dmg",
      "url":"http://192.168.10.15:3000",
      "external":true
   }
]

Get an asset as a link from a Release.

GET /projects/:id/releases/:tag_name/assets/links/:link_id
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the project.
tag_namestringyesThe tag associated with the Release.
link_idintegeryesThe id of the link.

Example request:

curl --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links/1"

Example response:

{
   "id":1,
   "name":"awesome-v0.2.dmg",
   "url":"http://192.168.10.15:3000",
   "external":true
}

Create an asset as a link from a Release.

POST /projects/:id/releases/:tag_name/assets/links
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the project.
tag_namestringyesThe tag associated with the Release.
namestringyesThe name of the link.
urlstringyesThe URL of the link.

Example request:

curl --request POST \
     --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" \
     --data name="awesome-v0.2.dmg" \
     --data url="http://192.168.10.15:3000" \
     "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links"

Example response:

{
   "id":1,
   "name":"awesome-v0.2.dmg",
   "url":"http://192.168.10.15:3000",
   "external":true
}

Update an asset as a link from a Release.

PUT /projects/:id/releases/:tag_name/assets/links/:link_id
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the project.
tag_namestringyesThe tag associated with the Release.
link_idintegeryesThe id of the link.
namestringnoThe name of the link.
urlstringnoThe URL of the link.
NOTE You have to specify at least one of name or url

Example request:

curl --request PUT --data name="new name" --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links/1"

Example response:

{
   "id":1,
   "name":"new name",
   "url":"http://192.168.10.15:3000",
   "external":true
}

Delete an asset as a link from a Release.

DELETE /projects/:id/releases/:tag_name/assets/links/:link_id
AttributeTypeRequiredDescription
idinteger/stringyesThe ID or URL-encoded path of the project.
tag_namestringyesThe tag associated with the Release.
link_idintegeryesThe id of the link.

Example request:

curl --request DELETE --header "PRIVATE-TOKEN: gDybLx3yrUK_HLp3qPjS" "https://gitlab.example.com/api/v4/projects/24/releases/v0.1/assets/links/1"

Example response:

{
   "id":1,
   "name":"new name",
   "url":"http://192.168.10.15:3000",
   "external":true
}