Help Center/ CodeArts Artifact/ API Reference/ API/ Version Management (Release Repos)/ Querying the Latest Versions of All Files in a Project
Updated on 2025-09-08 GMT+08:00

Querying the Latest Versions of All Files in a Project

Function

Query the latest versions of all files in a project.

Calling Method

For details, see Calling APIs.

URI

GET /devreposerver/v5/{project_id}/files/version/count

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID, which uniquely identifies a CodeArts Req project. The value is the same as that of project_id in the URL https://{host}/cloudartifact/project/{project_id}/repository on the list page of self-hosted repos.

Constraints:

String length: 32 characters.

Value range:

N/A

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

No

String

Definition:

File name.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Definition:

Request status.

Value range:

success: The request is successful.

error: The request fails.

trace_id

String

Definition:

Request ID, which uniquely identifies the current request.

Value range:

A string of digits and hyphens (-).

result

LatestVersionFilesCount object

Definition:

Latest version.

Value range:

N/A

Table 4 LatestVersionFilesCount

Parameter

Type

Description

count

Long

Definition:

Quantity.

Value range:

N/A

Example Requests

Query the latest versions of all files in a project.

https://{URL}/devreposerver/v5/f132b62084774001b84c294c0eef27f2/files/version/count

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "b0bdfc544a8b426da47c24c105dff426",
  "result" : {
    "count" : 2
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.