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)