diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-02-02 14:52:33 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-02-19 13:18:46 +0100 |
commit | b56ee397bb5fa32e3a53fdaee3d6592f1486d7f1 (patch) | |
tree | 94fe22fd4e736442fcec3d360411e1793ffcf94d | |
parent | cd62c7470019a88cfda7c2d54a14eaf8db21e9d5 (diff) | |
download | gitlab-ce-b56ee397bb5fa32e3a53fdaee3d6592f1486d7f1.tar.gz |
Add some fixes in runners API documentation
-rw-r--r-- | doc/api/runners.md | 8 | ||||
-rw-r--r-- | lib/api/runners.rb | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/runners.md b/doc/api/runners.md index 23486de3726..3be3fd17e65 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -164,7 +164,7 @@ GET /projects/:id/runners | `id` | integer | yes | The ID of a project | ``` -curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners" +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners" ``` Example response: @@ -193,7 +193,7 @@ Example response: Enable available specific runner in project. ``` -PUT /projects/:id/runners/:runner_id +POST /projects/:id/runners/:runner_id ``` | Attribute | Type | Required | Description | @@ -202,7 +202,7 @@ PUT /projects/:id/runners/:runner_id | `runner_id` | integer | yes | The ID of a runner | ``` -curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9" +curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9" ``` Example response: @@ -223,7 +223,7 @@ Disable a specific runner from project. It works only, if the project isn't an o specified runner. If so, then an error is returned and user should use the [remove a runner](#remove-a-runner) feature. ``` -PUT /projects/:id/runners/:runner_id +DELETE /projects/:id/runners/:runner_id ``` | Attribute | Type | Required | Description | diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 799c10a1897..f4f8f2f2247 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -87,8 +87,8 @@ module API # id (required) - The ID of the project # runner_id (required) - The ID of the runner # Example Request: - # PUT /projects/:id/runners/:runner_id - put ':id/runners/:runner_id' do + # POST /projects/:id/runners/:runner_id + post ':id/runners/:runner_id' do runner = get_runner(params[:runner_id]) can_enable_runner?(runner) Ci::RunnerProject.create(runner: runner, project: user_project) |