diff options
Diffstat (limited to 'doc/api/releases/links.md')
-rw-r--r-- | doc/api/releases/links.md | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/api/releases/links.md b/doc/api/releases/links.md index 242b5eb41f5..2b33f6a4dc7 100644 --- a/doc/api/releases/links.md +++ b/doc/api/releases/links.md @@ -97,26 +97,29 @@ POST /projects/:id/releases/:tag_name/assets/links | `tag_name` | string | yes | The tag associated with the Release. | | `name` | string | yes | The name of the link. | | `url` | string | yes | The URL of the link. | +| `filepath` | string | no | Optional path for a [Direct Asset link](../../user/project/releases/index.md#permanent-links-to-release-assets). | `link_type` | string | no | The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`. | Example request: ```shell curl --request POST \ - --header "PRIVATE-TOKEN: n671WNGecHugsdEDPsyo" \ - --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" + --header "PRIVATE-TOKEN: tkhfG7HgG-LiZd3zfdDC" \ + --data name="hellodarwin-amd64" \ + --data url="https://gitlab.example.com/mynamespace/hello/-/jobs/688/artifacts/raw/bin/hello-darwin-amd64" \ + --data filepath="/bin/hellodarwin-amd64" \ + "https://gitlab.example.com/api/v4/projects/20/releases/v1.7.0/assets/links" ``` Example response: ```json { - "id":1, - "name":"awesome-v0.2.dmg", - "url":"http://192.168.10.15:3000", - "external":true, + "id":2, + "name":"hellodarwin-amd64", + "url":"https://gitlab.example.com/mynamespace/hello/-/jobs/688/artifacts/raw/bin/hello-darwin-amd64", + "direct_asset_url":"https://gitlab.example.com/mynamespace/hello/-/releases/v1.7.0/downloads/bin/hellodarwin-amd64", + "external":false, "link_type":"other" } ``` @@ -136,6 +139,7 @@ PUT /projects/:id/releases/:tag_name/assets/links/:link_id | `link_id` | integer | yes | The ID of the link. | | `name` | string | no | The name of the link. | | `url` | string | no | The URL of the link. | +| `filepath` | string | no | Optional path for a [Direct Asset link](../../user/project/releases/index.md#permanent-links-to-release-assets). | `link_type` | string | no | The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`. | NOTE: **Note:** |