Querying the Running Records of a Pipeline of the Old Version
Function
This API is used to query the running records of a pipeline of the old version.
Calling Method
For details, see Calling APIs.
URI
POST /v5/{project_id}/api/pipelines/{pipeline_id}/pipeline-runs/list-legacy
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
pipeline_id |
Yes |
String |
Definition: Pipeline ID. Obtain the ID by calling the API for querying pipelines. pipelines.pipelineId indicates the pipeline ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Long |
Offset. |
limit |
Yes |
Long |
Number of records on each page. |
status |
No |
String |
Status. |
sort_key |
No |
String |
Sorting key. |
sort_dir |
No |
String |
(Optional) Sorting type. asc: Ascending; desc: Descending. |
start_time |
Yes |
String |
Start time. |
end_time |
Yes |
String |
End time. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
offset |
Integer |
Offset. |
limit |
Integer |
Number of records on each page. |
total |
Integer |
Definition: Total number of items. Value range: The value is no less than 0. |
pipeline_runs |
Array of pipeline_runs objects |
Details list. |
Parameter |
Type |
Description |
---|---|---|
pipeline_id |
String |
Pipeline ID. |
pipeline_run_id |
String |
Pipeline run ID. The return value of the API for starting a pipeline is the pipeline run ID. |
executor_id |
String |
Executor ID. |
executor_name |
String |
Executor name. |
executor_user_name |
String |
Executor username. |
stage_status_list |
Array of stage_status_list objects |
Stage status. |
status |
String |
Running status. |
run_number |
Integer |
Running No. |
trigger_type |
String |
Trigger type. |
build_params |
String |
Build parameter. |
artifact_params |
String |
Build artifact parameter. |
start_time |
Integer |
Start time. |
end_time |
Integer |
End time. |
modify_url |
String |
The modifying page URL. |
detail_url |
String |
The details page URL. |
Example Requests
POST https://(endpoint)/v5/db8d07265e24426598b3eb03a7818972/api/pipelines/e69862ac24f843fcb4ce4d5fe88ebcb7/pipeline-runs/list-legacy { "offset" : 0, "limit" : 10, "status" : null, "sort_key" : "start_time", "sort_dir" : "", "start_time" : "2024-05-22 00:00:00", "end_time" : "2024-06-21 14:35:40" }
Example Responses
Status code: 200
Response body.
{ "offset" : 0, "limit" : 10, "total" : 1, "pipeline_runs" : [ { "pipeline_id" : "e69862ac24f843fcb4ce4d5fe88ebcb7", "pipeline_run_id" : "703177350", "executor_id" : "847a5317086c41798469d0868535943a", "executor_name" : "be123", "executor_user_name" : "test", "stage_status_list" : [ { "id" : "", "name" : "Pipeline source", "sequence" : 0, "status" : "COMPLETED", "start_time" : "2024-06-21 14:38:07", "end_time" : "2024-06-21 14:38:07" }, { "id" : "", "name" : "Build and check", "sequence" : 1, "status" : "COMPLETED", "start_time" : "2024-06-21 14:38:07", "end_time" : "2024-06-21 14:38:07" } ], "status" : "COMPLETED", "run_number" : 1, "trigger_type" : "Manual", "build_params" : null, "artifact_params" : null, "start_time" : 1718951888000, "end_time" : 1718951888000, "modify_url" : null, "detail_url" : null } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body. |
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