runners.md 1.2 KB
Newer Older
D
Douwe Maan 已提交
1 2 3 4 5 6 7 8
# Runners API

## Runners

### Retrieve all runners

__Authentication is done by GitLab user token & GitLab url__

R
Robert Schilling 已提交
9
Used to get information about all runners registered on the GitLab CI
D
Douwe Maan 已提交
10 11
instance.

12
    GET /ci/runners
D
Douwe Maan 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

Returns:

```json
[
  {
    "id" : 85,
    "token" : "12b68e90394084703135"
  },
  {
    "id" : 86,
    "token" : "76bf894e969364709864"
  },
]
```

### Register a new runner


__Authentication is done with a Shared runner registration token or a project Specific runner registration token__

R
Robert Schilling 已提交
34
Used to make GitLab CI aware of available runners.
D
Douwe Maan 已提交
35

36
    POST /ci/runners/register
D
Douwe Maan 已提交
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

Parameters:

  * `token` (required) - The registration token. It is 2 types of token you can pass here. 

1. Shared runner registration token
2. Project specific registration token

Returns:

```json
{
  "id" : 85,
  "token" : "12b68e90394084703135"
}
```

### Delete a runner


__Authentication is done by runner token__

Used to removing runners.

61
    DELETE /ci/runners/delete
D
Douwe Maan 已提交
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77

Parameters:

  * `token` (required) - The runner token.

Returns:

```json
{
  "id" : 1,
  "token" : "d14963981a428f70121777e50643d1",
  "created_at" : "2015-02-26T11:39:39.232Z",
  "updated_at" : "2015-02-26T11:39:39.232Z",
  "description" : "awesome runner"
}
```