Skip to main content

List pull requests files

**Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.

GET/repos/{owner}/{repo}/pulls/{pull_number}/files
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required
pull_number integer
required
Query Parameters
per_page integer
optional

Results per page (max 100)

page integer
optional

Page number of the results to fetch.

Responses

application/json array[Diff Entry object]

Response

Headers
Link string
Example:
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
items Diff Entry object

Diff Entry

additions integer
required

Example: 103

blob_url string<uri>
required

Example: https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt

changes integer
required

Example: 124

contents_url string<uri>
required
Example:
https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e
deletions integer
required

Example: 21

filename string
required

Example: file1.txt

patch string
optional

Example: @@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test

previous_filename string
optional

Example: file.txt

raw_url string<uri>
required

Example: https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt

sha string
required

Example: bbcd538c8e72b8c175046e27cc8f907076331401

status string
required

Example: added

application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required
application/json Basic Error object

Internal Error

documentation_url string
optional
message string
optional
status string
optional
url string
optional