v1

latestOpenAPI 3.0.32026-07-1310423153.4 KB
Repositories

Get contents

Get the contents of a file, directory, symlink, or submodule in a repository.

get/repos/{owner}/{repo}/contents/{path}

Path parameters

ownerstring required

Repository owner

repostring required

Repository name

pathstring required

File or directory path

Query parameters

refstring

Branch, tag, or commit. Defaults to the default branch.

Response

Success

type'file' | 'dir' | 'symlink' | 'submodule'
encodingstring
sizeinteger
namestring
pathstring
contentstring
shastring
urlstring
git_urlstring
html_urlstring
download_urlstring