Repositories
Get contents
Get the contents of a file, directory, symlink, or submodule in a repository.
get/repos/{owner}/{repo}/contents/{path}
Request
- Base URLhttps://gogs.example.com/api/v1
- AuthAPI key in header Authorization
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
Changes
No recorded changes to this operation across all 3 revisions of this API.