Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /projects/:id/webhooks/validation for validating project's hook presence #42

Closed
jachro opened this issue Feb 7, 2019 · 0 comments · Fixed by #50
Closed

POST /projects/:id/webhooks/validation for validating project's hook presence #42

jachro opened this issue Feb 7, 2019 · 0 comments · Fixed by #50

Comments

@jachro
Copy link
Contributor

jachro commented Feb 7, 2019

POST /projects/:id/webhooks/validation

Validates the webhook for the project with the given project id. It succeeds (OK) if either the project is public and there's a hook for it or it's private, there's a hook for it and a Personal Access Token (PAT). If either there's no webhook or there's no PAT in case of a private project, the call results with NOT_FOUND. In case of private projects, if there's a hook created for a project but no PAT available (or the PAT doesn't work), the hook will be removed as part of the validation process.

Request format

The endpoint requires an authorization token. It has to be

  • either PRIVATE-TOKEN with user's personal access token in GitLab
  • or OAUTH-TOKEN with oauth token obtained from GitLab

Response

Status Description
OK (200) When the hook exists for the project and the project is either public or there's a Personal Access Token available for it
NOT_FOUND (404) When the hook either does not exists or there's no Personal Access Token available for it. If the hook exists but there's no PAT for it, the hook will be removed
UNAUTHORIZED (401) When there is neither PRIVATE-TOKEN nor OAUTH-TOKEN in the header or it's invalid
INTERNAL SERVER ERROR (500) When there are problems with validating the hook presence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant