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
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 |
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
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 |
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.
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