Skip to main content
PATCH
/
api
/
v1
/
deployments
/
{deploymentSlug}
/
projects
/
{projectName}
/
managed-scan
Toggle Managed Scans for a project
curl --request PATCH \
  --url https://semgrep.dev/api/v1/deployments/{deploymentSlug}/projects/{projectName}/managed-scan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deploymentSlug": "your-deployment",
  "diff_scan": {
    "enabled": true
  },
  "full_scan": {
    "enabled": true
  },
  "projectName": "organization/project"
}
'
{
  "project": {
    "id": 1234567,
    "name": "returntocorp/semgrep",
    "tags": [
      "tag"
    ],
    "created_at": "2020-11-18T23:28:12.391Z",
    "default_branch": "refs/heads/main",
    "latest_scan_at": "2023-01-13T20:51:51.449Z",
    "managed_scan_config": {
      "diff_scan": {
        "enabled": true
      },
      "full_scan": {
        "enabled": true
      }
    },
    "primary_branch": "refs/heads/custom-main",
    "url": "https://github.com/returntocorp/semgrep"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.semgrep.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Get access to data with your API token. Example header:

Authorization: Bearer 2991e2fb4b540fe75b8f90677b0b892b6314e4961cb001fe6eb452eee248a628

The token can be provisioned from the Tokens section in your Settings, and requires explicitly enabling Web API access.

Path Parameters

deploymentSlug
string
required

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

Example:

"your-deployment"

projectName
string
required

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

Example:

"organization/project"

Body

application/json
deploymentSlug
string

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

Example:

"your-deployment"

diff_scan
object
full_scan
object
projectName
string

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

Example:

"organization/project"

Response

200 - application/json

OK

Successfully updated managed scan settings for project.

project
Project · object

A project in your organization that uses Semgrep.