1.1.1 创建一个 PropertyKey
Method & Url
Request Body
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE"
}
Response Status
201
Response Body
{
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {}
}
1.1.2 为已存在的 PropertyKey 添加或移除 userdata
Params
- action: 表示当前行为是添加还是移除,取值为(添加)和
eliminate
(移除)
Method & Url
PUT http://localhost:8080/graphs/hugegraph/schema/propertykeys/age?action=append
Request Body
Response Status
201
Response Body
{
"id": 2,
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {
"min": 0,
"max": 100
}
1.1.3 获取所有的 PropertyKey
Method & Url
GET http://localhost:8080/graphs/hugegraph/schema/propertykeys
Response Status
200
Response Body
1.1.4 根据name获取PropertyKey
Method & Url
GET http://localhost:8080/graphs/hugegraph/schema/propertykeys/age
Response Status
200
Response Body
{
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {}
}
1.1.5 根据name删除PropertyKey
Method & Url
其中,age
为要获取的PropertyKey的名字