ReferenceAPI overview
Deploy hooks
A request to the secret deploy hook URL of a service puts a deploy in the queue.
curl -X POST "http://127.0.0.1:7878/hooks/deploy/srv-60f5973b037e4478ae7b?key=<key>"Each service has a secret deploy hook URL. A request to it puts in the queue a deploy of the source in the settings of the service. The trigger is deploy_hook.
Get the URL
ferry deploy-hook show NAMEThe command prints the full URL. In the API, the field deploy_hook_path of the service has the path.
The answers
| Status | Meaning |
|---|---|
| 202 | The deploy is in the queue. The body is the deploy. Ferry hides the credentials in the URL of the repository. |
| 400 | The service has no source to deploy. |
| 401 | An unknown service id or a wrong key. The answer is the same for the two. Thus nobody can use the hook to find services. |
| 409 | The service is in the state suspended, or a delete is in progress. |
Replace the key
ferry deploy-hook rotate NAMEThe old URL stops immediately. The API has POST /api/v1/services/{id}/deploy-hook/rotate.
GETworks too, for tools that can only sendGET.- The path takes only the id of the service, because a person can guess a name.