---
title: "Get Git Diff Statistics"
method: GET
path: "/v0/sites/{site_id}/environments/{env_id}/diffstat"
tags: ["sites"]
---

# Get Git Diff Statistics

`GET /v0/sites/{site_id}/environments/{env_id}/diffstat`

Retrieves git diff statistics for uncommitted changes in SFTP mode.
Returns a map of filenames to their diff statistics (status, additions, deletions).
Only works on development environments in SFTP mode.
Returns empty response when no uncommitted changes exist.

## Path parameters

- `site_id` string, required
- `env_id` string, required

## Response `200`

- DiffStatResponse — DiffStatResponse represents the diff statistics for uncommitted changes
  - `files` object, required — Map of filename to diff statistics

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/pantheon/apis/pantheon-public-api-service.md) · [All operations](https://skmtc.net/pantheon/apis/pantheon-public-api-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pantheon/pantheon-public-api-service/revisions/94758829689e/schema)
