http://droneServer/api/repos/:repo/:name
POST
header:
[{“key”:“Authorization”,“value”:“eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoiaHRmYW5nIiwidHlwZSI6InVzZXIifQ.Q6RSRZEYeOgb5l65D88vUQ_ejY_trifvm6ijun2kTSo”,“description”:""}]
I want to set repo hook by drone API, not through drone UI, Our system want to integrate drone, but you know the drone API reference document is not complete。 So I want to know how to set it。Now I solved this problem.
When in doubt, the best way to learn about an API endpoint is to the look at the official Go client. For example, here is the method that activates a repository: