更新时间:2025-03-13 GMT+08:00
        
          
          
        
      
      
      
      
      
      
      
      
  
      
      
      
        
添加边(1.0.6)
功能介绍
添加边。
URI
- URI格式
    POST /ges/v1.0/{project_id}/graphs/{graph_name}/edges
- 参数说明 
    表1 URI参数说明 参数 是否必选 类型 说明 project_id 是 String 项目ID。获取方法请参见获取项目ID。 graph_name 是 String 图名称。 
请求
- 请求样例
    POST http://{SERVER_URL}/ges/v1.0/{project_id}/graphs/{graph_name}/edges { "source":"Lily", "target": "Rocky", "label": "rate", "properties": {"Score":[5],"Datetime":["2018-01-01 20:30:05"]}, "parallelEdge": "override" }
- Body参数说明 
    参数 是否必选 类型 说明 source 是 String source点名称。 target 是 String target点名称。 label 是 String 点的label,若没有则置为“__DEFAULT__”。 properties 否 Json 各个属性的值。 parallelEdge 否 String 重复边的处理方式,可选值为allow,ignore和override。allow表示允许重复边;ignore表示忽略之后的重复边;override表示覆盖之前的重复边。默认值为allow。 
响应
- 要素说明 
    参数 类型 说明 errorMessage String 系统提示信息,执行成功时,字段可能为空。执行失败时,用于显示错误信息。 errorCode String 系统提示信息,执行成功时,字段可能为空。执行失败时,用于显示错误码。 data String 查询成功时包含data字段,data字段中包含edges查询结果。 result String 成功时result值为success。 
- 请求成功样例
    Http Status Code: 200 { "result":"success", "data":{"index":"0"} }
- 请求失败样例
    Http Status Code: 400 { "errorMessage":"Edge source vertex [Lily] does not exist", "errorCode":"GES.8000" }
   父主题: 边操作API
  
  
     
      