GET
/repos/{owner}/{repo}/dependency-graph/compare/{basehead}Get a diff of the dependencies between commits
Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
baseheadstringrequired
The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`.
namestringoptional
The full path, relative to the repository root, of the dependency manifest file.
200Response
change_typestringrequired
manifeststringrequired
ecosystemstringrequired
namestringrequired
versionstringrequired
package_urlstringrequired
licensestringrequired
source_repository_urlstringrequired
vulnerabilitiesarray<object>required
scopestringrequired
Where the dependency is utilized. `development` means that the dependency is only utilized in the development environment. `runtime` means that the dependency is utilized at runtime and in the development environment.
400Bad Request
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Response for a private repository when GitHub Advanced Security is not enabled, or if used against a fork
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
503Service unavailable
codestringoptional
messagestringoptional
documentation_urlstringoptional
Error handling
A 400 is returned: Bad Request. A 403 is returned: Response for a private repository when GitHub Advanced Security is not enabled, or if used against a fork. A 404 is returned: Resource not found. A 500 is returned: Internal Error. A 503 is returned: Service unavailable.