Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-07 12:10:27 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-07 12:10:27 +0300
commite8a31d8dc2afd673ca50d74d26edab0a0fec83ca (patch)
tree82c044733ca8d491dc2311231febdb966280950d /doc/api/packages.md
parenta158bebe03b366b6463af181b9ee6f6c2b3850a3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/packages.md')
-rw-r--r--doc/api/packages.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/api/packages.md b/doc/api/packages.md
index 7ad99475515..c257105f72e 100644
--- a/doc/api/packages.md
+++ b/doc/api/packages.md
@@ -352,3 +352,33 @@ Can return the following status codes:
- `204 No Content`, if the package was deleted successfully.
- `404 Not Found`, if the package was not found.
+
+## Delete a package file
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32107) in GitLab 13.12.
+
+WARNING:
+Deleting a package file may corrupt your package making it unusable or unpullable from your package
+manager client. When deleting a package file, be sure that you understand what you're doing.
+
+Delete a package file:
+
+```plaintext
+DELETE /projects/:id/packages/:package_id/package_files/:package_file_id
+```
+
+| Attribute | Type | Required | Description |
+| ----------------- | -------------- | -------- | ----------- |
+| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). |
+| `package_id` | integer | yes | ID of a package. |
+| `package_file_id` | integer | yes | ID of a package file. |
+
+```shell
+curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/packages/:package_id/package_files/:package_file_id"
+```
+
+Can return the following status codes:
+
+- `204 No Content`: The package was deleted successfully.
+- `403 Forbidden`: The user does not have permission to delete the file.
+- `404 Not Found`: The package or package file was not found.