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

Common Algorithm Parameters

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

algorithmName

Yes

String

Algorithm name

Available values are as follows (algorithm names you can call):

  • pagerank
  • kcore
  • k_hop
  • shortest_path
  • sssp
  • connected_component

data_id

Yes

String

Dataset ID. For details about how to obtain the dataset ID, see section 5.4.0 "HyG Dataset Management."

parameters

Yes

Object

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

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": {
           $response_data //Result of each algorithm. The results vary with the algorithm.
           "runtime": 1.365867,
           "data_return_size": 3,
           "data_offset": 0,
           "data_total_size": 100
    }
  },
  "status": "complete"
}

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":"Running algorithm [XXXX] error: YYYYYYYYY!",
"errorCode":"GES.8301"
}