---
title: "Compare two scans of a space"
method: GET
path: "/spaces/{id}/diff"
---

# Compare two scans of a space

`GET /spaces/{id}/diff`

## Request

- Base URL: `https://api.spacecontext.app/v1`
- URL: `https://api.spacecontext.app/v1/spaces/{id}/diff`
- Auth: HTTP bearer

What changed from the scan `from` to the scan `to` (the current one when omitted): areas, items added, removed, not seen, moved or changed, issues new, resolved or not seen. Computed without a model. When `to` was checked against `from` (consecutive scans of a space created through the API) records are matched by the links it made, and removals are confirmed by a frame of the empty place; otherwise records are matched by content (name, generic name, aliases) and what is missing is reported as `not_seen`. For a space scanned with the app, past scans are not screened for sensitive values, so this operation requires the `spaces:sensitive` scope.

## Path parameters

- `id` string, required

## Query parameters

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

## Response `200`

Differences between the two scans

- SpaceDiff
  - `object` 'space_diff', required
  - `space_id` string, required
  - `from` object, required
    - `scan_id` string, required
    - `analyzed_at` string, date-time, nullable, required
  - `to` object, required
    - `scan_id` string, required
    - `analyzed_at` string, date-time, nullable, required
  - `level` 'base' | 'deep', required
  - `linked` boolean, required: True when `to` was checked against `from` itself (consecutive scans of a space created through the API): its links and confirmed removals are used. Otherwise records are matched by content only, and nothing can be confirmed removed or resolved.
  - `summary` object, required
    - `areas_added` integer, required
    - `areas_removed` integer, required
    - `items_added` integer, required
    - `items_removed` integer, required
    - `items_not_seen` integer, required
    - `items_moved` integer, required
    - `items_changed` integer, required
    - `issues_new` integer, required
    - `issues_resolved` integer, required
    - `issues_not_seen` integer, required
  - `areas` object, required
    - `added` string[], required
    - `removed` string[], required
    - `condition_changed` object[], required
      - `area` string, required
      - `from` 'new' | 'excellent' | 'good' | 'fair' | 'poor' | 'damaged' | 'not_working' | 'unknown', required
      - `to` 'new' | 'excellent' | 'good' | 'fair' | 'poor' | 'damaged' | 'not_working' | 'unknown', required
  - `items` object, required
    - `added` object[], required
      - `name` string, required
      - `canonical_name` string, nullable, required
      - `area` string, nullable, required
      - `quantity` integer, nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
    - `removed` object[], required: Confirmed gone: a frame of `to` shows the place without it.
      - `name` string, required
      - `canonical_name` string, nullable, required
      - `area` string, nullable, required
      - `quantity` integer, nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
      - `note` string, nullable, required
    - `not_seen` object[], required: In `from`, not in `to`, not confirmed gone: it may be gone, or its place was not filmed.
      - `name` string, required
      - `canonical_name` string, nullable, required
      - `area` string, nullable, required
      - `quantity` integer, nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
    - `moved` object[], required
      - `name` string, required
      - `canonical_name` string, nullable, required
      - `area` string, nullable, required
      - `quantity` integer, nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
      - `from_area` string, nullable, required
    - `quantity_changed` object[], required
      - `name` string, required
      - `canonical_name` string, nullable, required
      - `area` string, nullable, required
      - `quantity` integer, nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
      - `from_quantity` integer, required
    - `condition_changed` object[], required
      - `name` string, required
      - `canonical_name` string, nullable, required
      - `area` string, nullable, required
      - `quantity` integer, nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
      - `from_condition` 'new' | 'excellent' | 'good' | 'fair' | 'poor' | 'damaged' | 'not_working' | 'unknown', required
      - `to_condition` 'new' | 'excellent' | 'good' | 'fair' | 'poor' | 'damaged' | 'not_working' | 'unknown', required
  - `issues` object, required
    - `new` object[], required
      - `title` string, required
      - `area` string, nullable, required
      - `severity` 'low' | 'medium' | 'high' | 'critical' | 'null', nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
    - `resolved` object[], required: Confirmed fixed: a frame of `to` shows the place without the defect.
      - `title` string, required
      - `area` string, nullable, required
      - `severity` 'low' | 'medium' | 'high' | 'critical' | 'null', nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
      - `note` string, nullable, required
    - `not_seen` object[], required: In `from`, not reported in `to`, not confirmed fixed.
      - `title` string, required
      - `area` string, nullable, required
      - `severity` 'low' | 'medium' | 'high' | 'critical' | 'null', nullable, required
      - `evidence` object, required: Frames of each scan that show the record. For a removal or a resolution, `to` shows the place without it.
        - `from` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.
        - `to` object[], required
          - `frame_id` string, required
          - `timestamp_ms` integer, nullable, required
          - `url` string, nullable, required: Signed URL of the original frame; null when this key may not see it.

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Too many requests. Retry after the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spacecontext/apis/space-context-api.md) · [All operations](https://skmtc.dev/spacecontext/apis/space-context-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacecontext/apis/space-context-api/revisions/1dca940259b4?raw)
