How to set hook using drone API?

http://droneServer/api/repos/:repo/:name
POST
header:
[{“key”:“Authorization”,“value”:“eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoiaHRmYW5nIiwidHlwZSI6InVzZXIifQ.Q6RSRZEYeOgb5l65D88vUQ_ejY_trifvm6ijun2kTSo”,“description”:""}]

this api to set gogs webhook failed…

drone version 0.7

	repo := e.Group("/api/repos/:owner/:name")
	{
		repo.Use(session.SetRepo())
		repo.Use(session.SetPerm())
		repo.Use(session.MustPull)

		repo.POST("", session.MustRepoAdmin(), server.PostRepo)

How to use drone this API?

Sorry I’m not sure I understand the question. Can you please clarify?

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:

You should be able to use the CLI as well.

drone repo add a/b