Projects (v1)
Last updated
Was this helpful?
Last updated
Was this helpful?
View Organization
View Project
Edit Project
/org/{orgId}/project/{projectId}
The organization ID the project belongs to. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID.
463c1ee5-31bc-428c-b451-b79a3270db08
The branch that this project should be monitoring
main
{"branch":"main","owner":{"id":"1acd4d09-5602-4d04-9640-045fe928aaea"}}
View Organization
View Project
View Project Snapshot
/org/{orgId}/project/{projectId}
The organization ID the project belongs to. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID.
463c1ee5-31bc-428c-b451-b79a3270db08
application/json
application/json
View Organization
View Project
Remove Project
/org/{orgId}/project/{projectId}
The organization ID the project belongs to. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID.
463c1ee5-31bc-428c-b451-b79a3270db08
application/json
application/json
No body
/org/{orgId}/project/{projectId}/tags
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID to apply the tag to
6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Alphanumeric including - and _ with a limit of 30 characters
example-tag-key
Alphanumeric including - and _ with a limit of 50 characters
example-tag-value
{"key":"example-tag-key","value":"example-tag-value"}
/org/{orgId}/project/{projectId}/tags/remove
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID to remove a tag from
6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Alphanumeric including - and _ with a limit of 30 characters
example-tag-key
Alphanumeric including - and _ with a limit of 50 characters
example-tag-value
{"key":"example-tag-key","value":"example-tag-value"}
View Organization
View Project
Edit Project
/org/{orgId}/project/{projectId}/settings
The organization ID to which the project belongs. The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID
463c1ee5-31bc-428c-b451-b79a3270db08
If set to true
, Snyk will raise dependency upgrade PRs automatically.
The age (in days) that an automatic dependency check is valid for
The limit on auto dependency upgrade PRs.
If set to true
, fail Snyk Test if the repo has any vulnerabilities. Otherwise, fail only when the PR is adding a vulnerable dependency.
If set to true
, fail Snyk Test only for high and critical severity vulnerabilities
If set to true
, Snyk Test checks PRs for vulnerabilities.:cq
assign Snyk pull requests
Defines automatic remediation policies
An array of comma-separated strings with names of dependencies you wish Snyk to ignore to upgrade.
{"autoDepUpgradeLimit":2,"autoDepUpgradeEnabled":false,"autoDepUpgradeMinAge":21,"pullRequestFailOnAnyVulns":false,"pullRequestFailOnlyForHighSeverity":true,"pullRequestTestEnabled":true,"pullRequestAssignment":"{\"enabled\":true,\"type\":\"manual\",\"assignees\":[\"username\"]}","autoRemediationPrs":"{\"freshPrsEnabled\":true,\"backlogPrsEnabled\":false,\"usePatchRemediation\":false}","autoDepUpgradeIgnoredDependencies":["tap","ava"]}
View Organization
View Project
/org/{orgId}/project/{projectId}/settings
The organization ID to which the project belongs. The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID
463c1ee5-31bc-428c-b451-b79a3270db08
application/json
application/json
Deleting project settings will set the project to inherit default settings from its integration.
View Organization
View Project
Edit Project
/org/{orgId}/project/{projectId}/settings
The organization ID to which the project belongs. The API_KEY must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID
463c1ee5-31bc-428c-b451-b79a3270db08
application/json
application/json
No body
Note: when moving a project to a new organization, the historical data used for reporting does not move with it.
View Organization
View Project
Move Project
/org/{orgId}/project/{projectId}/move
The organization ID to which the project belongs. The API_KEY must have group admin permissions. If the project is moved to a new group, a personal level API key is needed.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID.
463c1ee5-31bc-428c-b451-b79a3270db08
The ID of the organization that the project should be moved to. The API_KEY must have group admin permissions. If the project is moved to a new group, a personal level API key is needed.
{"targetOrgId":"4a18d42f-0706-4ad0-b127-24078731fbed"}
View Project
View Project Snapshot
/org/{orgId}/project/{projectId}/issue/{issueId}/paths
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID for which to return issue paths.
6d5813be-7e6d-4ab8-80c2-1e3e2a454545
The issue ID for which to return issue paths.
SNYK-JS-LODASH-590103
The project snapshot ID for which to return issue paths. If set to latest
, the most recent snapshot will be used. Use the "List all project snapshots" endpoint to find suitable values for this.
6d5813be-7e6d-4ab8-80c2-1e3e2a454553
The number of results to return per page (1 - 1000, inclusive).
3
The page of results to return.
2
application/json
application/json
View Organization
View Project
View Project Snapshot
/org/{orgId}/project/{projectId}/dep-graph
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID to return issues for.
6d5813be-7e6d-4ab8-80c2-1e3e2a454545
application/json
application/json
Deactivating a project will:
Disable pull request tests for new vulnerabilities.
Disable Fix pull request from being opened for newly disclosed vulnerabilities.
Disable recurring tests - email alerts about newly disclosed vulnerabilities will be turned off.
If the repository has no other active projects, then remove any webhooks related to the project.
View Organization
View Project
Project Status
/org/{orgId}/project/{projectId}/deactivate
The organization ID the project belongs to. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID.
463c1ee5-31bc-428c-b451-b79a3270db08
application/json
application/json
No body
Attributes are static and non-configurable fields which allow to add additional metadata to a project. Attributes have a pre-defined list of values that a user can select from.
Business criticality | Environment | Lifecycle stage |
---|---|---|
critical | frontend | production |
high | backend | development |
medium | internal | sandbox |
low | external | |
mobile | ||
saas | ||
onprem | ||
hosted | ||
distributed | ||
It is possible to assign multiple values to each attribute, but you can only assign values to one of the predefined attribute categories, using the predefined options for this category. | ||
Assigning an attribute requires the caller to be either an Organization Administrator or a Group Administrator. | ||
Assigning an attribute will override any existing values that the specific attribute already has set. | ||
In order to clear out an attribute value, an empty array can be set. |
Note: Organization admins can add an attribute to a Project. However, only Group admins can modify Project attributes in cases where attributes match a policy, because policies can only be managed by Group admins.
View Organization
View Project
Edit Project Attributes
/org/{orgId}/project/{projectId}/attributes
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID to remove a tag from
6d5813be-7e6d-4ab8-80c2-1e3e2a454545
{"criticality":["high"],"environment":["backend"],"lifecycle":["development"]}
View Project
View Project Snapshot
/org/{orgId}/project/{projectId}/aggregated-issues
The organization ID. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID to return issues for.
6d5813be-7e6d-4ab8-80c2-1e3e2a454545
If set to true
, Include issue's description, if set to false
(by default), it won't (Non-IaC projects only)
If set to true
, include the dockerfile instruction that the issue is introducedThrough. If set to false (default), it won’t. This only applies to Container projects with an associated Dockerfile (CLI or Container Registry source)
{"includeDescription":false,"includeIntroducedThrough":false}
Activating a project will:
Add a repository webhook for supported integrations.
Enable pull request tests for new vulnerabilities.
Open Fix pull request for newly disclosed vulnerabilities.
Enable recurring tests, sending email alerts about newly disclosed vulnerabilities.
View Organization
View Project
Project Status
/org/{orgId}/project/{projectId}/activate
The organization ID the project belongs to. The API_KEY
must have access to this organization.
4a18d42f-0706-4ad0-b127-24078731fbed
The project ID.
463c1ee5-31bc-428c-b451-b79a3270db08
application/json
application/json
No body