
# 获取流水线列表/获取项目下流水线执行状况 - ListPipelines
#### 功能介绍
获取流水线列表/获取项目下流水线执行状况
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-pipeline/pipeline_03_0006.html)。
#### URI
POST /v5/{project_id}/api/pipelines/list
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                 |
|:---|:---|:---|:---|
| project_id | 是    | String | **参数解释**： 项目ID，获取方式请参见[获取项目ID](https://support.huaweicloud.com/api-pipeline/pipeline_03_0036.html)。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。 |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                 |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | **参数解释**： 用户Token。通过调用[IAM服务获取用户Token接口](https://support.huaweicloud.com/api-iam/iam_30_0003.html)获取（响应消息头中X-Subject-Token的值）。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。 |
   
表3请求Body参数 
| 参数            | 是否必选 | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|:---|
| project_id    | 否    | String           | **参数解释**： CodeArts项目ID。 **约束限制**： 不涉及。 **取值范围**： 每个项目ID为32位字符，由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| project_ids   | 否    | Array of strings | **参数解释**： CodeArts项目ID列表。 **约束限制**： 不涉及。 **取值范围**： 每个项目ID为32位字符，由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| component_id  | 否    | String           | **参数解释**： 微服务ID。可以通过[查询微服务列表](https://support.huaweicloud.com/api-pipeline/ListMicroservice.html)接口获取，其中data.id即为微服务ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符串。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| name          | 否    | String           | **参数解释**： 流水线名称，支持模糊查询。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| status        | 否    | Array of strings | **参数解释**： 流水线状态列表。 **约束限制**： 不涉及。 **取值范围**： - COMPLETED：已完成。   - RUNNING：运行中。   - FAILED：失败。   - CANCELED：取消。   - PAUSED：暂停。   - SUSPEND：挂起。   - IGNORED：忽略。    **默认取值**： 不涉及。 |
| is_publish    | 否    | Boolean          | **参数解释**： 是否为变更流水线。 **约束限制**： 不涉及。 **取值范围**： - true：是变更流水线。   - false：非变更流水线。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| creator_id    | 否    | String           | **参数解释**： 创建人ID，用户的userId。 **约束限制**： 不涉及。 **取值范围**： 每个ID为32位字符串。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| creator_ids   | 否    | Array of strings | **参数解释**： 创建人ID列表。 **约束限制**： 不涉及。 **取值范围**： 每个ID为32位字符串。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| executor_ids  | 否    | Array of strings | **参数解释**： 执行人ID列表。 **约束限制**： 不涉及。 **取值范围**： 每个ID为32位字符串。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| start_time    | 否    | String           | **参数解释**： 流水线开始时间。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| end_time      | 否    | String           | **参数解释**： 流水线结束时间。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| offset        | 否    | Long             | **参数解释**： 起始偏移。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| limit         | 否    | Long             | **参数解释**： 查询数量。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| sort_key      | 否    | String           | **参数解释**： 排序字段名称。 **约束限制**： 不涉及。 **取值范围**： - name：流水线名。   - create_time：创建时间。   - update_time：更新时间。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| sort_dir      | 否    | String           | **参数解释**： 排序规则。 **约束限制**： 不涉及。 **取值范围**： - asc：按排序字段升序。   - desc：按排序字段降序。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| group_path_id | 否    | String           | **参数解释**： 流水线分组ID。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| by_group      | 否    | Boolean          | **参数解释**： 是否分组查询。 **约束限制**： 不涉及。 **取值范围**： - true：是分组查询。   - false：不是分组查询。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| is_banned     | 否    | Boolean          | **参数解释**： 是否包含被禁用的流水线。 **约束限制**： 不涉及。 **取值范围**： - true：包含被禁用的流水线。   - false：不包含被禁用的流水线。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| query_new     | 否    | Boolean          | **参数解释**： 是否只查询新版流水线。 **约束限制**： 不涉及。 **取值范围**： - true：只查询新版流水线。   - false：不只查询新版流水线。    **默认取值**： true。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   
#### 响应参数
**状态码：200**
表4响应Body参数 
| 参数        | 参数类型                                                             | 描述                                                                                                                                |
|:---|:---|:---|
| offset    | Integer                                                          | **参数解释**： 起始偏移。 **取值范围**： 不涉及。 |
| limit     | Integer                                                          | **参数解释**： 查询大小。 **取值范围**： 不涉及。 |
| total     | Integer                                                          | **参数解释**： 记录总数。 **取值范围**： 不涉及。 |
| pipelines | Array of [pipelines] objects | **参数解释**： 流水线。 **取值范围**： 不涉及。  |
   
 表5pipelines 
| 参数               | 参数类型                                                     | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|
| pipeline_id      | String                                                   | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **取值范围**： 32位字符，仅由数字和字母组成。                                                                                                                                                                                    |
| name             | String                                                   | **参数解释**： 流水线名称。 **取值范围**： 仅包含中文、大小写英文字母、数字、'-'和'_'，且长度为\[1,128\]个字符。                                                                                                                                                                                                                                                                         |
| project_id       | String                                                   | **参数解释**： 项目ID。 **取值范围**： 32位字符，仅由数字和字母组成。                                                                                                                                                                                                                                                                                                    |
| project_name     | String                                                   | **参数解释**： 项目名称。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                |
| component_id     | String                                                   | **参数解释**： 组件ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                |
| is_publish       | Boolean                                                  | **参数解释**： 是否为变更流水线。 **取值范围**： - true：是变更流水线。   - false：不是变更流水线。    |
| is_collect       | Boolean                                                  | **参数解释**： 是否收藏此流水线。 **取值范围**： - true：已收藏流水线。   - false：未收藏流水线。     |
| manifest_version | String                                                   | **参数解释**： 流水线版本。 **取值范围**： 默认3.0。                                                                                                                                                                                                                                                                                                             |
| create_time      | Long                                                     | **参数解释**： 创建时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                |
| latest_run       | [latest_run] object | **参数解释**： 最近一次运行信息。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                            |
| convert_sign     | Integer                                                  | **参数解释**： 旧版转新版标识。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                             |
   
 表6latest_run 
| 参数                | 参数类型                                                                             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|:---|:---|:---|
| pipeline_id       | String                                                                           | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| pipeline_run_id   | String                                                                           | **参数解释**： 流水线运行实例ID，[启动流水线](https://support.huaweicloud.com/api-pipeline/RunPipeline.html)接口的返回值即为流水线运行实例ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| executor_id       | String                                                                           | **参数解释**： 执行人ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| executor_name     | String                                                                           | **参数解释**： 执行人名称。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| stage_status_list | Array of [stage_status_list] objects | **参数解释**： 阶段信息列表。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| status            | String                                                                           | **参数解释**： 流水线运行实例状态。 **取值范围**： - COMPLETED：已完成。   - RUNNING：运行中。   - FAILED：失败。   - CANCELED：取消。   - PAUSED：暂停。   - SUSPEND：挂起。   - IGNORED：忽略。         |
| run_number        | Integer                                                                          | **参数解释**： 流水线运行序号。 **取值范围**： 大于等于 1。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| trigger_type      | String                                                                           | **参数解释**： 触发类型 **取值范围**： - Manual：手动触发。   - Scheduler：定时任务。   - MR：MR触发。   - Push：Push事件触发。   - CreateTag：Tag事件触发。   - Issue：Issue触发。   - Note：评论触发。    |
| build_params      | [build_params] object                     | **参数解释**： 构建参数。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| artifact_params   | [artifact_params] object               | **参数解释**： 制品源参数。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| start_time        | Long                                                                             | **参数解释**： 流水线开始时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| end_time          | Long                                                                             | **参数解释**： 流水线结束时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| modify_url        | String                                                                           | **参数解释**： 修改页地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| detail_url        | String                                                                           | **参数解释**： 详情页地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   
 表7stage_status_list 
| 参数         | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|
| name       | String  | **参数解释**： 阶段名称。 **取值范围**： 仅支持输入中文、大小写英文字母、数字、'-'、'_'、','、';'、':'、'.'、'/'、'('、')'、'（'、'）'及空格，其中空格不可在名称开头或结尾使用，且长度为\[1,128\]个字符。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| sequence   | Integer | **参数解释**： 阶段序列号，0代表第一个流水线阶段。 **取值范围**： 大于等于零。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| status     | String  | **参数解释**： 流水线阶段状态。 **取值范围**： - INIT：初始化。   - QUEUED：排队。   - RUNNING：运行中。   - CANCELED：取消。   - COMPLETED：已完成。   - FAILED：失败。   - SKIPPED：跳过。   - IGNORED：忽略。   - PAUSED：暂停。   - SUSPEND：挂起。   - ASYNC_RUNNING：异步运行。   - ASYNC_FAILED：异步失败。   - UNSELECTED：未选择。   - REDISPATCH：重新调度。    |
| start_time | String  | **参数解释**： 阶段开始时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| end_time   | String  | **参数解释**： 阶段结束时间。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| id         | String  | **参数解释**： 阶段ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   
表8job_status_list 
| 参数         | 参数类型   | 描述                                                                                                                                                                             |
|:---|:---|:---|
| name       | String | **参数解释**： job名字。 **取值范围**： 不涉及。                                             |
| identifier | String | **参数解释**： job标识。 **取值范围**： 不涉及                                              |
| status     | String | **参数解释**： job状态。 **取值范围**： RUNNING，FAILED，COMPLETED,SKIPPED,IGNORE,SUSPEND等 |
   
 表9build_params 
| 参数                      | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|
| action                  | String  | **参数解释**： 合并请求事件类型。 **取值范围**： - open：打开。   - reopen：重开。   - update：更新。   - merge：合并。                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| build_type              | String  | **参数解释**： 基于分支还是标签触发。 **取值范围**： - branch：分支触发。   - tag：标签触发。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| commit_id               | String  | **参数解释**： 代码仓提交ID。 **取值范围**： 40位字符。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| event_type              | String  | **参数解释**： 运行事件类型。 **取值范围**： - Manual：手动触发。   - Scheduler：定时任务。   - MR：MR触发。   - Push：Push事件触发。   - CreateTag：Tag事件触发。   - Issue：Issue触发。   - Note：评论触发。    |
| merge_id                | String  | **参数解释**： 合并请求ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| message                 | String  | **参数解释**： 代码仓提交信息。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| source_branch           | String  | **参数解释**： 源分支。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| tag                     | String  | **参数解释**： 标签。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| target_branch           | String  | **参数解释**： 目标分支。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| codehub_id              | String  | **参数解释**： Repo代码仓ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| git_url                 | String  | **参数解释**： 代码仓https地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| source_codehub_id       | String  | **参数解释**： 源Repo代码仓ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| source_codehub_url      | String  | **参数解释**： 源Repo代码仓地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| source_codehub_http_url | String  | **参数解释**： 源Repo代码仓http地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| only_code_update        | Boolean | **参数解释**： 当 action = update的时候，这个值才有意义。action = update的时候，必是true或者false之一,是否仅仅更新代码 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| merge_request_iid       | String  | **参数解释**： 代码仓merge request iid。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| merge_request_url       | String  | **参数解释**： 代码仓merge request url。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| target_codehub_id       | String  | **参数解释**： 目标Repo代码仓ID。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| target_codehub_url      | String  | **参数解释**： 目标Repo代码仓地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| target_codehub_http_url | String  | **参数解释**： 目标Repo代码仓http地址。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| git_type                | String  | **参数解释**： 仓库类型。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| repo_project_id         | String  | **参数解释**： 仓库项目id。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| human_name              | String  | **参数解释**： 仓库名字。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   
 表10artifact_params 
| 参数            | 参数类型   | 描述                                                                                                                                    |
|:---|:---|:---|
| version       | String | **参数解释**： 包版本。 **取值范围**： 不涉及。      |
| branch_filter | String | **参数解释**： 过滤分支。 **取值范围**： 不涉及。     |
| package_name  | String | **参数解释**： 包名称。 **取值范围**： 不涉及。      |
| organization  | String | **参数解释**： docker组织。 **取值范围**： 不涉及。 |
   
#### 请求示例
获取流水线列表。
指定查询的起始偏移量为0，数量为10。
```
POST https://{endpoint}/v5/54f90b75fc1447b1b65e8d3a9f77923d/api/pipelines/list
{
  "offset" : 0,
  "limit" : 10,
  "name" : ""
}
```
#### 响应示例
**状态码：200**
OK
```
{
  "offset" : 0,
  "limit" : 10,
  "total" : 1,
  "pipelines" : [ {
    "pipeline_id" : "cd65d6f2dc17493e97eb5175f872761a",
    "name" : "新建流水线-20230222181032",
    "project_id" : "6428c2e2b4b64affa14ec80896695c49",
    "component_id" : "7bb171e9e9fc415dbd1666ceb68668da",
    "is_publish" : true,
    "is_collect" : false,
    "manifest_version" : "3.0",
    "create_time" : 1677060662000,
    "latest_run" : {
      "pipeline_id" : "cd65d6f2dc17493e97eb5175f872761a",
      "pipeline_run_id" : "88a195482b8a48a1808e87ec21565c2f",
      "executor_id" : "847a5317086c41798469d0868535943a",
      "executor_name" : "beta环境账号",
      "stage_status_list" : [ {
        "name" : "合并集成分支",
        "sequence" : 0,
        "status" : "FAILED",
        "start_time" : "2023-02-22 18:12:25",
        "end_time" : "2023-02-22 18:12:32"
      }, {
        "name" : "阶段_1",
        "sequence" : 1,
        "status" : "INIT",
        "start_time" : null,
        "end_time" : null
      }, {
        "name" : "合并主干",
        "sequence" : 1,
        "status" : "INIT",
        "start_time" : null,
        "end_time" : null
      } ],
      "status" : "FAILED",
      "run_number" : 1,
      "trigger_type" : "Manual",
      "build_params" : null,
      "artifact_params" : null,
      "start_time" : 1677060745000,
      "end_time" : 1677060752000
    }
  } ]
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  获取流水线列表。
  指定查询的起始偏移量为0，数量为10。
  ```
  package com.huaweicloud.sdk.test;
  import com.huaweicloud.sdk.core.auth.ICredential;
  import com.huaweicloud.sdk.core.auth.BasicCredentials;
  import com.huaweicloud.sdk.core.exception.ConnectionException;
  import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
  import com.huaweicloud.sdk.core.exception.ServiceResponseException;
  import com.huaweicloud.sdk.codeartspipeline.v2.region.CodeArtsPipelineRegion;
  import com.huaweicloud.sdk.codeartspipeline.v2.*;
  import com.huaweicloud.sdk.codeartspipeline.v2.model.*;
  public class ListPipelinesSolution {
      public static void main(String[] args) {
          // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
          // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
          String ak = System.getenv("CLOUD_SDK_AK");
          String sk = System.getenv("CLOUD_SDK_SK");
          ICredential auth = new BasicCredentials()
                  .withAk(ak)
                  .withSk(sk);
          CodeArtsPipelineClient client = CodeArtsPipelineClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(CodeArtsPipelineRegion.valueOf("<YOUR REGION>"))
                  .build();
          ListPipelinesRequest request = new ListPipelinesRequest();
          request.withProjectId("{project_id}");
          ListPipelineQuery body = new ListPipelineQuery();
          body.withLimit(10L);
          body.withOffset(0L);
          body.withName("");
          request.withBody(body);
          try {
              ListPipelinesResponse response = client.listPipelines(request);
              System.out.println(response.toString());
          } catch (ConnectionException e) {
              e.printStackTrace();
          } catch (RequestTimeoutException e) {
              e.printStackTrace();
          } catch (ServiceResponseException e) {
              e.printStackTrace();
              System.out.println(e.getHttpStatusCode());
              System.out.println(e.getRequestId());
              System.out.println(e.getErrorCode());
              System.out.println(e.getErrorMsg());
          }
      }
  }
  ```
- [Python]
  获取流水线列表。
  指定查询的起始偏移量为0，数量为10。
  ```
  # coding: utf-8
  import os
  from huaweicloudsdkcore.auth.credentials import BasicCredentials
  from huaweicloudsdkcodeartspipeline.v2.region.codeartspipeline_region import CodeArtsPipelineRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdkcodeartspipeline.v2 import *
  if __name__ == "__main__":
      # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak = os.environ["CLOUD_SDK_AK"]
      sk = os.environ["CLOUD_SDK_SK"]
      credentials = BasicCredentials(ak, sk)
      client = CodeArtsPipelineClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(CodeArtsPipelineRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = ListPipelinesRequest()
          request.project_id = "{project_id}"
          request.body = ListPipelineQuery(
              limit=10,
              offset=0,
              name=""
          )
          response = client.list_pipelines(request)
          print(response)
      except exceptions.ClientRequestException as e:
          print(e.status_code)
          print(e.request_id)
          print(e.error_code)
          print(e.error_msg)
  ```
- [Go]
  获取流水线列表。
  指定查询的起始偏移量为0，数量为10。
  ```
  package main
  import (
  "fmt"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
      codeartspipeline "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2/region"
  )
  func main() {
      // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak := os.Getenv("CLOUD_SDK_AK")
      sk := os.Getenv("CLOUD_SDK_SK")
      auth, err := basic.NewCredentialsBuilder().
          WithAk(ak).
          WithSk(sk).
          SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      hcClient, err := codeartspipeline.CodeArtsPipelineClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := codeartspipeline.NewCodeArtsPipelineClient(hcClient)
      request := &model.ListPipelinesRequest{}
  request.ProjectId = "{project_id}"
  limitListPipelineQuery:= int64(10)
  offsetListPipelineQuery:= int64(0)
  nameListPipelineQuery:= ""
  request.Body = &model.ListPipelineQuery{
  Limit: &limitListPipelineQuery,
  Offset: &offsetListPipelineQuery,
  Name: &nameListPipelineQuery,
  }
  response, err := client.ListPipelines(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/CodeArtsPipeline/sdk?api=ListPipelines)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述           |
|:---|:---|
| 200 | OK           |
| 401 | Unauthorized |
| 403 | Forbidden    |
| 404 | Not Found    |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-pipeline/ErrorCode.html)。
