From 7e9c479f7de77702622631cff2628a9c8dcbc627 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 19 Nov 2020 08:27:35 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-6-stable-ee --- doc/api/container_registry.md | 44 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'doc/api/container_registry.md') diff --git a/doc/api/container_registry.md b/doc/api/container_registry.md index 3a7ebf9a2aa..ddfe5d3f238 100644 --- a/doc/api/container_registry.md +++ b/doc/api/container_registry.md @@ -124,6 +124,48 @@ Example response: ] ``` +## Get details of a single repository + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/209916) in GitLab 13.6. + +Get details of a registry repository. + +```plaintext +GET /registry/repositories/:id +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID of the registry repository accessible by the authenticated user. | +| `tags` | boolean | no | If the parameter is included as `true`, the response includes an array of `"tags"`. | +| `tags_count` | boolean | no | If the parameter is included as `true`, the response includes `"tags_count"`. | + +```shell +curl --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/registry/repositories/2?tags=true&tags_count=true" +``` + +Example response: + +```json +{ + "id": 2, + "name": "", + "path": "group/project", + "project_id": 9, + "location": "gitlab.example.com:5000/group/project", + "created_at": "2019-01-10T13:38:57.391Z", + "cleanup_policy_started_at": "2020-08-17T03:12:35.489Z", + "tags_count": 1, + "tags": [ + { + "name": "0.0.1", + "path": "group/project:0.0.1", + "location": "gitlab.example.com:5000/group/project:0.0.1" + } + ] +} +``` + ## Delete registry repository Delete a repository in registry. @@ -238,7 +280,7 @@ This action doesn't delete blobs. To delete them and recycle disk space, Delete registry repository tags in bulk based on given criteria. -For an overview, see [Utilize the Container Registry API to delete all tags except *](https://youtu.be/Hi19bKe_xsg). +For an overview, see [Use the Container Registry API to delete all tags except *](https://youtu.be/Hi19bKe_xsg). ```plaintext DELETE /projects/:id/registry/repositories/:repository_id/tags -- cgit v1.2.1