---
title: "Diff two revisions"
method: GET
path: "/packages/{id}/diff"
tags: ["Package"]
---

# Diff two revisions

`GET /packages/{id}/diff`

## Request

- Base URL: `https://api.nullplatform.com`
- URL: `https://api.nullplatform.com/packages/{id}/diff`
- Auth: HTTP bearer

Compare two revisions of one package. `changes` lists every component name whose pin differs, with the component as pinned by each side (`null` on the side where the name doesn't exist). Artifact components also carry the artifact `type` and the pinned revision's `meta`, so you can tell what changed, for example a new digest or git reference.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `from` string, uuid, required
- `to` string, uuid, required

## Response `200`

The differences between the two revisions.

- PackageDiff
  - `from` object: The base revision.
    - `id` string, uuid
    - `version` string
  - `to` object: The target revision.
    - `id` string, uuid
    - `version` string
  - `changes` object[]
    - `name` string: The component name that differs.
    - `from` object, nullable: The component as pinned by the base revision, or null if absent there. Artifact components also carry type and meta.
    - `to` object, nullable: The component as pinned by the target revision, or null if absent there. Artifact components also carry type and meta.

## Other responses

- `4XX`: Client error responses due to invalid input, missing parameters or insufficient permissions.
- `5XX`: Server error responses.

## Changes

- **2026-09-17** `43b3c1ecdfd8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nullplatform/apis/nullplatform-api/changes/packages/:id/diff/get.md)

---

[API](https://skmtc.dev/nullplatform/apis/nullplatform-api.md) - [All operations](https://skmtc.dev/nullplatform/apis/nullplatform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nullplatform/apis/nullplatform-api/revisions/d3f66bc633d4?raw)
