Can't add project hook via API
Created by: jproffitt
I can't seem to add or update project web hooks through the API.
This is the request:
POST { url }/api/v3/projects/146/hooks HTTP/1.1
PRIVATE-TOKEN: { token }
url=http%3A%2F%2Fwww.google.com&
And the response:
304 Not Modified
Content-Type: application/json
Content-Length: 205
[
{
"id":57,"url":"{ original url - not google.com }",
"created_at":"2013-12-12T18:10:36.387Z",
"project_id":146,
"push_events":true,
"issues_events":false,
"merge_requests_events":false
}
]
If I look in the gitlab interface, there is no google.com hook.
If I were to do a PUT request to update that existing web hook, I get a 400 bad request response.
Its almost like its doing the same behavior of a GET request rather than a POST. It just returns a list of web hooks, rather than creating a new one.
Am I doing something wrong, or is this a bug? I am using pyapi-gitlab (https://github.com/Itxaka/pyapi-gitlab). Also tried manually with the chrome extension: "Advanced Rest Client".