Obtaining Pipeline Statuses in Batches
Function
This API is used to obtain pipeline status in batches. Only the data with execution records is returned.
Calling Method
For details, see Calling APIs.
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. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
[items] |
Yes |
Array of strings |
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 run ID. |
executor_id |
String |
Executor ID. |
executor_name |
String |
Executor name. |
stage_status_list |
Array of stage_status_list objects |
Stage status information. |
status |
String |
Pipeline status. |
run_number |
Integer |
Running number. |
trigger_type |
String |
Trigger type. |
build_params |
build_params object |
Parameters for running a build. |
artifact_params |
artifact_params object |
Parameters for running the Artifact source. |
start_time |
Long |
Start time. |
end_time |
Long |
End time. |
modify_url |
String |
Address of the change page. |
detail_url |
String |
Address of the details page. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Stage name. |
sequence |
Integer |
Stage number. |
status |
String |
Stage status. |
start_time |
String |
Stage start time. |
end_time |
String |
Stage end time. |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Event type of the merge request. |
build_type |
String |
Triggered by branch or tag. |
commit_id |
String |
Code repository commit ID. |
event_type |
String |
Event type of triggering. |
merge_id |
String |
Merge request ID. |
message |
String |
Code repository commit information. |
source_branch |
String |
Source branch of the merge request. |
tag |
String |
Tag. |
target_branch |
String |
Target branch. |
codehub_id |
String |
Repo repository ID. |
git_url |
String |
HTTPS address of the code repository. |
source_codehub_id |
String |
Source Repo repository ID. |
source_codehub_url |
String |
Source Repo repository address. |
source_codehub_http_url |
String |
HTTP address of the source Repo repository. |
Example Requests
Obtaining Pipeline Statuses in Batches The pipeline ID 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot