Get a repository README for a directory
Gets the README from a repository directory. READMEs support [custom media types](https://docs.github.com/[email protected]/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
GET
/repos/{owner}/{repo}/readme/{dir}- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- owner stringrequired
- repo stringrequired
- dir stringrequired
The alternate path to look for a README file
Query Parameters
- ref stringoptional
The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)
Responses
application/json Content File object
Response
_links objectrequired
_links object
requiredgit string<uri>
requirednullable html string<uri>
requirednullable self string<uri>
requiredcontent string
requireddownload_url string<uri>
requirednullable encoding string
requiredgit_url string<uri>
requirednullable html_url string<uri>
requirednullable name string
requiredpath string
requiredsha string
requiredsize integer
requiredsubmodule_git_url string
optionalExample: "git://example.com/defunkt/dotjs.git"
target string
optionalExample: "actual/actual.md"
type string
requiredurl string<uri>
requiredapplication/json Basic Error object
Resource not found
documentation_url string
optionalmessage string
optionalstatus string
optionalurl string
optionalapplication/json Validation Error object
Validation failed
documentation_url string
required errors array[object]optional
errors array[object]
optional items object
items object
code string
requiredfield string
optionalindex integer
optionalmessage string
optionalresource string
optionalvalue
optionalmessage string
required