- 등록 및 인증 토큰
- 소유한 러너 디렉터리
- 모든 러너 디렉터리
- 러너 세부 정보 가져오기
- 러너 세부 정보 업데이트
- 러너에 의해 처리된 작업 디렉터리
- 프로젝트의 러너 디렉터리
- 프로젝트에서 러너 활성화
- 프로젝트에서 러너 비활성화
- 그룹의 러너 디렉터리
- 인스턴스 러너 생성
- 러너 삭제
- 등록된 러너의 인증 확인
- 인스턴스의 러너 등록 토큰 재설정
- 프로젝트의 러너 등록 토큰 재설정
- 그룹의 러너 등록 토큰 재설정
- 러너 ID를 사용하여 러너의 인증 토큰 재설정
- 현재 토큰의 값을 사용하여 러너의 인증 토큰 재설정
Runners API
이 페이지에서는 인스턴스에 등록된 러너를 위한 엔드포인트에 대해 설명합니다. 현재 사용자에 연결된 러너를 만들려면 러너 생성을 참조하세요.
페이지네이션은 다음 API 엔드포인트에서 사용할 수 있습니다(기본적으로 20개 항목을 반환합니다):
GET /runners
GET /runners/all
GET /runners/:id/jobs
GET /runners/:id/managers/:system_id/jobs
GET /projects/:id/runners
GET /groups/:id/runners
등록 및 인증 토큰
GitLab과 러너를 연결할 때 고려해야 할 두 가지 토큰이 있습니다.
토큰 | 설명 |
---|---|
등록 토큰 | 러너를 등록하는 데 사용되는 토큰으로 GitLab을 통해 얻을 수 있습니다. |
인증 토큰 | GitLab 인스턴스와 러너를 인증하는 데 사용되는 토큰입니다. 러너를 매뉴얼으로 등록하거나 인증 토큰을 재설정할 때 또는 러너 생성 API 메서드를 사용하여 인증 토큰을 얻을 수 있습니다. |
다음은 러너 등록 시 두 개의 토큰을 사용하는 예시입니다:
- 등록 토큰을 사용하여 GitLab API를 통해 러너를 등록하면 인증 토큰이 반환됩니다.
-
해당 인증 토큰을 사용하여 러너 구성 파일에 추가합니다:
[[runners]] token = "<인증_토큰>"
그럼으로써 GitLab과 러너가 연결됩니다.
소유한 러너 디렉터리
사용자에게 사용 가능한 러너 디렉터리을 가져옵니다.
GET /runners
GET /runners?scope=active
GET /runners?type=project_type
GET /runners?status=online
GET /runners?paused=true
GET /runners?tag_list=tag1,tag2
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
scope
| 문자열 | 아니오 | 사용하지 않음: 대신 type 또는 status 를 사용하세요. 반환할 러너의 범위 중 하나: active , paused , online 및 offline ; 제공되지 않으면 모든 러너 표시
|
type
| 문자열 | 아니오 | 반환할 러너 종류 중 하나: instance_type , group_type , project_type
|
status
| 문자열 | 아니오 | 반환할 러너 상태 중 하나: online , offline , stale , never_contacted . active 및 paused 는 GitLab 14.8에서 사용 중단되었으며 REST API의 향후 버전에서 제거될 예정입니다.
|
paused
| 부울 | 아니오 | 새 작업을 수락하거나 무시하는 러너만 포함할지 여부 |
tag_list
| 문자열 배열 | 아니오 | 러너 태그 디렉터리 |
version_prefix
| 문자열 | 아니오 | 반환할 러너 버전의 접두사입니다. 예: 15.0 , 14 , 16.1.241
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners"
참조:
status
쿼리 파라미터에서 active
및 paused
값은 GitLab 14.8에서 사용 중단되었습니다.
그리고 REST API의 향후 버전에서 제거될 예정입니다. 이들은 paused
쿼리 파라미터로 대체되었습니다.
참조:
응답의 active
속성은 GitLab 14.8에서 사용 중단되었습니다.
그리고 REST API의 향후 버전에서 제거될 예정입니다. paused
속성으로 대체되었습니다.
예시 응답:
[
{
"active": true,
"paused": false,
"description": "test-1-20150125",
"id": 6,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "project_type",
"name": null,
"online": true,
"status": "online"
},
{
"active": true,
"paused": false,
"description": "test-2-20150125",
"id": 8,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "group_type",
"name": null,
"online": false,
"status": "offline"
}
]
모든 러너 디렉터리
GitLab 인스턴스의 모든 러너 디렉터리(프로젝트 및 공유)을 가져옵니다. 관리자 액세스 권한이 있는 사용자만 액세스할 수 있습니다.
GET /runners/all
GET /runners/all?scope=online
GET /runners/all?type=project_type
GET /runners/all?status=online
GET /runners/all?paused=true
GET /runners/all?tag_list=tag1,tag2
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
scope
| 문자열 | 아니오 | 사용하지 않음: 대신 type 또는 status 를 사용하세요. 반환할 러너의 범위 중 하나: specific , shared , active , paused , online 및 offline ; 제공되지 않으면 모든 러너 표시
|
type
| 문자열 | 아니오 | 반환할 러너 종류 중 하나: instance_type , group_type , project_type
|
status
| 문자열 | 아니오 | 반환할 러너 상태 중 하나: online , offline , stale , never_contacted . active 및 paused 는 GitLab 14.8에서 사용 중단되었으며 REST API의 향후 버전에서 제거될 예정입니다.
|
paused
| 부울 | 아니오 | 새 작업을 수락하거나 무시하는 러너만 포함할지 여부 |
tag_list
| 문자열 배열 | 아니오 | 러너 태그 디렉터리 |
version_prefix
| 문자열 | 아니오 | 반환할 러너 버전의 접두사입니다. 예: 15.0 , 14 , 16.1.241
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/all"
참조:
status
쿼리 파라미터에서 active
및 paused
값은 GitLab 14.8에서 사용 중단되었습니다.
그리고 REST API의 향후 버전에서 제거될 예정입니다. 이들은 paused
쿼리 파라미터로 대체되었습니다.
참조:
응답의 active
속성은 GitLab 14.8에서 사용 중단되었습니다.
그리고 REST API의 향후 버전에서 제거될 예정입니다. paused
속성으로 대체되었습니다.
예시 응답:
[
{
"active": true,
"paused": false,
"description": "shared-runner-1",
"id": 1,
"ip_address": "127.0.0.1",
"is_shared": true,
"runner_type": "instance_type",
"name": null,
"online": true,
"status": "online"
},
{
"active": true,
"paused": false,
"description": "shared-runner-2",
"id": 3,
"ip_address": "127.0.0.1",
"is_shared": true,
"runner_type": "instance_type",
"name": null,
"online": false,
"status": "offline"
},
{
"active": true,
"paused": false,
"description": "test-1-20150125",
"id": 6,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "project_type",
"name": null,
"online": true,
"status": "paused"
},
{
"active": true,
"paused": false,
"description": "test-2-20150125",
"id": 8,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "group_type",
"name": null,
"online": false,
"status": "offline"
}
]
첫 번째 20개의 러너 이상을 보려면 페이지네이션을 사용하세요.
러너 세부 정보 가져오기
러너의 세부 정보를 가져옵니다.
프로젝트 및 그룹 레벨에서 러너 세부 정보를 가져오려면 적어도 유지자(Maintainer) 역할이 필요합니다.
이 엔드포인트를 통한 인스턴스 레벨의 러너 세부 정보는 모든 인증된 사용자에게 제공됩니다.
GET /runners/:id
속성 | 유형 | 필수여부 | 설명 |
---|---|---|---|
id
| 정수 | 예 | 러너의 ID |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6"
예시 응답:
{
"active": true,
"paused": false,
"architecture": null,
"description": "test-1-20150125",
"id": 6,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "project_type",
"contacted_at": "2016-01-25T16:39:48.066Z",
"maintenance_note": null,
"name": null,
"online": true,
"status": "online",
"platform": null,
"projects": [
{
"id": 1,
"name": "GitLab Community Edition",
"name_with_namespace": "GitLab.org / GitLab Community Edition",
"path": "gitlab-foss",
"path_with_namespace": "gitlab-org/gitlab-foss"
}
],
"revision": null,
"tag_list": [
"ruby",
"mysql"
],
"version": null,
"access_level": "ref_protected",
"maximum_timeout": 3600
}
러너 세부 정보 업데이트
러너의 세부 정보를 업데이트합니다.
PUT /runners/:id
속성 | 유형 | 필수여부 | 설명 |
---|---|---|---|
id
| 정수 | 예 | 러너의 ID |
description
| 문자열 | 아니요 | 러너의 설명 |
active
| 부울 | 아니요 | 폐기됨: 대신 paused 사용. 러너가 작업을 수신할 수 있는지를 나타내는 플래그
|
paused
| 부울 | 아니요 | 러너가 새 작업을 무시해야 하는지를 지정함 |
tag_list
| 배열 | 아니요 | 러너의 태그 디렉터리 |
run_untagged
| 부울 | 아니요 | 러너가 태그되지 않은 작업을 실행할 수 있는지를 나타냄 |
locked
| 부울 | 아니요 | 러너가 잠겨 있는지를 나타냄 |
access_level
| 문자열 | 아니요 | 러너의 액세스 레벨; not_protected 또는 ref_protected
|
maximum_timeout
| 정수 | 아니요 | 러너가 작업을 실행할 수 있는 시간(초 단위)을 제한하는 최대 시간 |
maintenance_note
| 문자열 | 아니요 | 러너의 자유 형식의 유지 관리 노트(1024자) |
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6" \
--form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
예시 응답:
{
"active": true,
"architecture": null,
"description": "test-1-20150125-test",
"id": 6,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "group_type",
"contacted_at": "2016-01-25T16:39:48.066Z",
"maintenance_note": null,
"name": null,
"online": true,
"status": "online",
"platform": null,
"projects": [
{
"id": 1,
"name": "GitLab Community Edition",
"name_with_namespace": "GitLab.org / GitLab Community Edition",
"path": "gitlab-foss",
"path_with_namespace": "gitlab-org/gitlab-foss"
}
],
"revision": null,
"tag_list": [
"ruby",
"mysql",
"tag1",
"tag2"
],
"version": null,
"access_level": "ref_protected",
"maximum_timeout": null
}
러너 일시 정지
러너를 일시 정지합니다.
PUT --form "paused=true" /runners/:runner_id
# --또는--
# 폐기됨: 16.0에서 제거 예정
PUT --form "active=false" /runners/:runner_id
속성 | 유형 | 필수여부 | 설명 |
---|---|---|---|
runner_id
| 정수 | 예 | 러너의 ID |
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
--form "paused=true" "https://gitlab.example.com/api/v4/runners/6"
# --또는--
# 폐기됨: 16.0에서 제거 예정
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
--form "active=false" "https://gitlab.example.com/api/v4/runners/6"
러너에 의해 처리된 작업 디렉터리
- GitLab 10.3에 도입되었습니다.
지정된 러너에 의해 처리되고 있는 또는 처리된 작업 디렉터리을 나열합니다. 작업 디렉터리은 사용자가 적어도 Reporter 역할을 가진 프로젝트로 제한됩니다.
GET /runners/:id/jobs
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| integer | yes | 러너의 ID |
system_id
| string | no | 러너 관리자가 실행 중인 머신의 시스템 ID |
status
| string | no | 작업 상태; 다음 중 하나: running , success , failed , canceled
|
order_by
| string | no | 작업을 id 로 정렬
|
sort
| string | no | 작업을 asc 또는 desc 순서로 정렬 (기본값: desc ). sort 가 지정된 경우, order_by 도 지정되어야 합니다.
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/1/jobs?status=running"
예시 응답:
[
{
"id": 2,
"status": "running",
"stage": "test",
"name": "test",
"ref": "main",
"tag": false,
"coverage": null,
"created_at": "2017-11-16T08:50:29.000Z",
"started_at": "2017-11-16T08:51:29.000Z",
"finished_at": "2017-11-16T08:53:29.000Z",
"duration": 120,
"queued_duration": 2,
"user": {
"id": 1,
"name": "John Doe2",
"username": "user2",
"state": "active",
"avatar_url": "http://www.gravatar.com/avatar/c922747a93b40d1ea88262bf1aebee62?s=80&d=identicon",
"web_url": "http://localhost/user2",
"created_at": "2017-11-16T18:38:46.000Z",
"bio": null,
"location": null,
"public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
"website_url": "",
"organization": null
},
"commit": {
"id": "97de212e80737a608d939f648d959671fb0a0142",
"short_id": "97de212e",
"title": "Update configuration\r",
"created_at": "2017-11-16T08:50:28.000Z",
"parent_ids": [
"1b12f15a11fc6e62177bef08f47bc7b5ce50b141",
"498214de67004b1da3d820901307bed2a68a8ef6"
],
"message": "See merge request !123",
"author_name": "John Doe2",
"author_email": "user2@example.org",
"authored_date": "2017-11-16T08:50:27.000Z",
"committer_name": "John Doe2",
"committer_email": "user2@example.org",
"committed_date": "2017-11-16T08:50:27.000Z"
},
"pipeline": {
"id": 2,
"sha": "97de212e80737a608d939f648d959671fb0a0142",
"ref": "main",
"status": "running"
},
"project": {
"id": 1,
"description": null,
"name": "project1",
"name_with_namespace": "John Doe2 / project1",
"path": "project1",
"path_with_namespace": "namespace1/project1",
"created_at": "2017-11-16T18:38:46.620Z"
}
}
]
프로젝트의 러너 디렉터리
프로젝트에서 사용 가능한 모든 러너를 나열합니다. 이는 조상 그룹 및 허용된 공유 러너로부터 가져옵니다.
GET /projects/:id/runners
GET /projects/:id/runners?scope=active
GET /projects/:id/runners?type=project_type
GET /projects/:id/runners/all?status=online
GET /projects/:id/runners/all?paused=true
GET /projects/:id/runners?tag_list=tag1,tag2
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| integer/string | yes | 인증된 사용자가 소유한 프로젝트의 ID 또는 URL 인코딩된 경로 |
scope
| string | no | 사용할 러너의 범위; active , paused , online , offline 중 하나를 반환합니다. 제공되지 않으면 모든 러너를 표시합니다 (사용 중인 러너가 없는 경우)
|
type
| string | no | 반환할 러너의 유형; instance_type , group_type , project_type 중 하나
|
status
| string | no | 반환할 러너의 상태; online , offline , stale , never_contacted 중 하나. active 및 paused 는 GitLab 14.8에서 사용 중단되었으며 REST API의 향후 버전에서 제거될 예정입니다
|
paused
| boolean | no | 새 작업을 수락하거나 무시하는 러너 만 포함할지 여부 |
tag_list
| string array | no | 러너 태그의 디렉터리 |
version_prefix
| string | no | 반환할 러너 버전의 접두사입니다. 예를 들어 15.0 , 14 , 16.1.241
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners"
예시 응답:
[
{
"active": true,
"paused": false,
"description": "test-2-20150125",
"id": 8,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "project_type",
"name": null,
"online": false,
"status": "offline"
},
{
"active": true,
"paused": false,
"description": "development_runner",
"id": 5,
"ip_address": "127.0.0.1",
"is_shared": true,
"runner_type": "instance_type",
"name": null,
"online": true,
"status": "online"
}
]
프로젝트에서 러너 활성화
프로젝트에서 사용 가능한 프로젝트 러너를 활성화합니다.
POST /projects/:id/runners
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
id
| 정수/문자열 | 예 | 인증된 사용자가 소유한 프로젝트의 ID 또는 URL 인코딩된 경로 |
runner_id
| 정수 | 예 | 러너의 ID |
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners" \
--form "runner_id=9"
응답 예시:
{
"active": true,
"description": "test-2016-02-01",
"id": 9,
"ip_address": "127.0.0.1",
"is_shared": false,
"runner_type": "project_type",
"name": null,
"online": true,
"status": "online"
}
프로젝트에서 러너 비활성화
프로젝트에서 프로젝트 러너를 비활성화합니다. 프로젝트가 지정된 러너와 연결된 유일한 프로젝트가 아닌 경우에만 작동합니다. 그렇지 않으면 오류가 반환됩니다. 대신 러너 삭제를 호출하십시오.
DELETE /projects/:id/runners/:runner_id
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
id
| 정수/문자열 | 예 | 인증된 사용자가 소유한 프로젝트의 ID 또는 URL 인코딩된 경로 |
runner_id
| 정수 | 예 | 러너의 ID |
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners/9"
그룹의 러너 디렉터리
그룹과 해당 상위 그룹에서 사용 가능한 모든 러너 및 허용된 공유 러너를 나열합니다.
GET /groups/:id/runners
GET /groups/:id/runners?type=group_type
GET /groups/:id/runners/all?status=online
GET /groups/:id/runners/all?paused=true
GET /groups/:id/runners?tag_list=tag1,tag2
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
id
| 정수 | 예 | 인증된 사용자가 소유한 그룹의 ID |
type
| 문자열 | 아니오 | 반환할 러너 유형 중 하나: instance_type , group_type , project_type . project_type 값은 deprecated되었으며 GitLab 15.0에서 제거될 예정입니다
|
status
| 문자열 | 아니오 | 반환할 러너의 상태 중 하나: online , offline , stale , never_contacted . active 및 paused 는 가능한 값으로, GitLab 14.8에서 사용 중단되었으며 REST API의 향후 버전에서 제거될 예정입니다
|
paused
| 부울 | 아니오 | 새 작업을 수락하거나 무시하는 러너만 포함할지 여부 |
tag_list
| 문자열 배열 | 아니오 | 러너 태그 디렉터리 |
version_prefix
| 문자열 | 아니오 | 반환할 러너 버전의 접두사. 예: 15.0 , 14 , 16.1.241
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/9/runners"
active
및 paused
값은 GitLab 14.8에서 사용 중단되었으며 REST API의 향후 버전에서 제거될 예정입니다. 이들은 paused
쿼리 매개변수로 대체되었습니다.응답 예시:
[
{
"id": 3,
"description": "Shared",
"ip_address": "127.0.0.1",
"active": true,
"paused": false,
"is_shared": true,
"runner_type": "instance_type",
"name": "gitlab-runner",
"online": null,
"status": "never_contacted"
},
{
"id": 6,
"description": "Test",
"ip_address": "127.0.0.1",
"active": true,
"paused": false,
"is_shared": true,
"runner_type": "instance_type",
"name": "gitlab-runner",
"online": false,
"status": "offline"
},
{
"id": 8,
"description": "Test 2",
"ip_address": "127.0.0.1",
"active": true,
"paused": false,
"is_shared": false,
"runner_type": "group_type",
"name": "gitlab-runner",
"online": null,
"status": "never_contacted"
}
]
인스턴스 러너 생성
인스턴스용 러너를 생성합니다.
POST /runners
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
token
| 문자열 | 예 | 등록 토큰 |
description
| 문자열 | 아니오 | 러너 설명 |
info
| 해시 | 아니오 | 러너 메타데이터. ‘이름’, ‘버전’, ‘리비전’, ‘플랫폼’, ‘아키텍처’를 포함할 수 있지만 UI의 Admin 영역에 표시되는 것은 ‘버전’, ‘플랫폼’, ‘아키텍처’뿐입니다 |
active
| 부울 | 아니오 | 사용 중인 러너가 새 작업을 받을 수 있는지 여부를 지정합니다. [Deprecated]: 대신 paused 를 사용하십시오.
|
paused
| 부울 | 아니오 | 러너가 새 작업을 무시해야 하는지 여부를 지정합니다. |
locked
| 부울 | 아니오 | 현재 프로젝트에 대해 러너가 잠긴 상태여야 하는지 여부를 지정합니다. |
run_untagged
| 부울 | 아니오 | 러너가 태그되지 않은 작업을 처리해야 하는지 여부를 지정합니다. |
tag_list
| 문자열 배열 | 아니오 | 러너 태그 디렉터리 |
access_level
| 문자열 | 아니오 | 러너의 액세스 수준: not_protected 또는 ref_protected
|
maximum_timeout
| 정수 | 아니오 | 러너가 작업을 실행하는 데 제한되는 최대 시간(초)을 제한합니다. |
maintainer_note
| 문자열 | 아니오 |
Deprecated; maintenance_note 참조
|
maintenance_note
| 문자열 | 아니오 | 러너에 대한 자유 형식의 유지 관리 노트(1024자) |
curl --request POST "https://gitlab.example.com/api/v4/runners" \
--form "token=<registration_token>" --form "description=test-1-20150125-test" \
--form "tag_list=ruby,mysql,tag1,tag2"
응답:
상태 | 설명 |
---|---|
201 | 러너가 생성되었습니다 |
403 | 러너 등록 토큰이 잘못되었습니다 |
410 | 러너 등록이 비활성화되었습니다 |
응답 예시:
{
"id": 12345,
"token": "6337ff461c94fd3fa32ba3b1ff4125",
"token_expires_at": "2021-09-27T21:05:03.203Z"
}
러너 삭제
러너를 삭제하는 두 가지 방법이 있습니다.
- 러너 ID를 지정하는 방법.
- 러너의 인증 토큰을 지정하는 방법.
ID별 러너 삭제
러너 ID를 사용하여 러너를 삭제하려면 액세스 토큰과 러너 ID를 사용하세요.
DELETE /runners/:id
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| integer | yes | 러너 ID. ID는 UI의 설정 > CI/CD에 표시됩니다. 러너를 확장하고, 러너 제거 버튼 아래에 예를 들어 #6 이라고 표시된 ID가 있습니다.
|
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6"
인증 토큰별 러너 삭제
러너의 인증 토큰을 사용하여 러너를 삭제하려면:
DELETE /runners
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
token
| string | yes | 러너의 인증 토큰. |
curl --request DELETE "https://gitlab.example.com/api/v4/runners" \
--form "token=<authentication_token>"
응답:
상태 | 설명 |
---|---|
204 | 러너가 삭제되었습니다 |
등록된 러너의 인증 확인
등록된 러너의 인증 자격 증명을 확인합니다.
POST /runners/verify
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
token
| string | yes | 러너의 인증 토큰. |
system_id
| string | no | 러너의 시스템 식별자. token 이 glrt- 로 시작하는 경우 이 속성이 필요합니다.
|
curl --request POST "https://gitlab.example.com/api/v4/runners/verify" \
--form "token=<authentication_token>"
응답:
상태 | 설명 |
---|---|
200 | 자격 증명이 유효합니다 |
403 | 자격 증명이 유효하지 않습니다 |
예시 응답:
{
"id": 12345,
"token": "glrt-6337ff461c94fd3fa32ba3b1ff4125",
"token_expires_at": "2021-09-27T21:05:03.203Z"
}
인스턴스의 러너 등록 토큰 재설정
- GitLab 14.3에서 도입되었습니다.
reset_registration_token
엔드포인트는 작동하지 않습니다.GitLab 인스턴스의 러너 등록 토큰을 재설정합니다.
POST /runners/reset_registration_token
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/runners/reset_registration_token"
프로젝트의 러너 등록 토큰 재설정
- GitLab 14.3에서 도입되었습니다.
reset_registration_token
엔드포인트는 작동하지 않습니다.프로젝트의 러너 등록 토큰을 재설정합니다.
POST /projects/:id/runners/reset_registration_token
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/projects/9/runners/reset_registration_token"
그룹의 러너 등록 토큰 재설정
- GitLab 14.3에서 도입되었습니다.
reset_registration_token
엔드포인트는 작동하지 않습니다.그룹의 러너 등록 토큰을 재설정합니다.
POST /groups/:id/runners/reset_registration_token
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/groups/9/runners/reset_registration_token"
러너 ID를 사용하여 러너의 인증 토큰 재설정
러너 ID를 사용하여 러너의 인증 토큰을 재설정합니다.
POST /runners/:id/reset_authentication_token
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
id
| integer | yes | 러너 ID |
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
"https://gitlab.example.com/api/v4/runners/1/reset_authentication_token"
예시 응답:
{
"token": "6337ff461c94fd3fa32ba3b1ff4125",
"token_expires_at": "2021-09-27T21:05:03.203Z"
}
현재 토큰의 값을 사용하여 러너의 인증 토큰 재설정
현재 토큰의 값을 입력으로 사용하여 러너의 인증 토큰을 재설정합니다.
POST /runners/reset_authentication_token
속성 | 유형 | 필수 여부 | 설명 |
---|---|---|---|
token
| string | yes | 러너의 인증 토큰 |
curl --request POST --form "token=<current token>" \
"https://gitlab.example.com/api/v4/runners/reset_authentication_token"
예시 응답:
{
"token": "6337ff461c94fd3fa32ba3b1ff4125",
"token_expires_at": "2021-09-27T21:05:03.203Z"
}