---
title: "Get changed files for a pull request"
method: GET
path: "/repos/{owner}/{repo}/pulls/{index}/files"
tags: ["repository"]
---

# Get changed files for a pull request

`GET /repos/{owner}/{repo}/pulls/{index}/files`

## Path parameters

- `owner` string, required
- `repo` string, required
- `index` integer, required

## Query parameters

- `skip-to` string
- `whitespace` 'ignore-all' | 'ignore-change' | 'ignore-eol' | 'show-all'
- `page` integer
- `limit` integer

## Response `200`

ChangedFileList

- ChangedFile[]
  - `additions` integer — The number of lines added to the file
  - `changes` integer — The total number of changes to the file
  - `contents_url` string — The API URL to get the file contents
  - `deletions` integer — The number of lines deleted from the file
  - `filename` string — The name of the changed file
  - `html_url` string — The HTML URL to view the file changes
  - `previous_filename` string — The previous filename if the file was renamed
  - `raw_url` string — The raw URL to download the file
  - `status` string — The status of the file change (added, modified, deleted, etc.)

## Other responses

- `404` — APINotFound is a not found empty response

---

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