Skip to content

Commit 6a52dc0

Browse files
authored
Merge pull request #293 from capralifecycle/upgrade-snyk-integration-version
feat: update snyk integration to latest endpoint
2 parents f228927 + 98bd682 commit 6a52dc0

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/snyk/service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export class SnykService {
4646
}
4747

4848
let backportedProjects: SnykProject[] = []
49-
const snykRestApiVersion = "2023-08-04"
49+
const snykRestApiVersion = "2025-11-05"
5050

51-
let nextUrl: string | undefined = `/orgs/${encodeURIComponent(
51+
let nextUrl: string | undefined = `/rest/orgs/${encodeURIComponent(
5252
snykAccountId,
5353
)}/projects?version=${snykRestApiVersion}&meta.latest_dependency_total=true&meta.latest_issue_counts=true&limit=100`
5454

@@ -57,7 +57,7 @@ export class SnykService {
5757
* We continue calling the Snyk API and retrieving more projects until links.next is null
5858
* */
5959
while (nextUrl) {
60-
const response = await fetch(`https://api.snyk.io/rest${nextUrl}`, {
60+
const response = await fetch(`https://api.snyk.io${nextUrl}`, {
6161
method: "GET",
6262
headers: {
6363
Accept: "application/json",

src/snyk/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// See https://apidocs.snyk.io/?version=2023-08-04#get-/orgs/-org_id-/projects
1+
// See https://apidocs.snyk.io/?version=2025-11-05#get-/orgs/-org_id-/projects
22
export interface ProjectResponse {
33
data: RestAPIProject[]
44
links: {
@@ -20,7 +20,6 @@ export interface RestAPIProject {
2020
}
2121
}
2222
}
23-
status: boolean
2423
meta: {
2524
latest_dependency_total: {
2625
updated_at: string

0 commit comments

Comments
 (0)