---
title: "Get a diff of the dependencies between commits"
method: GET
path: "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}"
tags: ["dependency-graph"]
---

# Get a diff of the dependencies between commits

`GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}`

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.

## Path parameters

- `owner` string, required
- `repo` string, required
- `basehead` string, required

## Query parameters

- `name` string

## Response `200`

Response

- object[] — A diff of the dependencies between two commits.
  - `change_type` 'added' | 'removed', required
  - `manifest` string, required
  - `ecosystem` string, required
  - `name` string, required
  - `version` string, required
  - `package_url` string, nullable, required
  - `license` string, nullable, required
  - `source_repository_url` string, nullable, required
  - `vulnerabilities` object[], required
    - `severity` string, required
    - `advisory_ghsa_id` string, required
    - `advisory_summary` string, required
    - `advisory_url` string, required
  - `scope` 'unknown' | 'runtime' | 'development', required — 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.

## Other responses

- `400` — Bad Request
- `403` — Response for a private repository when GitHub Advanced Security is not enabled, or if used against a fork
- `404` — Resource not found
- `500` — Internal Error
- `503` — Service unavailable

---

[API](https://skmtc.net/github/apis/rest-api.md) · [All operations](https://skmtc.net/github/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/rest-api/versions/80850db290cd/schema)
