This is an automated email from the ASF dual-hosted git repository. jin pushed a commit to branch website in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git
commit 665739b7bf28c94423cbd8dd9f540fc5c80d77fb Author: wangyao <[email protected]> AuthorDate: Fri May 27 09:27:37 2022 +0800 divide create graph into clone and create --- content/cn/docs/clients/restful-api/graphs.md | 44 ++++++++++++++++++++++--- content/en/docs/clients/restful-api/graphs.md | 46 ++++++++++++++++++++++++--- 2 files changed, 80 insertions(+), 10 deletions(-) diff --git a/content/cn/docs/clients/restful-api/graphs.md b/content/cn/docs/clients/restful-api/graphs.md index 2adb8012..e1d5a0ff 100644 --- a/content/cn/docs/clients/restful-api/graphs.md +++ b/content/cn/docs/clients/restful-api/graphs.md @@ -74,16 +74,50 @@ DELETE http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+t 204 ``` -#### 6.1.4 创建一个图,**该操作需要管理员权限** +#### 6.1.4 克隆一个图,**该操作需要管理员权限** ##### Params -- clone_graph_name: 已有的一个graph名称 +- clone_graph_name: 已有图的名称;从已有的图来克隆,用户可选择传递配置文件,传递时将替换已有图中的配置; ##### Method & Url ``` -POST http://localhost:8080/graphs/hugegraph2?clone_graph_name=hugegraph +POST http://localhost:8080/graphs/hugegraph_clone?clone_graph_name=hugegraph +``` + +##### Request Body 【可选】 + +``` +gremlin.graph=com.baidu.hugegraph.auth.HugeFactoryAuthProxy +backend=rocksdb +serializer=binary +store=hugegraph_clone +rocksdb.data_path=./hg2 +rocksdb.wal_path=./hg2 +``` + +##### Response Status + +```json +200 +``` + +##### Response Body + +```json +{ + "name": "hugegraph_clone", + "backend": "rocksdb" +} +``` + +#### 6.1.5 创建一个图,**该操作需要管理员权限** + +##### Method & Url + +``` +POST http://localhost:8080/graphs/hugegraph2 ``` ##### Request Body @@ -107,12 +141,12 @@ rocksdb.wal_path=./hg2 ```json { - "name": "hugegraph_clone", + "name": "hugegraph2", "backend": "rocksdb" } ``` -#### 6.1.5 删除某个图及其全部数据 +#### 6.1.6 删除某个图及其全部数据 ##### Params diff --git a/content/en/docs/clients/restful-api/graphs.md b/content/en/docs/clients/restful-api/graphs.md index aae24104..82ca91d8 100644 --- a/content/en/docs/clients/restful-api/graphs.md +++ b/content/en/docs/clients/restful-api/graphs.md @@ -75,16 +75,52 @@ DELETE http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+t 204 ``` -#### 6.1.4 Create graph,**This operation requires administrator privileges** +#### 6.1.4 Clone graph,**This operation requires administrator privileges** ##### Params -- clone_graph_name: name of an exist graph +- clone_graph_name: name of an exist graph. + To clone from an existing graph, the user can choose to transfer the configuration file, + which will replace the configuration in the existing graph ##### Method & Url ``` -POST http://localhost:8080/graphs/hugegraph2?clone_graph_name=hugegraph +POST http://localhost:8080/graphs/hugegraph_clone?clone_graph_name=hugegraph +``` + +##### Request Body [Optional] + +``` +gremlin.graph=com.baidu.hugegraph.auth.HugeFactoryAuthProxy +backend=rocksdb +serializer=binary +store=hugegraph_clone +rocksdb.data_path=./hg2 +rocksdb.wal_path=./hg2 +``` + +##### Response Status + +```json +200 +``` + +##### Response Body + +```json +{ + "name": "hugegraph_clone", + "backend": "rocksdb" +} +``` + +#### 6.1.5 Create graph,**This operation requires administrator privileges** + +##### Method & Url + +``` +POST http://localhost:8080/graphs/hugegraph2 ``` ##### Request Body @@ -108,12 +144,12 @@ rocksdb.wal_path=./hg2 ```json { - "name": "hugegraph_clone", + "name": "hugegraph2", "backend": "rocksdb" } ``` -#### 6.1.5 Delete graph and it's data +#### 6.1.6 Delete graph and it's data ##### Params
