图引擎服务 GES-批量添加边:请求示例

时间:2024-05-26 05:52:04

请求示例

批量添加边,边的起点为46,边的终点分别为39和38,边的标签为rate,sortKey分别为3、4。

POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/edges/action?action_id=batch-add
{
    "edges": [
        {
            "source": "46",
            "target": "39",
            "label": "rate",
            "sortKey": 3,
            "properties": {
                "Rating": [
                    5
                ],
                "Datetime": [
                    "2018-01-0120:30:05"
                ]
            }
        },
        {
            "source": "46",
            "target": "38",
            "label": "rate",
            "sortKey": 4,
            "properties": {
                "Rating": [
                    4
                ],
                "Datetime": [
                    "2018-01-0120:30:05"
                ]
            }
        }
    ],
    "parallelEdge": {
        "action": "override",
        "ignoreLabel": false
    },
    "createNotExists": false
}
  • SERVER_URL:图的访问地址,取值请参考业务面API使用限制
  • 样例中,若假设点666和777不在原图中,则创建666和777两个点,且label为默认值,之后再添加边。
support.huaweicloud.com/api-ges/ges_03_0428.html