
# 查询gitcode流水线日志 - ShowActionsPipelineJobLog
#### 功能介绍
查询gitcode流水线日志
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-pipeline/pipeline_03_0006.html)。
#### URI
POST /v6/{domain_id}/api/pac/pipelines/actions/{pipeline_id}/{pipeline_run_id}/{job_run_id}/logs
表1路径参数 
| 参数              | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|:---|:---|:---|:---|
| domain_id       | 是    | String | **参数解释**： 租户ID，用户的domainId。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                                                                                                              |
| pipeline_id     | 是    | String | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，仅由数字和字母组成。 **默认取值**： 不涉及。         |
| pipeline_run_id | 是    | String | **参数解释**： 流水线运行实例ID，[运行流水线](https://support.huaweicloud.com/api-pipeline/RunPipeline.html)接口的返回值即为流水线运行实例ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，仅由数字和字母组成。 **默认取值**： 不涉及。                            |
| job_run_id      | 是    | String | **参数解释**： 任务运行实例id。可以通过[获取流水线执行详情](https://support.huaweicloud.com/api-pipeline/ShowPipelineRunDetail.html)接口获取，其中JobRun.id即为job_run_id。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。 |
   
#### 请求参数
表2请求Body参数 
| 参数     | 是否必选 | 参数类型 | 描述                                                                                                                                                                                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|
| offset | 否    | Long | **参数解释**： 偏移量，表示从此偏移量开始查询。 **约束限制**： 不涉及。 **取值范围**： offset大于等于0。 **默认取值**： 不涉及。 |
| limit  | 否    | Long | **参数解释**： 每次查询的条目数量。 **约束限制**： 不涉及。 **取值范围**： 大于等于0。 **默认取值**： 不涉及。             |
   
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数           | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| has_more     | Boolean | **参数解释**： 是否还有更多日志。 **取值范围**： - true：还有更多日志。   - false：没有更多日志。    |
| end_offset   | Integer | **参数解释**： 结束时日志字符偏移量。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                             |
| start_offset | Integer | **参数解释**： 日志开始处字符偏移量。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                             |
| log          | String  | **参数解释**： 日志详情。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                   |
| location     | String  | **参数解释**： 日志所处位置。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                 |
   
#### 请求示例
```
POST https://{endpoint}/v6/93b9fc6ffc6a4edc9ab049c1f0dbec4b/api/pac/pipelines/actions/ca5fd6c21a2a454f89613cfa8cf687d5/e6533cbd78ca4b02a1b7b0e1b6428975/e36cd65545704c45afa8e025b336d3b1/logs
{
  "offset" : 0,
  "limit" : 10
}
```
#### 响应示例
**状态码：200**
OK
```
{
  "has_more" : true,
  "end_offset" : 10,
  "start_offset" : 0,
  "log" : "This is a sample log message."
}
```
#### 状态码
| 状态码 | 描述 |
|:---|:---|
| 200 | OK |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-pipeline/ErrorCode.html)。
