Updated on 2023-08-04 GMT+08:00

Shortest Paths (1.0.0)

Table 1 parameters parameter description

Parameter

Mandatory

Description

Type

Value Range

Default Value

source

Yes

Source vertex ID of a path

String

-

-

target

Yes

Target vertex ID of a path

String

-

-

weight

No

Weight of an edge

String

Empty or character string

  • Empty: The default weight and distance of edges are 1.
  • Character string: The property of the corresponding edge is the weight. If the edge does not have a property, the weight is 1 by default.
    NOTE:

    The weight of an edge must be greater than 0.

-

directed

No

Whether to consider the edge direction

Boolean

true or false

false

Table 2 response_data parameter description

Parameter

Type

Description

path

List

Shortest path. The format is as follows:

[vertexId,...]

where

vertexId is of the string type.

source

String

Source vertex ID

target

String

Target vertex ID