POST /accounts/{account_id}/pages/projects/{project_name}/source

Connect a Git repository source to an existing Pages project.

Servers

Path parameters

Name Type Required Description
project_name String Yes
account_id String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
config Object Yes
config.preview_branch_includes[] Array Yes

A list of branches that should trigger a preview deployment. Wildcard syntax (*) is supported. Must be used with preview_deployment_setting set to custom.

config.repo_id String Yes

The ID of the repository.

config.path_includes[] Array Yes

A list of paths that should be watched to trigger a preview deployment. Wildcard syntax (*) is supported.

config.pr_comments_enabled Boolean Yes

Whether to enable PR comments.

config.preview_branch_excludes[] Array Yes

A list of branches that should not trigger a preview deployment. Wildcard syntax (*) is supported. Must be used with preview_deployment_setting set to custom.

config.production_deployments_enabled Boolean Yes

Whether to trigger a production deployment on commits to the production branch.

config.repo_name String Yes

The name of the repository.

config.production_branch String Yes

The production branch of the repository.

config.path_excludes[] Array Yes

A list of paths that should be excluded from triggering a preview deployment. Wildcard syntax (*) is supported.

config.deployments_enabled Boolean Yes

Whether to enable automatic deployments when pushing to the source repository. When disabled, no deployments (production or preview) will be triggered automatically.

config.preview_deployment_setting String Yes

Controls whether commits to preview branches trigger a preview deployment.

Valid values:

  • "custom"
  • "none"
  • "all"
config.owner String Yes

The owner of the repository.

config.owner_id String Yes

The owner ID of the repository.

type String Yes

The source control management provider.

Valid values:

  • "github"
  • "gitlab"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.