Obtain files in the branch directory.
Function
Obtain files in the branch directory.
URI
GET /v1/repositories/{repository_uuid}/branch/{branch_name}/sub-files
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_uuid |
Yes |
String |
Specifies the repository ID. |
branch_name |
Yes |
String |
Branch name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
No |
String |
Path |
offset |
No |
Integer |
Offset |
limit |
No |
Integer |
Number of Records |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
LogsTreeList object |
Result |
status |
String |
Response status. |
Parameter |
Type |
Description |
---|---|---|
trees |
Array of LogsTree objects |
File Log Tree |
total |
Integer |
By path limit |
Parameter |
Type |
Description |
---|---|---|
blob_id |
String |
Specifies the storage block ID. |
commit |
Commit object |
Details |
file_name |
String |
File Name |
file_path |
String |
File path. |
md5 |
String |
MD5 |
type |
String |
Storage type |
Parameter |
Type |
Description |
---|---|---|
author_email |
String |
Author Email |
author_name |
String |
Author |
authored_date |
String |
Author Submission Time |
committed_date |
String |
Submitted |
committer_email |
String |
Submit Author Email |
committer_name |
String |
Requester |
format |
Object |
Details about the file change. The format is determined by the stat_format parameter. |
id |
String |
Submit the corresponding SHA ID. |
message |
String |
Submitted Information |
parent_ids |
Array of strings |
Parent Submission ID |
Example Requests
GET https://{endpoint}/v1/repositories/{repository_uuid}/branch/{branch_name}/sub-files
Example Responses
Status code: 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\n", "parent_ids" : [ ], "author_name" : "repo", "author_email" : "repo@huawei.com", "committed_date" : "2019-11-13 11:29:26", "committer_name" : "repo", "committer_email" : "repo@huawei.com" } } ], "total" : 5 }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot