Updated on 2025-08-22 GMT+08:00

Common Algorithm Parameters

Request Parameters

Table 1 Request body parameter descriptions

Parameter

Mandatory

Type

Description

algorithmName

Yes

String

Algorithm name.

The options are (algorithm names you can call):

  • shortest_path
  • shortest_path_of_vertex_sets
  • common_neighbors_of_vertex_sets

parameters

Yes

Object

Algorithm parameters. For details, see the parameter descriptions of each algorithm.

Table 2 New request body parameters in version 2.1.7

Parameter

Mandatory

Type

Description

executionMode

No

String

  • sync: synchronous
  • async: asynchronous

The default value is sync.

Supported algorithms are as follows (algorithm names you can call):

  • shortest_path
  • shortest_path_of_vertex_sets

offset

No

Integer

Synchronization result offset. The default value is 0.

NOTE:

This parameter is available when executionMode is sync.

Supported algorithms are as follows (algorithm names you can call):

  • shortest_path
  • shortest_path_of_vertex_sets
  • common_neighbors_of_vertex_sets

limit

No

Integer

Maximum number of returned synchronization results. The maximum value is 100000. The default value is 100000.

NOTE:

This parameter is available when executionMode is sync.

Supported algorithms are as follows (algorithm names you can call):

  • shortest_path
  • shortest_path_of_vertex_sets
  • common_neighbors_of_vertex_sets

Response Parameters

Table 3 Response body parameter descriptions

Parameter

Type

Description

errorMessage

String

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

errorCode

String

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

status

String

Job status returned for a successful query. The options are pending, running, and complete. This parameter is left blank when the query fails.

data

Object

Algorithm execution result. This parameter is left blank when the query fails.

Example Request

{
 "algorithmName":"XXX",
 "parameters":{
         ...
 }
}

Example Response

Algorithms are executed based on input parameters. You can call Querying Job Status and Execution Results to use the job_id returned by the algorithm to obtain the algorithm execution result.

Status code: 200

Example response for a successful request

{
    "data": {
        "outputs": {
            "path": [
                "46",
                "133",
                "138"
            ],
            "source": "46",
            "target": "138"
        }
    },
    "result": "success"
}

response_data indicates the result of each algorithm. The results vary with algorithms.

Status code: 400

Example response for a failed request

Http Status Code: 400
{
 "errorMessage": "UnSupported value [shortest_path11] for parameter [algorithmName].",
 "errorCode": "GES.8402",
 "result": "failed"
}