Projects

Connect a project to a GitHub repository

The org is orgId in the path. Connects the project to a repository in the organization's GitHub account, through the organization's Spice Cloud GitHub App installation. The next deployment reads spicepod.yaml (or spicepod.yml) from root_directory on production_branch. Connecting sets the project description to the repository description. Connecting again replaces the repository, root directory and production branch. Requires apps:write.

put/v1/orgs/{orgId}/projects/{projectId}/repository

Request

  • Base URL
    https://api.spice.ai
  • Auth
    HTTP bearer

Path parameters

orgIdinteger required

The org id from GET /v1/orgs

projectIdinteger required

The ID of the project to connect

Headers

X-Org-Namestring

When present, X-Org-Name must name the same org as orgId. Otherwise the request returns org_path_mismatch (400).

Request body

repositorystring required

Repository in the organization's GitHub account, as name or owner/name. The owner must be the organization's GitHub account.

root_directorystring nullable

Directory inside the repository that contains spicepod.yaml. Omit it, or send null or an empty string, for the repository root.

production_branchstring

Branch that deployments read. Defaults to the repository's default branch. A branch that GitHub renamed is stored under its new name.

Example request

{
  "repository": "cookbook",
  "root_directory": "cayenne",
  "production_branch": "trunk"
}

Response

Project connected

project_idinteger required

The project ID

repositorystring required

The repository as owner/name

repository_idinteger required

The GitHub repository ID

root_directorystring nullable required

The stored root directory. Null is the repository root.

production_branchstring required

The branch that deployments read

connected_atstring date-time required

When the project was connected

has_spicepodboolean required

True when spicepod.yaml or spicepod.yml exists in the root directory on the production branch. A deployment fails until it does.

Changes

No recorded changes to this operation across all 1 revision of this API.