
# 查询当前流水线排队中的记录 - ListPipelineQueue
#### 功能介绍
查询当前流水线排队中的记录
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-pipeline/pipeline_03_0006.html)。
#### URI
GET /v5/{project_id}/api/pipelines/{pipeline_id}/queued-pipeline
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|:---|
| project_id  | 是    | String | **参数解释**： 项目ID，获取方式请参见[获取项目ID](https://support.huaweicloud.com/api-pipeline/pipeline_03_0036.html)。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                               |
| pipeline_id | 是    | String | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口获取，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。 |
   
表2Query参数 
| 参数     | 是否必选 | 参数类型 | 描述                                                                                                                                                                                                                                                                                                                                                 |
|:---|:---|:---|:---|
| offset | 是    | Long | **参数解释**： 偏移量，表示从此偏移量开始查询。 **约束限制**： 不涉及。 **取值范围**： offset大于等于0。 **默认取值**： 不涉及。 |
| limit  | 是    | Long | **参数解释**： 每次查询的条目数量。 **约束限制**： 不涉及。 **取值范围**： 大于等于0。 **默认取值**： 不涉及。             |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数              | 参数类型                                                                             | 描述                                                                                                                                                               |
|:---|:---|:---|
| offset          | Integer                                                                          | **参数解释**： 偏移量，表示从此偏移量开始查询。 **取值范围**： offset大于等于0。 |
| limit           | Integer                                                                          | **参数解释**： 每次查询的条目数量。 **取值范围**： 大于等于0。             |
| total           | Integer                                                                          | **参数解释**： 总条目数量。 **取值范围**： 大于等于0。                 |
| queuedPipelines | Array of [queuedPipelines] objects | **参数解释**： 排队记录列表。 **取值范围**： 不涉及。                  |
   
 表4queuedPipelines 
| 参数              | 参数类型    | 描述                                                                                                                                                                                              |
|:---|:---|:---|
| id              | Integer | **参数解释**： 排队记录ID。 **取值范围**： 不涉及。                                                 |
| pipeline_id     | String  | **参数解释**： 流水线ID。 **取值范围**： 32位字符，由数字和字母组成。                                       |
| pipeline_run_id | String  | **参数解释**： 流水线运行实例ID。 **取值范围**： 32位字符，由数字和字母组成。                                   |
| region          | String  | **参数解释**： 局点。 **取值范围**： 不涉及。                                                     |
| enqueue_time    | Integer | **参数解释**： 入队时间。 **取值范围**： 不涉及。                                                   |
| trigger_type    | String  | **参数解释**： 触发类型。 **取值范围**： 不涉及。                                                   |
| creator_id      | String  | **参数解释**： 触发人ID。 **取值范围**： 32位字符，由数字和字母组成。                                       |
| creator_name    | String  | **参数解释**： 触发人姓名。 **取值范围**： 不涉及。                                                  |
| status          | String  | **参数解释**： 排队状态。QUEUED：队列中，QUEUED_TIME_OUT：排队超时 **取值范围**： QUEUED，QUEUED_TIME_OUT。 |
| merge_id        | String  | **参数解释**： 排队的MR ID。 **取值范围**： 不涉及。                                               |
   
#### 请求示例
```
GET https://(endpoint)/v5/071112d87d3e4ed49130c691936202e9/api/pipelines/c173d99dbbb54626b64cf5694c0a4e8e/queued-pipeline?offset=0&limit=10
```
#### 响应示例
**状态码：200**
OK
```
{
  "offset" : 0,
  "limit" : 10,
  "total" : 1,
  "queuedPipelines" : [ {
    "id" : 136,
    "pipeline_id" : "c173d99dbbb54626b64cf5694c0a4e8e",
    "pipeline_run_id" : "b5c22bc545144ea7bf761191821c8b36",
    "region" : "{region}",
    "enqueue_time" : 1718951334000,
    "trigger_type" : "Manual",
    "creator_id" : "123456",
    "creator_name" : "123-5",
    "status" : "QUEUED",
    "merge_id" : 123456
  } ]
}
```
#### 状态码
| 状态码 | 描述 |
|:---|:---|
| 200 | OK |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-pipeline/ErrorCode.html)。
