:path. If you omit:path, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories.raw or object custom media types are supported. Both will work as normal, except that when using the object media type, the content field will be an empty string and the encoding field will be "none". To get the contents of these larger files, use the raw media type.:path points to a symlink, and the symlink's target is a normal file in the repository, then thesubmodule_git_url identifies the location of the submodule repository, and the sha identifies a specificgit_url and _links["git"]) and thehtml_url and _links["html"]) will have null values.curl --location --request GET 'https://api.github.com/repos///contents/'[
{
"_links": {
"git": "http://example.com",
"html": "http://example.com",
"self": "http://example.com"
},
"content": "string",
"download_url": "http://example.com",
"git_url": "http://example.com",
"html_url": "http://example.com",
"name": "string",
"path": "string",
"sha": "string",
"size": 0,
"type": "dir",
"url": "http://example.com"
}
]