System hooks API

System hooks API

所有方法都需要管理员授权.

也可以使用Admin Area> System Hooks ( )中的 UI 来配置系统挂钩的 URL 端点.

阅读有关系统挂钩的更多信息.

请求示例:

    响应示例:

    1. [ { "id":1, "url":"https://gitlab.example.com/hook", "created_at":"2016-10-31T12:32:15.192Z", "push_events":true, "tag_push_events":false, "merge_requests_events": true, "repository_update_events": true, "enable_ssl_verification":true } ]

    添加一个新的系统挂钩.

    响应示例:

    1. [ { "id":1, "url":"https://gitlab.example.com/hook", "created_at":"2016-10-31T12:32:15.192Z", "push_events":true, "tag_push_events":false, "merge_requests_events": true, "repository_update_events": true, "enable_ssl_verification":true } ]

    请求示例:

    1. curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/hooks/2"

    响应示例:

      请求示例:

      1. curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/hooks/2"