
# 查看实时请求 - RealTimeRequestsQuery
#### 功能介绍
查看当前主节点上的实时请求。
#### URI
GET
/ges/v1.0/{project_id}/graphs/{graph_name}/om/real-time-queries?summary=
表1路径参数 
| 参数         | 是否必选 | 类型     | 说明                                                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID。项目ID，获取方法请参见[获取项目ID](https://support.huaweicloud.com/api-ges/ges_03_0111.html)。                                                                                                                                                                                       |
| graph_name | 是    | String | **参数解释：** 图名称。 **约束限制：** 不涉及。 **取值范围：** 不涉及。 **默认取值：** 不涉及。 |
   
表2Query参数 
| 参数      | 是否必选 | 参数类型    | 描述                                                  |
|:---|:---|:---|:---|
| summary | 否    | Boolean | 是否只查询实时请求的概要信息，默认为false。如果设置为true，只返回概要信息，任务详情不会返回。 |
   
#### 请求参数
无
#### 响应参数
表3响应Body参数说明 
| 参数                         | 类型                   | 说明                                                                                                                                                                                                                                     |
|:---|:---|:---|
| errorMessage               | String               | 系统提示信息。 - 执行成功时，字段可能为空。  - 执行失败时，用于显示错误信息。   |
| errorCode                  | String               | 系统提示信息。 - 执行成功时，字段可能为空。  - 执行失败时，用于显示错误码。       |
| instance_name              | String               | 实例名称。                                                                                                                                                                                                                                  |
| edge_capacity              | Long                 | 边容量。                                                                                                                                                                                                                                   |
| edge_number                | Long                 | 边数量。                                                                                                                                                                                                                                   |
| edge_usage                 | Double               | 边使用率。                                                                                                                                                                                                                                  |
| vertex_capacity            | String               | 点容量。                                                                                                                                                                                                                                   |
| vertex_number              | Long                 | 点数量。                                                                                                                                                                                                                                   |
| vertex_usage               | Long                 | 点使用率。                                                                                                                                                                                                                                  |
| read_waiting_queue_length  | Long                 | 读等待队列长度。                                                                                                                                                                                                                               |
| read_running_queue_length  | Long                 | 读运行队列长度。                                                                                                                                                                                                                               |
| write_waiting_queue_length | Long                 | 写等待队列长度。                                                                                                                                                                                                                               |
| write_running_queue_length | Long                 | 写运行队列长度。                                                                                                                                                                                                                               |
| current_queries            | List\<CurrentQuery\> | 当前查询列表详情。                                                                                                                                                                                                                              |
   
表4CurrentQuery参数说明 
| 参数               | 类型     | 说明           |
|:---|:---|:---|
| task_name        | String | 任务名称。        |
| request_id       | String | 请求ID。        |
| status           | String | 请求执行状态。      |
| request          | String | 请求参数。        |
| running_duration | Double | 请求执行时长，单位为秒。 |
| pending_duration | Double | 请求阻塞时长，单位为秒。 |
| begin_time       | String | 请求开始时间。      |
| progress         | Double | 请求执行进度。      |
   
#### 请求示例
查看实时请求。
```
GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/om/real-time-queries
```
#### 响应示例
**状态码： 200**
成功响应示例
```
{
  "instance_name": "ges_demo-ges-dn-2-1",
  "edge_capacity": 0,
  "edge_number": 0,
  "edge_usage": 0,
  "vertex_capacity": 0,
  "vertex_number": 0,
  "vertex_usage": 0,
  "read_waiting_queue_length": 2,
  "read_running_queue_length": 1,
  "write_waiting_queue_length": 0,
  "write_running_queue_length": 0,
  "current_queries": [
    {
      "task_name": "incremental_load_graph",
      "request": {
        "vertex_file_format": "csv",
        "parallel_edge": "allow",
        "graph_name": "ges_demo",
        "vertex_file_path": "wepbucket/movie1/sit_ges_data_uat/nodes/",
        "edge_file_path": "wepbucket/movie1/sit_ges_data_uat/edges/",
        "schema_file_path": "wepbucket/movie1/sit_ges_data_uat/sit_ges_metadata_v6.xml",
        "vidSerialize": true,
        "offline": false,
        "trim_quote": "\"",
        "ignore_label": true,
        "delimiter": ",",
        "edge_file_format": "csv",
        "parameters": {
          "secret_key": "xxxxxxxx",
          "access_key": "xxxxxxxx",
          "region": "cn-north-7"
        }
      },
      "pending_duration": 9.91311,
      "request_id": "0c56e2d14369586da38d7fe3b81bb1bd",
      "status": "pending",
      "begin_time": "",
      "running_duration": 0,
      "progress": 0
    }
  ]
}
```
**状态码： 400**
失败响应示例
```
Http Status Code: 400 
{
    "errorMessage": "Not found. Please check the input parameters.",
    "errorCode": "GES.8000"
}
```
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-ges/ges_03_0110.html)。
