Querying the Artifact Source Version
Function
This API is used to query the artifact source version number.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{cloud_project_id}/artifact/versions
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
cloud_project_id |
Yes |
String |
Definition: 32-character UUID of a CodeArts project, which must be unique. Constraints: N/A Value range: The value contains 32 characters. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
query |
No |
String |
Definition: Fuzzy search. Constraints: N/A Value range: N/A Default value: N/A |
|
page_index |
No |
Integer |
Definition: Page number for pagination query. Constraints: N/A Range:
NOTE:
0
Default value: 1 |
|
page_size |
No |
Integer |
Definition: Number of records per page. Constraints: N/A Value range:
NOTE:
0
Default value: |
|
parent_id |
No |
String |
Definition: ID of the artifact source directory, which is the unique identifier of the artifact repository directory. Constraints: N/A Range: N/A Default value: N/A |
|
metadata_type |
No |
String |
Definition: Artifact source type. Constraints: N/A Range:
Default value: N/A |
|
name |
No |
String |
Definition: Artifact source name. Constraints: N/A Value range: N/A Default value: N/A |
|
repo_branch |
No |
String |
Definition: Code repository branch. Constraints: N/A Range: N/A Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorInfo object |
Definition: Error information. If no error is reported, the error field is not returned. Range: N/A |
|
result |
Object |
Definition: Returned result. Range: N/A |
|
status |
String |
Definition: Status value. Value range: N/A |
Example Requests
GET https://{endpoint}/v2/5c8305fa19154cabbb7f022a710f0ace/artifact/versions?name=&page_index=1&page_size=10&parent_id=&repo_branch=&query=&metadata_type=generic&_=1763891479324
Example Responses
Status code: 200
OK
{
"data" : [ {
"type" : "generic",
"name" : "javaMavenDemo-1.0.jar",
"version" : "20251022.1",
"branch" : "master",
"created_time" : "2025-10-22 07:07:43",
"parent_id" : "42c582eb46044ead9858fec1e1926ebc"
} ],
"total" : 1
}
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