This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch fix-create-graph
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git

commit a870d902db89d63853e0482ed77fa63b39e3fd43
Author: imbajin <[email protected]>
AuthorDate: Wed Sep 11 16:58:29 2024 +0800

    fix: misleading in dynamic crate graph api
---
 content/cn/docs/clients/restful-api/graphs.md | 30 ++++++++++++++++++---------
 content/en/docs/clients/restful-api/graphs.md | 28 ++++++++++++++++---------
 2 files changed, 38 insertions(+), 20 deletions(-)

diff --git a/content/cn/docs/clients/restful-api/graphs.md 
b/content/cn/docs/clients/restful-api/graphs.md
index 07327e6f..9e1b8a8d 100644
--- a/content/cn/docs/clients/restful-api/graphs.md
+++ b/content/cn/docs/clients/restful-api/graphs.md
@@ -74,7 +74,7 @@ DELETE 
http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+t
 204
 ```
 
-#### 6.1.4 克隆一个图,**该操作需要管理员权限**
+#### 6.1.4 克隆一个图 (**管理员权限**)
 
 ##### Params
 
@@ -86,17 +86,22 @@ DELETE 
http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+t
 POST http://localhost:8080/graphs/hugegraph_clone?clone_graph_name=hugegraph
 ```
 
-##### Request Body【可选】
+##### Request Body (可选)
 
-```
-gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
+克隆 (fork) 一个无权限的新图 (body 类型必须设置为 `Context-Type=text/plain`)
+
+```properties
+gremlin.graph=org.apache.hugegraph.HugeFactory
 backend=rocksdb
 serializer=binary
 store=hugegraph_clone
 rocksdb.data_path=./rks-data-xx
 rocksdb.wal_path=./rks-data-xx
 ```
-> Note: 存储路径不能与现有图相同(使用不同的目录)
+
+> Note:
+> 1. Rocksdb 存储路径不能与现有图相同(需使用不同的目录)
+> 2. 如需开启新图的权限系统,需替换设置 
`gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy`
 
 ##### Response Status
 
@@ -123,15 +128,20 @@ POST http://localhost:8080/graphs/hugegraph-xx
 
 ##### Request Body
 
-```
-gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
+新建一个无权限的新图 (body 类型必须设置为 `Context-Type=text/plain`)
+
+```properties
+gremlin.graph=org.apache.hugegraph.HugeFactory
 backend=rocksdb
 serializer=binary
 store=hugegraph2
 rocksdb.data_path=./rks-data-xx
 rocksdb.wal_path=./rks-data-xx
 ```
-> Note: 存储路径不能与现有图相同(使用不同的目录)
+
+> Note:
+> 1. Rocksdb 存储路径不能与现有图相同(需使用不同的目录)
+> 2. 如需开启新图的权限系统,需替换设置 
`gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy`
 
 ##### Response Status
 
@@ -158,7 +168,7 @@ rocksdb.wal_path=./rks-data-xx
 
 ##### Method & Url
 
-```
+```javascript
 DELETE 
http://localhost:8080/graphs/hugegraph_clone?confirm_message=I%27m%20sure%20to%20drop%20the%20graph
 ```
 
@@ -174,7 +184,7 @@ DELETE 
http://localhost:8080/graphs/hugegraph_clone?confirm_message=I%27m%20sure
 
 ##### Method & Url
 
-```
+```javascript
 GET http://localhost:8080/graphs/hugegraph/conf
 ```
 
diff --git a/content/en/docs/clients/restful-api/graphs.md 
b/content/en/docs/clients/restful-api/graphs.md
index ac2508cb..3ce4bb5f 100644
--- a/content/en/docs/clients/restful-api/graphs.md
+++ b/content/en/docs/clients/restful-api/graphs.md
@@ -78,7 +78,7 @@ DELETE 
http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+t
 204
 ```
 
-#### 6.1.4 Clone graph,**This operation requires administrator privileges**
+#### 6.1.4 Clone graph,**this operation requires administrator privileges**
 
 ##### Params
 
@@ -94,8 +94,10 @@ POST 
http://localhost:8080/graphs/hugegraph_clone?clone_graph_name=hugegraph
 
 ##### Request Body [Optional]
 
-```
-gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
+Clone a `non-auth` mode graph: (Must set body `Context-Type=text/plain`)
+
+```properties
+gremlin.graph=org.apache.hugegraph.HugeFactory
 backend=rocksdb
 serializer=binary
 store=hugegraph_clone
@@ -103,7 +105,9 @@ rocksdb.data_path=./rks-data-xx
 rocksdb.wal_path=./rks-data-xx
 ```
 
-> Note: the data/wal_path can't be the same as the existing graph (use 
separate directories)
+> Note: 
+> 1. The data/wal_path can't be the same as the existing graph (use separate 
directories)
+> 2. Replace "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy" to 
enable auth mode
 
 ##### Response Status
 
@@ -120,7 +124,7 @@ rocksdb.wal_path=./rks-data-xx
 }
 ```
 
-#### 6.1.5 Create graph,**This operation requires administrator privileges**
+#### 6.1.5 Create graph,**this operation requires administrator privileges**
 
 ##### Method & Url
 
@@ -130,8 +134,10 @@ POST http://localhost:8080/graphs/hugegraph2
 
 ##### Request Body
 
-```
-gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy
+create a non-auth graph: (Must set body `Context-Type=text/plain`)
+
+```properties
+gremlin.graph=org.apache.hugegraph.HugeFactory
 backend=rocksdb
 serializer=binary
 store=hugegraph2
@@ -139,7 +145,9 @@ rocksdb.data_path=./rks-data-xx
 rocksdb.wal_path=./rks-data-xx
 ```
 
-> Note: the data/wal_path can't be the same as the existing graph (use 
separate directories)
+> Note: 
+> 1. The data/wal_path can't be the same as the existing graph (use separate 
directories)
+> 2. Replace "gremlin.graph=org.apache.hugegraph.auth.HugeFactoryAuthProxy" to 
enable auth mode
 
 ##### Response Status
 
@@ -184,7 +192,7 @@ DELETE 
http://localhost:8080/graphs/hugegraph_clone?confirm_message=I%27m%20sure
 
 ##### Method & Url
 
-```
+```javascript
 GET http://localhost:8080/graphs/hugegraph/conf
 ```
 
@@ -437,4 +445,4 @@ PUT http://localhost:8080/graphs/hugegraph/compact
     "local": "OK"
   }
 }
-```
\ No newline at end of file
+```

Reply via email to