# List files

`GET /workspaces/:workspace/projects/:project_name/repository/pulls/:number/files`

Returns the changed files of a single pull request

**Required Scopes:** `REPOSITORY_READ`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The human-readable ID of the project */
  project_name: string; // Example: "my-project"
  /** The pull request number */
  number: number; // Example: 5
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The list of files changed in the pull request */
  files?: FileEntryView[];
}
```

## Type Definitions

```typescript
interface FileEntryView {
  /** The name of the file that was changed */
  file_name?: string;
  /** The status of the file change */
  status?: "ADDED" | "DELETED" | "MODIFIED";
  /** The number of lines added in this file */
  additions?: number;
  /** The number of lines deleted in this file */
  deletions?: number;
  /** The total number of lines changed in this file (additions + deletions) */
  total?: number;
  /** The git patch/diff for this file */
  patch?: string;
}

```

## Response Example

**Status:** `200 OK`


---
Original source: https://buddy.works/docs/api/version-control/pull-requests/list-files