Skip to content
Coritan Docs

Organization API: Organization deployments: Hooks

The 3 Organization API operations for hooks.

View as Markdown

Part of Organization deployments.

GET /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/hooks

The deployment's deploy hooks, oldest first: each one's name, the branch it builds, the environment a call releases to (production for the production branch, preview for another) and when it was made and last called. Never an address: that is answered once, when the hook is made.

Name In Type Required
deployment_uuid path string (uuid) yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/hooks

Make a deploy hook: an address that builds branch (the production branch when left out) each time it is sent a POST. url is in this answer only, since only a hash of it is kept; a lost one is replaced by deleting the hook and making another. A hook of another branch makes previews, so it answers 402 or 409 when called while previews are unavailable. 409 for a deployment not built from a repository (not_git), a name the deployment already uses (name_taken) or more than 20 hooks (limit).

Name In Type Required
deployment_uuid path string (uuid) yes
org_slug path string yes

application/json (required)

Field Type Required Description
name string yes
branch string or null no The branch it builds; the production branch when left out
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/hooks/{hook_id}

Delete a deploy hook. Its address stops answering at once; a release it already started carries on. 404 for a hook the deployment does not have.

Name In Type Required
deployment_uuid path string (uuid) yes
hook_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.