Git
查询仓库根目录内容。Get repository root contents.
查询指定仓库根目录下的文件和子目录列表。通过 ref 参数指定分支或提交,默认为 HEAD。返回目录条目的类型、名称、大小等信息。 List files and subdirectories in the root directory of the specified repository. Use the ref parameter to specify a branch or commit (default: HEAD). Returns the type, name, and size of each directory entry. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:r
get/{repo}/-/git/contents
Request
- Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
- URL: https://api.cnb.cool/{repo}/-/git/contents
- Auth: API key in header Authorization
Path parameters
repostring required
不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.
Query parameters
refstring
提交的哈希值或分支名称。Commit hash or branch name.
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.