Obtaining Pipeline Status in Batches
Function
This interface is used to obtain pipeline status in batches. Only pipeline data with execution records is returned.
URI
POST /v5/{project_id}/api/pipelines/status
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Project 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 |
|---|---|---|---|
[items] | Yes | Array of strings | Indicates the pipeline ID list. |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
[items] | Array of PipelineLatestRun objects | OK |
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 Status Information |
status | String | Pipeline status. |
run_number | Integer | Running No. |
trigger_type | String | Trigger Type |
build_params | build_params object | Running Build Parameters |
artifact_params | artifact_params object | Running Artifact Source Parameters |
start_time | Long | Start time |
end_time | Long | End Time |
modify_url | String | Modify Page Address |
detail_url | String | Details Page Address |
Parameter | Type | Description |
|---|---|---|
name | String | Phase Name |
sequence | Integer | Phase Sequence Number |
status | String | Phase Status |
start_time | String | Phase Start Time |
end_time | String | Phase End Time |
Parameter | Type | Description |
|---|---|---|
action | String | Event type of the combination request. |
build_type | String | Branch-based or Tag-based Triggering |
commit_id | String | Code Library Submission ID |
event_type | String | Triggered Event Type |
merge_id | String | ID of a combination request. |
message | String | Code Library Submission Information |
source_branch | String | Source branch of the merge request |
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 status in batches. The ID of the pipeline to be queried is d19799d619424b2bb2625ec2d93ea087.
POST https://{endpoint}/v5/54f90b75fc1447b1b65e8d3a9f77923d/api/pipelines/status
[ "d19799d619424b2bb2625ec2d93ea087" ] Example Responses
Status code: 200
OK
[ {
"pipeline_id" : "d19799d619424b2bb2625ec2d93ea087",
"pipeline_run_id" : "ad6b7f66283a45be9c1f82b06c831e59",
"executor_id" : "847a5317086c41798469d0868535943a",
"executor_name" : "Beta environment account",
"stage_status_list" : [ {
"name" : "Phase_1",
"sequence" : 0,
"status" : "FAILED",
"start_time" : "2023-03-04 16:48:09",
"end_time" : "2023-03-04 16:50:11"
} ],
"status" : "FAILED",
"run_number" : 2,
"trigger_type" : "Manual",
"build_params" : {
"action" : null,
"build_type" : "branch",
"commit_id" : "fc93c34f906aeb1cc031e3f6f8b2baeac078ae4b",
"event_type" : "Manual",
"merge_id" : null,
"message" : "init",
"source_branch" : null,
"tag" : null,
"target_branch" : "test-lbdsb11",
"codehub_id" : "2111699716",
"git_url" : "https://example.com/clsyz00001/111.git"
},
"artifact_params" : null,
"start_time" : 1677919688000,
"end_time" : 1677919811000
} ] 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.

