summaryrefslogtreecommitdiff
path: root/doc/api/deploy_tokens.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/deploy_tokens.md')
-rw-r--r--doc/api/deploy_tokens.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/api/deploy_tokens.md b/doc/api/deploy_tokens.md
index e1372f714fa..c5c88619aa6 100644
--- a/doc/api/deploy_tokens.md
+++ b/doc/api/deploy_tokens.md
@@ -2,6 +2,8 @@
## List all deploy tokens
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/21811) in GitLab 12.9.
+
Get a list of all deploy tokens across the GitLab instance. This endpoint requires admin access.
```plaintext
@@ -37,6 +39,8 @@ Project deploy token API endpoints require project maintainer access or higher.
### List project deploy tokens
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/21811) in GitLab 12.9.
+
Get a list of a project's deploy tokens.
```plaintext
@@ -113,8 +117,49 @@ Example response:
These endpoints require group maintainer access or higher.
+### List group deploy deploy tokens
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/21811) in GitLab 12.9.
+
+Get a list of a group's deploy tokens
+
+```
+GET /groups/:id/deploy_tokens
+```
+
+Parameters:
+
+| Attribute | Type | Required | Description |
+|:---------------|:---------------|:---------|:-----------------------------------------------------------------------------|
+| `id` | integer/string | yes | ID or [URL-encoded path of the project](README.md#namespaced-path-encoding). |
+
+Example request:
+
+```shell
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/deploy_tokens"
+```
+
+Example response:
+
+```json
+[
+ {
+ "id": 1,
+ "name": "MyToken",
+ "username": "gitlab+deploy-token-1",
+ "expires_at": "2020-02-14T00:00:00.000Z",
+ "scopes": [
+ "read_repository",
+ "read_registry"
+ ]
+ }
+]
+```
+
### Delete a group deploy token
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/21811) in GitLab 12.9.
+
Removes a deploy token from the group.
```