Updated on 2025-01-03 GMT+08:00

Viewing Real-Time Requests

Function

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

Only running Cypher queries are currently returned.

URI

GET

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

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

graph_name

Yes

String

Graph name

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

  • 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

current_queries

List<CurrentQuery>

Details of the current query list

Table 3 CurrentQuery parameter descriptions

Parameter

Type

Description

task_name

String

Task name

request_id

String

Request ID

status

String

Request execution status

request

String

Request parameter

running_duration

Double

Request execution duration, in seconds

begin_time

String

Request start time

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

{
    "current_queries": [
        {
            "begin_time": "2024-12-11 09:24:33",
            "request": "profile match (n)-[r:rate*1..2]->(m) return r limit 5",
            "request_id": "1-346e5188-4b20-4175-b2ef-f7bcbff2d730",
            "running_duration": 29.765045,
            "status": "RUNNING",
            "task_name": "cypher_plan_query"
        },
        {
            "begin_time": "2024-12-11 09:24:33",
            "request": "profile match (n)-[r:rate*1..2]->(m) return r limit 5",
            "request_id": "1-b6da5a44-d51e-4f3a-8538-907f84a37abb",
            "running_duration": 29.81796,
            "status": "RUNNING",
            "task_name": "cypher_plan_query"
        },
        {
            "begin_time": "2024-12-11 09:24:31",
            "request": "profile match (n)-[r:rate*1..2]->(m) return r limit 5",
            "request_id": "1-4ae2b9a3-b415-4f51-a751-8f93ce0979ab",
            "running_duration": 32.004372,
            "status": "RUNNING",
            "task_name": "cypher_plan_query"
        },
        {
            "begin_time": "2024-12-11 09:24:31",
            "request": "profile match (n)-[r:rate*1..2]->(m) return r limit 5",
            "request_id": "1-18d27ac4-8777-44c0-9e7e-781a4897821b",
            "running_duration": 32.054717,
            "status": "RUNNING",
            "task_name": "cypher_plan_query"
        },
        {
            "begin_time": "2024-12-11 09:24:30",
            "request": "profile match (n)-[r:rate*1..2]->(m) return r limit 5",
            "request_id": "1-7a48582c-a79e-404f-9bea-f13407a22773",
            "running_duration": 33.097715,
            "status": "RUNNING",
            "task_name": "cypher_plan_query"
        },
        {
            "begin_time": "2024-12-11 09:24:24",
            "request": "profile match (n)-[r:rate*1..2]->(m) return r limit 5",
            "request_id": "1-d16660aa-a1fa-435c-a58a-1364b9a2b2ba",
            "running_duration": 38.848532,
            "status": "RUNNING",
            "task_name": "cypher_plan_query"
        }
    ],
    "instance_name": "ges_fdb_old-ges-dispatch-cn-2-1"
}

Status code: 400

Example response for a failed request

Http Status Code: 400 
{
    "errorMessage": "graph ges_fdb_hyg1 not exist.",
    "errorCode": "GES.8000"
}