Obtaining Pipeline Execution Records
Function
Obtaining Pipeline Execution Records
URI
POST /v5/{project_id}/api/pipelines/{pipeline_id}/pipeline-runs/list
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
pipeline_id |
Yes |
String |
Pipeline ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
status |
No |
Array of strings |
Status |
start_time |
No |
String |
Start time |
end_time |
No |
String |
End Time |
offset |
No |
Long |
Specifies the initial offset. |
limit |
No |
Long |
Query Size |
sort_key |
No |
String |
Sorting Field Name |
sort_dir |
No |
String |
Sorting rule |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
offset |
Integer |
Specifies the initial offset. |
limit |
Integer |
Query Size |
total |
Integer |
Total number. |
pipeline_runs |
Array of pipeline_runs objects |
Pipeline running information |
Parameter |
Type |
Description |
---|---|---|
pipeline_id |
String |
Pipeline ID |
pipeline_run_id |
String |
Pipeline running instance ID |
executor_id |
String |
Executor ID |
executor_name |
String |
Executor Name |
stage_status_list |
Array of stage_status_list objects |
Phase information. |
status |
String |
Status |
run_number |
Integer |
Running No. |
trigger_type |
String |
Trigger Type |
build_params |
build_params object |
Image build parameters |
artifact_params |
artifact_params object |
Artifact source parameters |
start_time |
Long |
Start time |
end_time |
Long |
End Time |
detail_url |
String |
Details Page Address |
modify_url |
String |
Modify Page Address |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Phase Name |
sequence |
Integer |
SN |
status |
String |
Status |
start_time |
String |
Start time |
end_time |
String |
End time. |
id |
String |
Phase ID |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Combination Request Event Type |
build_type |
String |
Branch-based or Tag-based Triggering |
commit_id |
String |
Code Repository Submission ID |
event_type |
String |
Running Event Type |
merge_id |
String |
Combination Request ID |
message |
String |
Code Repository Submission Information |
source_branch |
String |
Source Branch |
tag |
String |
Label |
target_branch |
String |
Target Branch |
codehub_id |
String |
Repo code repository ID |
git_url |
String |
HTTPS address of the code repository |
source_codehub_id |
String |
Source Repo Code Repository ID |
source_codehub_url |
String |
Source Repo Code Repository Address |
source_codehub_http_url |
String |
HTTP address of the source Repo code repository |
Example Requests
This API is used to obtain pipeline execution records. Set the start offset to 0, quantity to 10, start timestamp to 1677513600000, and end timestamp to 1678118399000, and sort the query results in descending order of the start time.
POST https://{endpoint}/v5/54f90b75fc1447b1b65e8d3a9f77923d/api/pipelines/e5460d1d403146a1935c2d4b68ef506c/pipeline-runs/list { "offset" : 0, "limit" : 10, "status" : [ "COMPLETED", "RUNNING", "FAILED", "CANCELED", "PAUSED", "SUSPEND", "QUEUED" ], "sort_key" : "start_time", "sort_dir" : "DESC", "start_time" : 1677513600000, "end_time" : 1678118399000 }
Example Responses
Status code: 200
OK
{ "offset" : 0, "limit" : 10, "total" : 1, "pipeline_runs" : [ { "pipeline_id" : "24949d4f4453495f8e5a76f993af7f43", "pipeline_run_id" : "ddb7532cb0e948f2af7bb4397fc19864", "executor_id" : "847a5317086c41798469d0868535943a", "executor_name" : "Beta environment account", "stage_status_list" : [ { "name" : "Phase_1", "sequence" : 0, "status" : "COMPLETED", "start_time" : "2023-03-06 10:04:46", "end_time" : "2023-03-06 10:04:46" } ], "status" : "COMPLETED", "run_number" : 11, "trigger_type" : "Manual", "build_params" : { "action" : null, "build_type" : "branch", "commit_id" : "990ea057751d299f5575aac25bf97e88a60b461e", "event_type" : "Manual", "merge_id" : null, "message" : "Creating a Dockerfile", "source_branch" : null, "tag" : null, "target_branch" : "cloud_pipeline_release_1674026917209", "codehub_id" : "2111677704", "git_url" : "https://example.com/clsyz00001/aaaaa.git" }, "artifact_params" : null, "start_time" : 1678066487000, "end_time" : 1678066488000 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
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.