---
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`

## Request

- Base URL: `https://api.pantheon.io`
- URL: `https://api.pantheon.io/v0/sites/{site_id}/environments/{env_id}/diffstat`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pantheon/apis/pantheon-public-api-service/docs/v0/sites/:site_id/environments/:env_id/diffstat/get.ts> (a function with typed inputs; its response is checked against the schema)

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.dev/pantheon/apis/pantheon-public-api-service.md) - [All operations](https://skmtc.dev/pantheon/apis/pantheon-public-api-service/llms.txt) - [OpenAPI document](https://skmtc.dev/pantheon/apis/pantheon-public-api-service/revisions/5d158d59f4c3?raw)
