Organization API: Organization deployments: Hooks
The 3 Organization API operations for hooks.
Part of Organization deployments.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/hooks |
List deploy hooks |
| POST | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/hooks |
Create deploy hook |
| DELETE | /api/v1/orgs/{org_slug}/deployments/{deployment_uuid}/hooks/{hook_id} |
Delete a deploy hook |
List deploy hooks
Section titled List deploy hooksGET /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.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Create deploy hook
Section titled Create deploy hookPOST /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).
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
branch |
string or null | no | The branch it builds; the production branch when left out |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Delete a deploy hook
Section titled Delete a deploy hookDELETE /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.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
deployment_uuid |
path | string (uuid) | yes |
hook_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |