Updated on 2024-05-20 GMT+08:00

Viewing Real-Time Requests

Function

This API is used to view the real-time requests on the current primary node.

URI

GET

/ges/v1.0/{project_id}/graphs/{graph_name}/om/real-time-queries?summary=

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. Project ID. For how to obtain the project ID, see Obtaining a Project ID.

graph_name

Yes

String

Graph name

summary

No

Bool

Whether to query only the summary information about real-time requests. The default value is false. If set to true, only the summary information is returned.

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

errorMessage

String

System prompt

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error message.

errorCode

String

System prompt code

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error code.

instance_name

String

Instance name

edge_capacity

Long

Edge capacity

edge_number

Long

Number of edges

edge_usage

Double

Edge usage

vertex_capacity

String

Vertex capacity

vertex_number

Long

Number of vertices

vertex_usage

Long

Vertex usage

read_waiting_queue_length

Long

Length of the read waiting queue

read_running_queue_length

Long

Length of the read running queue

write_waiting_queue_length

Long

Length of the write waiting queue

write_running_queue_length

Long

Length of the write running queue

current_queries

List<CurrentQuery>

Details of the current query list

Table 3 CurrentQuery parameter description

Parameter

Type

Description

task_name

String

System prompt

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error message.

request_id

String

Request ID

status

String

Request execution status

request

String

Request parameter

running_duration

Double

Request execution duration, in seconds

pending_duration

Double

Request blocking duration, in seconds

begin_time

String

Request start time

progress

Double

Request execution progress

Example Request

View real-time requests.

GET http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/ om/real-time-queries

Example Response

Status code: 200

Example response for a successful request

{
  "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
    }
  ]
}

Status code: 400

Example response for a failed request

Http Status Code: 400 
{ 
    "errorMessage": "query metrics error.", 
    "errorCode": "GES.8602" 
}