v1

latestOpenAPI 3.0.32026-07-22238629559.2 KB
ProjectsService

Update project details

Update attributes for the project using the value passed in to the request body.

patch/api/v1/deployments/{deploymentSlug}/projects/{projectName}

Path parameters

deploymentSlugstring required

Slug of the deployment name. Can be found at /deployments, or in your Settings in the web UI.

Example:your-deployment
projectNamestring required

Name of the project, typically the repository formatted as a path.

Example:organization/project

Request body

deploymentSlugstring

Slug of the deployment name. Can be found at /deployments, or in your Settings in the web UI.

primary_branchstring

The full name of the branch you would like to set as primary. Use "None" if default_branch is known and you wish to set primary to always be the default branch.

projectNamestring

Name of the project, typically the repository formatted as a path.

tagsstring

Tags associated to this project.

Example request

{
  "deploymentSlug": "your-deployment",
  "primary_branch": "refs/heads/develop",
  "projectName": "organization/project"
}

Response

OK

Example response

{
  "project": {
    "created_at": "2020-11-18T23:28:12.391Z",
    "default_branch": "refs/heads/main",
    "id": 1234567,
    "latest_scan_at": "2023-01-13T20:51:51.449Z",
    "name": "returntocorp/semgrep",
    "primary_branch": "refs/heads/custom-main",
    "url": "https://github.com/returntocorp/semgrep"
  }
}