Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 8.6 KB

rest-issues-experimental-api-to-ga-api-migration-guide.md

File metadata and controls

58 lines (41 loc) · 8.6 KB

REST Issues experimental API to GA API migration guide

{% hint style="info" %} Important information about Experimental APIs

An experimental endpoint should be considered unstable and regarded as a tech preview. Experimental versions may introduce breaking changes and may be discontinued at any time. {% endhint %}

What's new in the GA REST Issues API?

{% hint style="info" %} GA REST Issues API documentation /groups/{group_id}/issues and /orgs/{org_id}/issues. {% endhint %}

This version of the API delivers:

  • Consistency: Improved performance and reliability of the REST Issues API
  • Depth: detailed representations for Open Source packages and fixes
  • Flexibility: new filters for tailored API responses
  • Usability: improved pagination and response management, simplifying the API interaction

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.

Comparison of experimental vs GA API

{% hint style="info" %} Mapping experimental API issues to GA API issues

One of the main differences you will see in the table below is that the format of the ID for an issue changes from URI format (consists of key & scan_item.id) in the Experimental API to UUID in the GA API. To match an issue in the experimental api response to the same issue in the GA API response you can use key and the scan_item.id. Note that scan_item is part of the relationships block and key is part of the attributes block. {% endhint %}

FieldsExperimentalGA
classesPresentNo change
coordinatesOnly available for cloud issuesAvailable for cloud and SCA issues and has new fixability fields.

coordinates.is_fixable_manually

coordinates.is_fixable_snyk

coordinates.is_fixable_upstream

coordinates.is_patchable

coordinates.is_pinnable

coordinates.is_upgradeable


Not presentNewly introduced fixability data
coordinates.reachabilityNot presentNewly introduced
coordinates.remediesPresentNo change
representationsPresentNew fields
representations.resourcePathPresentNo change
respresentations.dependencyChainPresentRemoved in favor of representations.dependency
representations.dependencyNot present

Newly introduced replaces representations.

dependencyChain

representations.dependency

.package_name

representations.dependency.

package_version


Not presentNewly introduced as part of represenations.dependency
cloud_resourcePresentNo change
sourceLocationPresentNo change
created_atPresentNo change
description
No change
effective_severity_levelPresentNo change
ignoredPresentNo change
keyPresentNo change
priorityPresentRemoved and replaced with risk
priority.factorsPresentReplaced with risk.factors
priority.scorePresentReplaced with risk.score
riskNot presentNewly introduced - replaces priority
risk.factorsNot presentNewly introduced - replaces priority.factors

risk.factors[i].included_in_score

risk.factors[i].links

risk.factors[i].links.evidence

risk.factors[i].links.evidence.href

risk.factors[i].links.evidence.meta

risk.factors[i].name

risk.factors[i].updated_at

risk.factors[i].value

Not presentNewly introduced
risk.scoreNot presentNewly introduced replaces priority.score

risk.score.model

risk.score.updated_at

risk.score.value

Not present
problemsPresentNo change
resolutionOnly for cloud issuesFor all issue types
severitiesPresent - Not populatedRemoved as not populated and will not be
statusPresentNo change
titlePresentNo change
toolPresentNo change
typePresentNo change
updated_atPresentNo change
idURI format (consists of key & scan_item.id)UUID format
relationships.ignorePresentNo change
relationships.organizationPresentNo change
relationships.policiesPresent - Not populatedRemoved as not populated and will not be
relationships.previousPresent - Not populatedRemoved as not populated and will not be
relationships.scan_itemPresentNo change
relationships.test_executionPresentNo change

Comparison of filters in experimental vs GA API

Filter by Purpose Experimental GA
starting_after return the page of results immediately after this cursor Present No change
ending_before return the page of results immediately before this cursor Present No change
limit number of results to return per page Present No change
scan_item.id filter issues through their scan item relationship Present No change
scan_item.type filter issues through their scan item relationship Present No change
type filter by issue type Present No change
updated_after filter issues updated after this date Present No change
updated_before filter issues updated before this date Not present Newly introduced
created_before filter issues created before this date Not present Newly introduced
created_after filter issues created after this date Not present Newly introduced
effective_severity_level filter issues by one or more effective severity levels Not present Newly introduced
status filter by an issues status Not present Newly introduced
ignored filter issues by their ignored status Not present Newly introduced