Skip to content
Coritan Docs

Client API: Deployments: Git

The 4 Client API operations for git.

View as Markdown

Part of Deployments.

Method Path Summary
GET /api/v1/client/deployments/{deployment_uuid}/git Get the repository connection
PUT /api/v1/client/deployments/{deployment_uuid}/git Build the deployment from a repository one of the owner's GitHub App installations reaches
PATCH /api/v1/client/deployments/{deployment_uuid}/git Change the repository settings
DELETE /api/v1/client/deployments/{deployment_uuid}/git Stop cloning through the GitHub App

GET /api/v1/client/deployments/{deployment_uuid}/git

The deployment's repository, its branch and directory, and whether it is reached through the GitHub App (connected) or as a pasted address.

Authentication: an access token, sent as Authorization: Bearer <token>.

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

Build the deployment from a repository one of the owner's GitHub App installations reaches

Section titled Build the deployment from a repository one of the owner's GitHub App installations reaches

PUT /api/v1/client/deployments/{deployment_uuid}/git

Build the deployment from a repository one of the owner's GitHub App installations reaches. Its pasted token, if it had one, is deleted: the App clones from now on. 404 for another owner's installation, 409 while it is suspended, 422 when it cannot reach the repository. The next release builds from it.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
deployment_uuid path string (uuid) yes

application/json (required)

Field Type Required Description
installation integer yes The installation's id here (GET /git/github/installations)
repo_id integer yes GitHub's id of the repository
branch string or null no The production branch; the repository's default when left out
root_dir string or null no The app's directory in the repository
dockerfile_path string or null no Refused with 422 dockerfile_unsupported when set: Dockerfiles are not built on the platform
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Change the repository settings

Section titled Change the repository settings

PATCH /api/v1/client/deployments/{deployment_uuid}/git

Change the branch that deploys to production, the app's directory, previews, pull request comments, watch paths or the ignore command. Only what the body names changes; null clears root_dir, watch_paths and ignore_command. Turning previews on answers 402 when the plan of the account the deployment bills to does not include them (an organization's owner now, as for a push); turning it off leaves the live previews serving until they are closed.

Authentication: an access token, sent as Authorization: Bearer <token>.

Name In Type Required
deployment_uuid path string (uuid) yes

application/json (required)

Field Type Required Description
branch string or null no
root_dir string or null no null for the repository's root
previews boolean or null no Make a preview of each push to another branch and each pull request
pr_comments boolean or null no Comment each pull request's preview addresses on it
watch_paths array of string or null no null or [] builds every push
ignore_command string or null no null for none
dockerfile_path string or null no Refused with 422 dockerfile_unsupported when set: Dockerfiles are not built on the platform
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Stop cloning through the GitHub App

Section titled Stop cloning through the GitHub App

DELETE /api/v1/client/deployments/{deployment_uuid}/git

Stop cloning through the GitHub App. The deployment keeps its repository address and builds as a pasted repository would, which needs a token for a private one.

Authentication: an access token, sent as Authorization: Bearer <token>.

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