1.2.1 创建一个VertexLabel

    Method & Url
    Request Body
    1. "name": "person",
    2. "id_strategy": "DEFAULT",
    3. "properties": [
    4. "name",
    5. "age"
    6. ],
    7. "primary_keys": [
    8. "name"
    9. ],
    10. "nullable_keys": [],
    11. "enable_label_index": true
    12. }
    Response Status
      Response Body
      1. {
      2. "id": 1,
      3. "primary_keys": [
      4. "name"
      5. ],
      6. "id_strategy": "PRIMARY_KEY",
      7. "name": "person2",
      8. "index_names": [
      9. ],
      10. "properties": [
      11. "name",
      12. "age"
      13. ],
      14. "nullable_keys": [
      15. ],
      16. "user_data": {}
      17. }

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

      Params
      • action: 表示当前行为是添加还是移除,取值为append(添加)和eliminate(移除)
      Method & Url
      1. PUT http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person?action=append
      Request Body
      Response Status
      1. 200
      Response Body
      1. {
      2. "id": 1,
      3. "primary_keys": [
      4. "name"
      5. ],
      6. "id_strategy": "PRIMARY_KEY",
      7. "name": "person",
      8. "index_names": [
      9. ],
      10. "properties": [
      11. "city",
      12. "name",
      13. "age"
      14. ],
      15. "nullable_keys": [
      16. ],
      17. "enable_label_index": true,
      18. "user_data": {
      19. "super": "animal"
      20. }
      21. }

      1.2.3 获取所有的VertexLabel

      Method & Url
      Response Status
      1. 200
      Response Body

      1.2.4 根据name获取VertexLabel

      Method & Url
      1. GET http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person
      Response Status
      1. 200
      Response Body
      1. {
      2. "id": 1,
      3. "primary_keys": [
      4. "name"
      5. ],
      6. "id_strategy": "PRIMARY_KEY",
      7. "name": "person",
      8. "index_names": [
      9. ],
      10. "properties": [
      11. "city",
      12. "name",
      13. "age"
      14. ],
      15. "nullable_keys": [
      16. "city"
      17. ],
      18. "enable_label_index": true,
      19. "user_data": {
      20. "super": "animal"
      21. }
      22. }

      1.2.5 根据name删除VertexLabel

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