Migrate List all Projects v1 API to REST API
On June 22, 2023, Snyk announced the plan to sunset the List all projects v1 API with end-of-life on December 22, 2023, in favor of the REST List all projects API.
Based on OpenAPI specifications, the Snyk REST API is designed to provide a consistent, friendly, and easy-to-use API framework that introduces some major improvements. The benefits of the new APIs include:
- Consistent versioning
- Pagination and caching
- Improved performance
- Client generation
The Projects REST API introduces improved data architecture to facilitate enhanced performance and separation of domains.
Snyk understands that migrating to a new API can be a significant undertaking and wants to support you throughout the process. This comprehensive migration guide is intended to facilitate a seamless transition by providing step-by-step instructions, code examples, and best practices to help you smoothly integrate with the new API.
If you are using the deprecated endpoint, Snyk encourages you to review this migration guide and move all your automations over before Friday, December 22, 2023.
Step | Due date | Your Action Items |
June 22, 2023 | Review the current API usage and use and identify where a migration would need to take place | |
Migration guide to be published with a detailed comparison between v1 and REST Projects API | June 22, 2023 | Review the migration guide and plan to migrate any existing code and workflows before the final date |
| June 22, 2023 | No action needed for existing users on Enterprise plan New users should use the REST Projects API for all new integrations |
Snyk Tools | August 15, 2023 | Customers using Snyk Tools need to upgrade to a version that supports using the REST Projects API instead of v1 Refer to the detailed list included in this guide |
September 22, 2023 | No action needed | |
December 22, 2023 | Ensure migration has been completed by this time to avoid disruption to automated workflows |
The following Snyk Tools that use the List all projects v1 API have been updated to use the REST List all projects API instead:
V1 /org/:orgId/projects | REST /orgs/:orgId/projects |
org.name | data[i].relationships.organization.links.related - Provides a REST API link to retrieve more data about an organization via REST GET /orgs/:org_id |
org.id | data[i].relationships.organization.data.id -
Can also use the provided rest API link to retrieve more data about an organization via REST GET /orgs/:org_id |
name | data[i].attributes.name |
created | data[i].attributes.created |
origin | data[i].attributes.origin |
type | data[i].attributes.type |
readOnly | data[i].attributes.read_only |
testFrequency | data.[i].settings.recurring_tests.frequency |
totalDependencies | Can be fetched optionally by specifying the meta.latest_dependency_total query parameter |
issueCountBySeverity.low issueCountBySeverity.medium issueCountBySeverity.high issueCountBySeverity.critical | Can be fetched optionally by specifying the meta.latest_issue_counts query parameter |
imageId | |
imageTag | |
imageBaseImage | |
imagePlatform | |
imageCluster | Data[i].target.data.id - Use the expand parameter to expand this relationship or make a separate API call to REST Targets API to get a matching target and grab the cluster data from there. |
remoteRepoUrl | data[i].target.data.url |
lastTestedDate | meta.latest_dependency_total.updated_at or meta.latest_issue_counts.updated_at - can be fetched optionally by specifying the meta.latest_issue_counts or meta.latest_dependency_total query parameter |
owner.id owner.name owner.username owner.email | data[i].relationships.owner.links.related -
provides REST API link to retrieve more data about importing user via REST GET /orgs/:org_id/users/:id (beta) |
browseUrl | N/A - can be constructed using organization ID and project ID https://app.snyk.io/org/:orgId/project/:projectId |
importingUser.id importingUser.name importingUser.username importingUser.email | data.[i]relationships.importer.data.id, data[i]relationships.importer.links.related
Additionally provides REST API link to retrieve more data about importing user via REST GET /orgs/:org_id/users/:id (beta) |
isMonitored | data[i].status |
branch | data[i].attributes.target_reference |
targetReference | data[i].attributes.target_reference |
"tags": [ { "key": "example-tag-key", "value": "example-tag-value" } ] | data[i].attributes.tags[ { "key": "example-tag-key", "value": "example-tag-value" } ] |
attributes.criticality | data[i].attributes.business_criticality |
attributes.environment | data[i].attributes.environment |
attributes.lifecycle | data[i].attributes.lifecycle |
Filter by name
If supplied, only Projects that have a name that starts with this value will be returned | Filter: names
Return projects that match the provided names. | For filtering without additional API calls, use the expand parameter on REST List all projects for an org to expand the targets relationship and return all relevant target data at the same time |
Filter by tags | Filter: tags Return projects that match all the provided tags | |
Filter by attributes | Filter: business_criticality, environment and lifecycle |
Last modified 16d ago