List repository root contents
Lists files and directories at the root of a public repository for a commit, branch, or tag.
GET
/github/repos/{owner}/{repo}/contentsNo authentication requiredPath parameters2
| Name | Type | Description |
|---|---|---|
owner* | string | The repository owner login. The value is case-insensitive. |
repo* | string | The repository name without the .git suffix. The value is case-insensitive. |
Query parameters1
| Name | Type | Description |
|---|---|---|
ref | string | A commit, branch, or tag. Defaults to the default branch. |
Headers2
| Name | Type | Description |
|---|---|---|
If-None-Match | string | An ETag for conditional requests. |
If-Modified-Since | string | An HTTP date for conditional requests. |
Responses
application/jsonSchemaGithubContent[]
Array itemobject
Additional properties are allowed
The original GitHub response.