suer / redmine_webhook

147 stars 81 forks source link

Add a Webhook via API #23

Closed zer0uno closed 5 years ago

zer0uno commented 5 years ago

Is there available an API to add a URL to a project?

I tried with the followings with the X-Redmine-API-Key header:

but I get an 422 Unprocessable Entity in the first case and a 401 Unauthorized in the second one.

suer commented 5 years ago

No, not supported.

If we want to do it, WebhookSettingsController may need accept_api_auth to accept actions.

like:

class WebhookSettingsController < ApplicationController
  accept_api_auth :create, :update, :destroy
suer commented 5 years ago

I added API access feature at 814bbba21dc71e11dde3987ed060604c9f52b519 in master branch. master branch requires Redmine 4.0 or later. If you try it with older version, you neet to cherry-pick this commit.