API Reference/Git
Get the contents of a file or directory
Get the contents of a file or directory in a repository
GET
/git/v1/repo/{repo}/contents/{*path}
Path Parameters
repo
RequiredstringThe repository ID.
Format:
"uuid"
*path
Requiredstring | nullThe path to the file or directory. Empty for root.
Query Parameters
ref
stringThe git reference (branch name, commit SHA, etc.). Defaults to HEAD.
Response Body
200
Success
response
RequiredFile | Directory400
Bad Request
message
Requiredstring401
Unauthorized
message
Requiredstring403
Forbidden
message
Requiredstring404
Not Found
message
Requiredstring500
Internal Server Error
message
RequiredstringSuccess