Projects (v1)

This document uses the v1 API. For more details, see the v1 API.

Note: For a list of Project types, see Project type responses from the API.

Update a project

put

Required permissions

  • View Organization

  • View Project

  • Edit Project

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Body
and
anyOptionalExample: {"owner":{"id":"1acd4d09-5602-4d04-9640-045fe928aaea"},"branch":"main"}
Responses
200Success
application/json; charset=utf-8
put
/org/{orgId}/project/{projectId}
200Success

Retrieve a single project

get

Required permissions

  • View Organization

  • View Project

  • View Project Snapshot

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200Success
application/json; charset=utf-8
get
/org/{orgId}/project/{projectId}
200Success

Delete a project

delete

Required permissions

  • View Organization

  • View Project

  • Remove Project

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200Success
delete
/org/{orgId}/project/{projectId}
200Success

No content

Add a tag to a project

post

Required permissions

  • Group Admin
Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID to apply the tag to

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Body
and
anyOptionalExample: {"key":"example-tag-key","value":"example-tag-value"}
Responses
200Success
application/json; charset=utf-8
post
/org/{orgId}/project/{projectId}/tags
200Success

Remove a tag from a project

post

Required permissions

  • Group Admin
Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID to remove a tag from

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Body
and
anyOptionalExample: {"key":"example-tag-key","value":"example-tag-value"}
Responses
200Success
application/json; charset=utf-8
post
/org/{orgId}/project/{projectId}/tags/remove
200Success

Update project settings

put

Required permissions

  • View Organization

  • View Project

  • Edit Project

Path parameters
orgIdstringRequired

The organization ID to which the project belongs. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Body
and
anyOptionalExample: {"autoDepUpgradeLimit":2,"autoDepUpgradeIgnoredDependencies":["tap","ava"],"autoDepUpgradeEnabled":false,"autoDepUpgradeMinAge":21,"pullRequestFailOnAnyVulns":false,"pullRequestFailOnlyForHighSeverity":true,"pullRequestTestEnabled":true,"pullRequestAssignment":"{\"enabled\":true,\"type\":\"manual\",\"assignees\":[\"username\"]}","autoRemediationPrs":"{\"freshPrsEnabled\":true,\"backlogPrsEnabled\":false,\"usePatchRemediation\":false}"}
Responses
200

The response will contain the attributes and values that have been sent in the request and successfully updated.

application/json; charset=utf-8
put
/org/{orgId}/project/{projectId}/settings
200

The response will contain the attributes and values that have been sent in the request and successfully updated.

List project settings

get

Required permissions

  • View Organization

  • View Project

Path parameters
orgIdstringRequired

The organization ID to which the project belongs. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200

The response will contain only attributes that can be updated (see ATTRIBUTES section in Update project settings) and that have been previously set.

application/json; charset=utf-8
get
/org/{orgId}/project/{projectId}/settings
200

The response will contain only attributes that can be updated (see ATTRIBUTES section in Update project settings) and that have been previously set.

Delete project settings

delete

Deleting project settings will set the project to inherit default settings from its integration.

Required permissions

  • View Organization

  • View Project

  • Edit Project

Path parameters
orgIdstringRequired

The organization ID to which the project belongs. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
delete
/org/{orgId}/project/{projectId}/settings
204Success

No content

Move project to a different organization

put

Note: when moving a project to a new organization, the historical data used for reporting does not move with it.

Required permissions

  • View Organization

  • View Project

  • Move Project

Path parameters
orgIdstringRequired

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.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Body
and
anyOptionalExample: {"targetOrgId":"4a18d42f-0706-4ad0-b127-24078731fbed"}
Responses
200Success
application/json; charset=utf-8
put
/org/{orgId}/project/{projectId}/move
200Success

List all project issue paths

get

Required permissions

  • View Project

  • View Project Snapshot

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID for which to return issue paths.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
issueIdstringRequired

The issue ID for which to return issue paths.

Example: SNYK-JS-LODASH-590103
Query parameters
snapshotIdstringOptional

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.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454553
perPagenumber · doubleOptional

The number of results to return per page (1 - 1000, inclusive).

Example: 3
pagenumber · doubleOptional

The page of results to return.

Example: 2
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200Success
application/json; charset=utf-8
get
/org/{orgId}/project/{projectId}/issue/{issueId}/paths
200Success

Get Project dependency graph

get

Required permissions

  • View Organization

  • View Project

  • View Project Snapshot

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID to return issues for.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200
  • A reference implementation of the graph, as well as conversion functions to/from legacy tree format, can be found at: https://github.com/snyk/dep-graph.

  • The object might contain additional fields in the future, in a backward-compatible way (schemaVersion will change accordingly).

application/json; charset=utf-8
get
/org/{orgId}/project/{projectId}/dep-graph
200
  • A reference implementation of the graph, as well as conversion functions to/from legacy tree format, can be found at: https://github.com/snyk/dep-graph.

  • The object might contain additional fields in the future, in a backward-compatible way (schemaVersion will change accordingly).

Deactivate

post

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.

Required permissions

  • View Organization

  • View Project

  • Project Status

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200Success
post
/org/{orgId}/project/{projectId}/deactivate
200Success

No content

Applying attributes

post

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.

Required permissions

  • View Organization

  • View Project

  • Edit Project Attributes

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID to remove a tag from

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Body
and
anyOptionalExample: {"criticality":["high"],"environment":["backend"],"lifecycle":["development"]}
Responses
200Success
application/json; charset=utf-8
post
/org/{orgId}/project/{projectId}/attributes
200Success

List all Aggregated issues

post

Required permissions

  • View Project

  • View Project Snapshot

Path parameters
orgIdstringRequired

The organization ID. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID to return issues for.

Example: 6d5813be-7e6d-4ab8-80c2-1e3e2a454545
Body
and
anyOptionalExample: {"includeDescription":false,"includeIntroducedThrough":false}
Responses
200Success
application/json; charset=utf-8
post
/org/{orgId}/project/{projectId}/aggregated-issues
200Success

Activate

post

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.

Required permissions

  • View Organization

  • View Project

  • Project Status

Path parameters
orgIdstringRequired

The organization ID the project belongs to. The API_KEY must have access to this organization.

Example: 4a18d42f-0706-4ad0-b127-24078731fbed
projectIdstringRequired

The project ID.

Example: 463c1ee5-31bc-428c-b451-b79a3270db08
Header parameters
Content-Typestring · enumRequiredExample: application/jsonPossible values:
Responses
200Success
post
/org/{orgId}/project/{projectId}/activate
200Success

No content

Last updated

Was this helpful?