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

Querying Repository File Details

Function

Query repository file details.

URI

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

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.

format

Yes

String

Repository format.

instance_id

No

String

Instance ID.

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 repository file details.

https://artifact.cn-south-1.myhuaweicloud.com/cloudartifact/v5/00000000000000000000000000000000/11111111111111111111111111111111/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_go_19/file-detail?path=/up/up/9Hn1036zgQqL4G805Ufb43H4s1t984&format=go

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "143002-1701223197469-447",
  "result" : {
    "repo" : "cn-north-7_5a775fdcb14f4431b6c0015618140bc3_go_19",
    "path" : "/up/up/9Hn1036zgQqL4G805Ufb43H4s1t984",
    "name" : "9Hn1036zgQqL4G805Ufb43H4s1t984",
    "created" : "2023-11-14 19:29:46",
    "createdBy" : "devcloud_devcloud_y00226182_01",
    "lastModified" : "2023-11-14 19:29:46",
    "lastUpdated" : "2023-11-14 19:29:46",
    "modifiedBy" : "devcloud_devcloud_y00226182_01",
    "uri" : "https://cloudartifacts-backend.cn-north-7.myhuaweicloud.com/artgalaxy/api/storage/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_go_19/up/up/9Hn1036zgQqL4G805Ufb43H4s1t984",
    "downloadUri" : "https://cloudartifacts-backend.cn-north-7.myhuaweicloud.com/artgalaxy/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_go_19/up/up/9Hn1036zgQqL4G805Ufb43H4s1t984",
    "mimeType" : null,
    "size" : "1056",
    "attention" : "0",
    "checksums" : {
      "sha512" : "86b14ee38fbeee9b33184b018dd7740c75acb994292a2f71db7af9952ecb7676fe759cfc3207ab4d5b7f76252c0e3a6683c00e7c0af3cb73282ee05a5441e72c",
      "sha256" : "806f31bcccdf84d133de1b307834e7f4f07810b4f5204bd449ce088c051513a4",
      "sha1" : "20691eee689efdf42e926b52b6f84c51439ab054",
      "md5" : "af5b0888060bcdabc8a5440251556461"
    },
    "packageName" : null,
    "version" : null,
    "groupId" : null,
    "artifactId" : null,
    "properties" : null,
    "downloadInfo" : {
      "uri" : "https://cloudartifacts-backend.cn-north-7.myhuaweicloud.com/artgalaxy/api/storage/cn-north-7_5a775fdcb14f4431b6c0015618140bc3_go_19/up/up/9Hn1036zgQqL4G805Ufb43H4s1t984",
      "downloadCount" : 0,
      "lastDownloaded" : 0,
      "remoteDownloadCount" : 0,
      "remoteLastDownloaded" : 0,
      "lastDownloadedBy" : ""
    },
    "gavDisplay" : {
      "gavInfo" : null,
      "configInfo" : ""
    },
    "originalChecksums" : { },
    "displayName" : "go3",
    "display_size" : "1.03 KB"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.