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:
Diffstat (limited to 'doc/api/packages.md')
-rw-r--r--doc/api/packages.md37
1 files changed, 35 insertions, 2 deletions
diff --git a/doc/api/packages.md b/doc/api/packages.md
index 112c7ef2e61..c257105f72e 100644
--- a/doc/api/packages.md
+++ b/doc/api/packages.md
@@ -287,6 +287,7 @@ Example response:
"size": 2421,
"file_md5": "58e6a45a629910c6ff99145a688971ac",
"file_sha1": "ebd193463d3915d7e22219f52740056dfd26cbfe",
+ "file_sha256": "a903393463d3915d7e22219f52740056dfd26cbfeff321b",
"pipelines": [
{
"id": 123,
@@ -310,7 +311,8 @@ Example response:
"file_name": "my-app-1.5-20181107.152550-1.pom",
"size": 1122,
"file_md5": "d90f11d851e17c5513586b4a7e98f1b2",
- "file_sha1": "9608d068fe88aff85781811a42f32d97feb440b5"
+ "file_sha1": "9608d068fe88aff85781811a42f32d97feb440b5",
+ "file_sha256": "2987d068fe88aff85781811a42f32d97feb4f092a399"
},
{
"id": 27,
@@ -319,7 +321,8 @@ Example response:
"file_name": "maven-metadata.xml",
"size": 767,
"file_md5": "6dfd0cce1203145a927fef5e3a1c650c",
- "file_sha1": "d25932de56052d320a8ac156f745ece73f6a8cd2"
+ "file_sha1": "d25932de56052d320a8ac156f745ece73f6a8cd2",
+ "file_sha256": "ac849d002e56052d320a8ac156f745ece73f6a8cd2f3e82"
}
]
```
@@ -349,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.