diff options
Diffstat (limited to 'doc/api/releases/links.md')
-rw-r--r-- | doc/api/releases/links.md | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/doc/api/releases/links.md b/doc/api/releases/links.md index 732f5ea57ef..74f6b1c9efa 100644 --- a/doc/api/releases/links.md +++ b/doc/api/releases/links.md @@ -23,7 +23,7 @@ GET /projects/:id/releases/:tag_name/assets/links | Attribute | Type | Required | Description | | ------------- | -------------- | -------- | --------------------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../index.md#namespaced-path-encoding). | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../rest/index.md#namespaced-path-encoding). | | `tag_name` | string | yes | The tag associated with the Release. | Example request: @@ -40,14 +40,14 @@ Example response: "id":2, "name":"awesome-v0.2.msi", "url":"http://192.168.10.15:3000/msi", - "external":true, + "external":true, // deprecated in GitLab 15.9, will be removed in GitLab 16.0. "link_type":"other" }, { "id":1, "name":"awesome-v0.2.dmg", "url":"http://192.168.10.15:3000", - "external":true, + "external":true, // deprecated in GitLab 15.9, will be removed in GitLab 16.0. "link_type":"other" } ] @@ -63,7 +63,7 @@ GET /projects/:id/releases/:tag_name/assets/links/:link_id | Attribute | Type | Required | Description | | ------------- | -------------- | -------- | --------------------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../index.md#namespaced-path-encoding). | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../rest/index.md#namespaced-path-encoding). | | `tag_name` | string | yes | The tag associated with the Release. | | `link_id` | integer | yes | The ID of the link. | @@ -80,7 +80,7 @@ Example response: "id":1, "name":"awesome-v0.2.dmg", "url":"http://192.168.10.15:3000", - "external":true, + "external":true, // deprecated in GitLab 15.9, will be removed in GitLab 16.0. "link_type":"other" } ``` @@ -93,14 +93,15 @@ Creates an asset as a link from a release. POST /projects/:id/releases/:tag_name/assets/links ``` -| Attribute | Type | Required | Description | -|-------------|----------------|----------|---------------------------------------------------------------------------------------------------------------------------| -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../index.md#namespaced-path-encoding). | -| `tag_name` | string | yes | The tag associated with the Release. | -| `name` | string | yes | The name of the link. Link names must be unique in the release. | -| `url` | string | yes | The URL of the link. Link URLs must be unique in the release. | -| `filepath` | string | no | Optional path for a [Direct Asset link](../../user/project/releases/release_fields.md#permanent-links-to-release-assets). | -| `link_type` | string | no | The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`. | +| Attribute | Type | Required | Description | +|----------------------|----------------|----------|---------------------------------------------------------------------------------------------------------------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../rest/index.md#namespaced-path-encoding). | +| `tag_name` | string | yes | The tag associated with the Release. | +| `name` | string | yes | The name of the link. Link names must be unique in the release. | +| `url` | string | yes | The URL of the link. Link URLs must be unique in the release. | +| `filepath` | string | no | Deprecated: Use `direct_asset_path` instead. | +| `direct_asset_path` | string | no | Optional path for a [direct asset link](../../user/project/releases/release_fields.md#permanent-links-to-release-assets). | +| `link_type` | string | no | The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`. | Example request: @@ -109,7 +110,7 @@ curl --request POST \ --header "PRIVATE-TOKEN: <your_access_token>" \ --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" \ + --data direct_asset_path="/bin/hellodarwin-amd64" \ "https://gitlab.example.com/api/v4/projects/20/releases/v1.7.0/assets/links" ``` @@ -121,7 +122,7 @@ Example response: "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, + "external":false, // deprecated in GitLab 15.9, will be removed in GitLab 16.0. "link_type":"other" } ``` @@ -134,15 +135,16 @@ Updates an asset as a link from a release. PUT /projects/:id/releases/:tag_name/assets/links/:link_id ``` -| Attribute | Type | Required | Description | -| ------------- | -------------- | -------- | --------------------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../index.md#namespaced-path-encoding). | -| `tag_name` | string | yes | The tag associated with the Release. | -| `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/release_fields.md#permanent-links-to-release-assets). -| `link_type` | string | no | The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`. | +| Attribute | Type | Required | Description | +| -------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../rest/index.md#namespaced-path-encoding). | +| `tag_name` | string | yes | The tag associated with the Release. | +| `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 | Deprecated: Use `direct_asset_path` instead. | +| `direct_asset_path` | string | no | Optional path for a [direct asset link](../../user/project/releases/release_fields.md#permanent-links-to-release-assets). | +| `link_type` | string | no | The type of the link: `other`, `runbook`, `image`, `package`. Defaults to `other`. | NOTE: You have to specify at least one of `name` or `url` @@ -162,7 +164,7 @@ Example response: "id":1, "name":"new name", "url":"http://192.168.10.15:3000", - "external":true, + "external":true, // deprecated in GitLab 15.9, will be removed in GitLab 16.0. "link_type":"runbook" } ``` @@ -177,7 +179,7 @@ DELETE /projects/:id/releases/:tag_name/assets/links/:link_id | Attribute | Type | Required | Description | | ------------- | -------------- | -------- | --------------------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../index.md#namespaced-path-encoding). | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../rest/index.md#namespaced-path-encoding). | | `tag_name` | string | yes | The tag associated with the Release. | | `link_id` | integer | yes | The ID of the link. | @@ -194,7 +196,7 @@ Example response: "id":1, "name":"new name", "url":"http://192.168.10.15:3000", - "external":true, + "external":true, // deprecated in GitLab 15.9, will be removed in GitLab 16.0. "link_type":"other" } ``` |