1.3.1 创建一个EdgeLabel

    Method & Url
    Request Body
    1. "name": "created",
    2. "source_label": "person",
    3. "target_label": "software",
    4. "frequency": "SINGLE",
    5. "properties": [
    6. "date"
    7. ],
    8. "sort_keys": [],
    9. "nullable_keys": [],
    10. "enable_label_index": true
    11. }
    Response Status
      Response Body
      1. {
      2. "id": 1,
      3. "sort_keys": [
      4. ],
      5. "source_label": "person",
      6. "name": "created",
      7. "index_names": [
      8. ],
      9. "properties": [
      10. "date"
      11. ],
      12. "target_label": "software",
      13. "frequency": "SINGLE",
      14. "nullable_keys": [
      15. ],
      16. "user_data": {}
      17. }

      1.3.2 为已存在的EdgeLabel添加properties或userdata,或者移除userdata(目前不支持移除properties)

      Params
      • action: 表示当前行为是添加还是移除,取值为append(添加)和eliminate(移除)
      Method & Url
      1. PUT http://localhost:8080/graphs/hugegraph/schema/edgelabels/created?action=append
      Request Body
      Response Status
      1. 200
      Response Body
      1. {
      2. "id": 2,
      3. "sort_keys": [
      4. ],
      5. "source_label": "person",
      6. "name": "created",
      7. "index_names": [
      8. ],
      9. "properties": [
      10. "date",
      11. "weight"
      12. ],
      13. "target_label": "software",
      14. "frequency": "SINGLE",
      15. "weight"
      16. ],
      17. "enable_label_index": true,
      18. "user_data": {}
      19. }

      1.3.3 获取所有的EdgeLabel

      Method & Url
      1. GET http://localhost:8080/graphs/hugegraph/schema/edgelabels
      Response Status
      Response Body

      1.3.4 根据name获取EdgeLabel

      Method & Url
      1. GET http://localhost:8080/graphs/hugegraph/schema/edgelabels/created
      Response Status
      1. 200
      Response Body
      1. {
      2. "id": 1,
      3. "sort_keys": [
      4. ],
      5. "source_label": "person",
      6. "name": "created",
      7. "index_names": [
      8. ],
      9. "properties": [
      10. "date",
      11. "city",
      12. "weight"
      13. ],
      14. "target_label": "software",
      15. "frequency": "SINGLE",
      16. "nullable_keys": [
      17. "city",
      18. "weight"
      19. ],
      20. "enable_label_index": true,
      21. "user_data": {}
      22. }

      1.3.5 根据name删除EdgeLabel

      Method & Url
      1. DELETE http://localhost:8080/graphs/hugegraph/schema/edgelabels/created
      Response Status
      Response Body
      1. {
      2. "task_id": 1