summaryrefslogtreecommitdiff
path: root/doc/api/runners.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-23 03:17:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-23 03:17:13 +0000
commita9fa13e4ba46e00081cec1f3af332edcd1520785 (patch)
tree1d3bca7bd91d7b121633cd3536c0d31031fdb7e6 /doc/api/runners.md
parent6adb784bf2839a2b8a73de5602cbfe617836526c (diff)
downloadgitlab-ce-a9fa13e4ba46e00081cec1f3af332edcd1520785.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/runners.md')
-rw-r--r--doc/api/runners.md32
1 files changed, 29 insertions, 3 deletions
diff --git a/doc/api/runners.md b/doc/api/runners.md
index 393236cd425..ac35ddb2ae3 100644
--- a/doc/api/runners.md
+++ b/doc/api/runners.md
@@ -15,7 +15,7 @@ There are two tokens to take into account when connecting a runner with GitLab.
| Token | Description |
| ----- | ----------- |
| Registration token | Token used to [register the runner](https://docs.gitlab.com/runner/register/). It can be [obtained through GitLab](../ci/runners/index.md). |
-| Authentication token | Token used to authenticate the runner with the GitLab instance. It is obtained automatically when you [register a runner](https://docs.gitlab.com/runner/register/) or by the Runner API when you manually [register a runner](#register-a-new-runner) or [reset the authentication token](#reset-runners-authentication-token). |
+| Authentication token | Token used to authenticate the runner with the GitLab instance. It is obtained automatically when you [register a runner](https://docs.gitlab.com/runner/register/) or by the Runner API when you manually [register a runner](#register-a-new-runner) or [reset the authentication token](#reset-runners-authentication-token-by-using-the-runner-id). |
Here's an example of how the two tokens are used in runner registration:
@@ -799,9 +799,9 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/groups/9/runners/reset_registration_token"
```
-## Reset runner's authentication token
+## Reset runner's authentication token by using the runner ID
-Resets the runner's authentication token.
+Resets the runner's authentication token by using its runner ID.
```plaintext
POST /runners/:id/reset_authentication_token
@@ -824,3 +824,29 @@ Example response:
"token_expires_at": "2021-09-27T21:05:03.203Z"
}
```
+
+## Reset runner's authentication token by using the current token
+
+Resets the runner's authentication token by using the current token's value as an input.
+
+```plaintext
+POST /runners/reset_authentication_token
+```
+
+| Attribute | Type | Required | Description |
+|-----------|---------|----------|---------------------------------|
+| `token` | string | yes | The current token of the runner |
+
+```shell
+curl --request POST --form "token=<current token>" \
+ "https://gitlab.example.com/api/v4/runners/reset_authentication_token"
+```
+
+Example response:
+
+```json
+{
+ "token": "6337ff461c94fd3fa32ba3b1ff4125",
+ "token_expires_at": "2021-09-27T21:05:03.203Z"
+}
+```