Help Center/ CodeArts Artifact/ API Reference/ API/ File Management/ Querying the Repository Folder Directory
Updated on 2023-12-28 GMT+08:00

Querying the Repository Folder Directory

Function

Query the repository folder directory.

URI

GET /cloudartifact/v5/{tenant_id}/{project_id}/{repo_name}/file-tree

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

tenant_id

Yes

String

Tenant ID.

project_id

Yes

String

Project ID.

repo_name

Yes

String

Repository name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

path

Yes

String

Path in the repository.

instance_id

No

String

Instance ID.

is_recycle_bin

No

Boolean

Whether a file is in the recycle bin.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Result status.

trace_id

String

Request ID.

result

String

Returned result of the request. The return value varies according to the API.

Example Requests

Query the repository folder directory.

https://artifact.cn-south-1.myhuaweicloud.com/cloudartifact/v5/00000000000000000000000000000000/11111111111111111111111111111111/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_maven_1_108/file-tree?path=/&is_recycle_bin=true

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "143002-1701223028671-441",
  "result" : {
    "children" : [ {
      "name" : "1",
      "uri" : "https://cloudartifacts-backend.cn-north-7.myhuaweicloud.com/artgalaxy/api/storage/auto-trashcan/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_maven_1_108/1",
      "path" : "cn-north-7_5a775fdcb14f4431b6c0015618140bc3_maven_1_108/1",
      "modified" : "2023-11-29 09:56:51",
      "folder" : true,
      "display_size" : null,
      "modified_by" : "devcloud_devcloud_y00226182_01",
      "has_child" : "true"
    } ],
    "uploadAccess" : false,
    "total" : 1,
    "uri" : "/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_maven_1_108",
    "created" : "2023-11-29T09:56:51.349+08:00"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.