
# 查询execution事件
#### 功能介绍
查询指定执行结果的事件。
#### URI
GET /v1/executions/{execution_id}/events
表1参数说明 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                         |
|:---|:---|:---|:---|
| execution_id | 是    | String | 执行结果ID，即[创建execution](https://support.huaweicloud.com/api-gcs/gcs_api_005_0020.html)接口返回值。 |
   
#### 请求消息
**请求示例**
```
GET /v1/executions/e19d3faf-9f04-9685-e5c0-fbe8d40b96cd/events HTTP/1.1 
Host:Host Server   
Content-Type:application/json
```
#### 响应消息
**响应参数**
响应中结构如[表2]所示。
 表2Execution事件结构 
| 参数             | 参数类型                                        | 描述        |
|:---|:---|:---|
| metadata       | [表3] | 元信息。      |
| involvedObject | [表3] | 事件相关主体信息。 |
| reason         | String                                      | 事件状态。     |
| message        | String                                      | 事件详细信息。   |
| firstTimestamp | String                                      | 事件首次上报时间。 |
| lastTimestamp  | String                                      | 事件末次上报时间。 |
| count          | Integer                                     | 事件发生次数。   |
| type           | String                                      | 事件类型。     |
| elemType       | String                                      | 元素type.   |
| elemId         | String                                      | 元素名称。     |
| actionName     | String                                      | 执行动作名称。   |
   
 表3简化的元信息结构 
| 参数        | 参数类型   | 描述    |
|:---|:---|:---|
| name      | String | 名称。   |
| namespace | String | 命名空间。 |
   
**响应示例**
```
[
  {
    "metadata": {
      "name": "gcs-exec-3-08-20-144951.154c848add38e9f9",
      "namespace": "c51567523b744d098a8a81ede51894ac"
    },
    "involvedObject": {
      "name": "gcs-exec-3-08-20-144951",
      "namespace": "c51567523b744d098a8a81ede51894ac"
    },
    "reason": "执行成功##SuccessfulFinish",
    "message": "元素(job-a-init)执行create成功. ## Element(job-a-init) execute Action: create successfully",
    "firstTimestamp": "2018-08-20T06:41:44Z",
    "lastTimestamp": "2018-08-20T06:41:44Z",
    "count": 1,
    "type": "Normal",
    "elemType": "KubeDAG.init",
    "elemId": "job-a-init",
    "actionName": "create"
  },
  {
    "metadata": {
      "name": "gcs-exec-3-08-20-144951.154c848ade084c88",
      "namespace": "c51567523b744d098a8a81ede51894ac"
    },
    "involvedObject": {
      "name": "gcs-exec-3-08-20-144951",
      "namespace": "c51567523b744d098a8a81ede51894ac"
    },
    "reason": "启动##ActionStart",
    "message": "元素(job-c-init)开始执行(create)流程. ## Element(job-c-init) start to Action(create).",
    "firstTimestamp": "2018-08-20T06:41:44Z",
    "lastTimestamp": "2018-08-20T06:41:44Z",
    "count": 1,
    "type": "Normal",
    "elemType": "KubeDAG.init",
    "elemId": "job-c-init",
    "actionName": "create"
  },
  {
    "metadata": {
      "name": "gcs-exec-3-08-20-144951.154c848ade7ed58e",
      "namespace": "c51567523b744d098a8a81ede51894ac"
    },
    "involvedObject": {
      "name": "gcs-exec-3-08-20-144951",
      "namespace": "c51567523b744d098a8a81ede51894ac"
    },
    "reason": "启动##ActionStart",
    "message": "元素(job-d-init)开始执行(create)流程. ## Element(job-d-init) start to Action(create).",
    "firstTimestamp": "2018-08-20T06:41:44Z",
    "lastTimestamp": "2018-08-20T06:41:44Z",
    "count": 1,
    "type": "Normal",
    "elemType": "KubeDAG.init",
    "elemId": "job-d-init",
    "actionName": "create"
  },
]
```
#### 状态码
- 正常 状态码如[表4]所示。
  
 表4状态码 
| 状态码 | 描述            |
|:---|:---|
| 200 | 执行结果流程事件查询成功。 |
   
- 异常 状态码如[6.3-状态码](https://support.huaweicloud.com/api-gcs/gcs_api_006_001.html)所示。
  
 
