Skip to main content

Link code project to a target, maximum is 20 per target

POST 

/targets/:target_id/integrations/snyk-sast/code-projects/

Only Snyk Code projects imported through an SCM integration (GitHub, GitLab, Bitbucket, Azure Repos) can be linked, because SAST/DAST correlation requires an SCM (repository) target. The project is re-resolved from the Snyk API: a project with any other origin (e.g. CLI-imported) is rejected with a 400 whose body is {"project_id": ["Only Snyk Code projects imported through an SCM integration (GitHub, GitLab, Bitbucket, Azure Repos) can be linked for correlation."]}; a project_id not found in org_id, or a target_id that does not belong to the project, is rejected with a 400 on that field; and a Snyk API failure is a 400 under non_field_errors.

Request​

Responses​