summaryrefslogtreecommitdiff
path: root/doc/user/packages/generic_packages/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/packages/generic_packages/index.md')
-rw-r--r--doc/user/packages/generic_packages/index.md22
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/user/packages/generic_packages/index.md b/doc/user/packages/generic_packages/index.md
index 73b84c04b6d..b9186e99357 100644
--- a/doc/user/packages/generic_packages/index.md
+++ b/doc/user/packages/generic_packages/index.md
@@ -40,7 +40,7 @@ Prerequisites:
- You need to [authenticate with the API](../../../api/README.md#authentication). If authenticating with a deploy token, it must be configured with the `write_package_registry` scope.
```plaintext
-PUT /projects/:id/packages/generic/:package_name/:package_version/:file_name
+PUT /projects/:id/packages/generic/:package_name/:package_version/:file_name?status=:status
```
| Attribute | Type | Required | Description |
@@ -53,12 +53,28 @@ PUT /projects/:id/packages/generic/:package_name/:package_version/:file_name
Provide the file context in the request body.
-Example request:
+Example request using a personal access token:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" \
--upload-file path/to/file.txt \
- "https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt"
+ "https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt?status=hidden"
+```
+
+Example response:
+
+```json
+{
+ "message":"201 Created"
+}
+```
+
+Example request using a deploy token:
+
+```shell
+curl --header "DEPLOY-TOKEN: <deploy_token>" \
+ --upload-file path/to/file.txt \
+ "https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt?status=hidden"
```
Example response: