获取分支目录下的文件(废弃)
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/repositories/{repository_uuid}/branch/{branch_name}/sub-files
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
repository_uuid |
是 |
String |
参数解释: 仓库UUID(由CreateRepository接口返回)。 约束限制: 必传。 取值范围: 由数字和字母组成,且长度为32个字符。 默认取值: 不涉及 |
|
branch_name |
是 |
String |
参数解释: 用户想要查询的分支名称。 约束限制: 不涉及。 取值范围: [1,200] 默认取值: 不涉及。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
path |
否 |
String |
参数解释: 用户想要查询的分支路径。示例:“src/main/java” 约束限制: 不涉及。 取值范围: 不涉及。 默认取值: 不涉及。 |
|
offset |
否 |
Integer |
参数解释: 分页索引。 约束限制: 不涉及。 取值范围: [1,2147483647] 默认取值: 1 |
|
limit |
否 |
Integer |
参数解释: 每页条目数。 约束限制: 不涉及。 取值范围: [1,100] 默认取值: 100 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
参数解释: 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 约束限制: 必传。 取值范围: 字符串长度不少于1,不超过10万。 默认取值: 不涉及。 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error |
Error object |
参数解释: 响应错误码。 取值范围: 不涉及。 |
|
result |
LogsTreeList object |
参数解释: 响应结果。 取值范围: 不涉及。 |
|
status |
String |
参数解释: 调用此接口的响应状态。 取值范围:
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
code |
String |
参数解释: 错误码。 取值范围: 符合错误码格式字符串,长度[0,100]。 |
|
message |
String |
参数解释: 错误信息。 取值范围: 不涉及。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
blob_id |
String |
参数解释: 存储块ID。 |
|
commit |
Commit object |
参数解释: 提交信息。 |
|
file_name |
String |
参数解释: 文件名称。 |
|
file_path |
String |
参数解释: 文件路径。 |
|
md5 |
String |
参数解释: MD5。 |
|
type |
String |
参数解释: 存储类型。 取值范围:
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
author_email |
String |
参数解释: 作者邮箱。 |
|
author_name |
String |
参数解释: 作者。 |
|
authored_date |
String |
参数解释: 作者提交时间。 |
|
committed_date |
String |
参数解释: 提交时间。 |
|
committer_email |
String |
参数解释: 提交作者邮箱。 |
|
committer_name |
String |
参数解释: 提交作者。 |
|
format |
Object |
参数解释: 文件变更的详情信息,其格式由请求查询参数 stat_format 决定。 |
|
id |
String |
参数解释: 提交对应的SHA ID。 |
|
message |
String |
参数解释: 提交的信息。 |
|
parent_ids |
Array of strings |
参数解释: 父提交ID。 |
请求示例
GET
://{endpoint}/v1/repositories/{repository_uuid}/branch/{branch_name}/sub-files
响应示例
状态码: 200
OK
{
"result" : {
"trees" : [ {
"blob_id" : "ef69ef5dc0c53022fe52a4d02de15f73d96e055c",
"file_name" : "csharpDemo.png",
"file_path" : "images/csharpDemo.png",
"md5" : "8830d25fe6b4e2cd14d75ddb5cae73a7",
"type" : "blob",
"commit" : {
"id" : "1cfd6d81fff948828c7f59bda74c0ef80e53def0",
"message" : "init",
"parent_ids" : [ ],
"author_name" : "repo",
"author_email" : "repo@test.com",
"committed_date" : "2019-11-13 11:29:26",
"committer_name" : "repo",
"committer_email" : "repo@test.com"
}
} ],
"total" : 5
},
"status" : "success"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
错误码
请参见错误码。
