diff --git a/src/snyk/service.ts b/src/snyk/service.ts index 7344175e..a69179f0 100644 --- a/src/snyk/service.ts +++ b/src/snyk/service.ts @@ -46,9 +46,9 @@ export class SnykService { } let backportedProjects: SnykProject[] = [] - const snykRestApiVersion = "2023-08-04" + const snykRestApiVersion = "2025-11-05" - let nextUrl: string | undefined = `/orgs/${encodeURIComponent( + let nextUrl: string | undefined = `/rest/orgs/${encodeURIComponent( snykAccountId, )}/projects?version=${snykRestApiVersion}&meta.latest_dependency_total=true&meta.latest_issue_counts=true&limit=100` @@ -57,7 +57,7 @@ export class SnykService { * We continue calling the Snyk API and retrieving more projects until links.next is null * */ while (nextUrl) { - const response = await fetch(`https://api.snyk.io/rest${nextUrl}`, { + const response = await fetch(`https://api.snyk.io${nextUrl}`, { method: "GET", headers: { Accept: "application/json", diff --git a/src/snyk/types.ts b/src/snyk/types.ts index 209c1e77..88e9c1a0 100644 --- a/src/snyk/types.ts +++ b/src/snyk/types.ts @@ -1,4 +1,4 @@ -// See https://apidocs.snyk.io/?version=2023-08-04#get-/orgs/-org_id-/projects +// See https://apidocs.snyk.io/?version=2025-11-05#get-/orgs/-org_id-/projects export interface ProjectResponse { data: RestAPIProject[] links: { @@ -20,7 +20,6 @@ export interface RestAPIProject { } } } - status: boolean meta: { latest_dependency_total: { updated_at: string