You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/05/26 05:53:33 UTC

[GitHub] [incubator-hugegraph-doc] javeme commented on a diff in pull request #136: update:append new api for graphs & translate

javeme commented on code in PR #136:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/136#discussion_r882337488


##########
content/cn/docs/clients/restful-api/graphs.md:
##########
@@ -188,3 +235,149 @@ PUT http://localhost:8080/graphs/hugegraph/mode
     "mode": "RESTORING"
 }
 ```
+
+#### 6.3.3 查看某个图的读模式.
+
+##### Params
+
+- name: 图的名称
+
+##### Method & Url
+
+```
+GET http://localhost:8080/graphs/hugegraph/graph_read_mode
+```
+
+##### Response Status
+
+```json
+200
+```
+
+##### Response Body
+
+```json
+{
+    "graph_read_mode": "ALL"
+}
+```
+
+#### 6.3.4 设置某个图的读模式. **该操作需要管理员权限**
+
+##### Params
+
+- name: 图的名称
+
+##### Method & Url
+
+```
+PUT http://localhost:8080/graphs/hugegraph/graph_read_mode
+```
+
+##### Request Body
+
+```
+"OLTP_ONLY"
+```
+
+> 合法的图模式包括:ALL,OLTP_ONLY,OLAP_ONLY
+
+##### Response Status
+
+```json
+200
+```
+
+##### Response Body
+
+```json
+{
+    "graph_read_mode": "OLTP_ONLY"
+}
+```
+
+### 6.4 Snapshot
+
+#### 6.4.1 创建快照
+
+##### Params
+
+- name: 图的名称
+
+##### Method & Url
+
+```
+PUT http://localhost:8080/graphs/hugegraph/snapshot_create
+```
+
+##### Response Status
+
+```json
+200
+```
+
+##### Response Body
+
+```json
+{
+    "hugegraph": "snapshot_created"
+}
+```
+
+#### 6.4.2 快照恢复
+
+##### Params
+
+- name: 图的名称
+
+##### Method & Url
+
+```
+PUT http://localhost:8080/graphs/hugegraph/snapshot_resume
+```
+
+##### Response Status
+
+```json
+200
+```
+
+##### Response Body
+
+```json
+{
+    "hugegraph": "snapshot_resumed"
+}
+```
+
+### 6.5 Compact
+
+#### 6.5.1 手动紧致图,**该操作需要管理员权限**

Review Comment:
   手动压缩图



##########
content/cn/docs/clients/restful-api/graphs.md:
##########
@@ -74,6 +74,53 @@ DELETE http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+t
 204
 ```
 
+#### 6.1.4 创建一个图,**该操作需要管理员权限**
+
+##### Params
+
+- clone_graph_name: 已有的一个graph名称
+
+##### Method & Url
+
+```
+POST http://localhost:8080/graphs/hugegraph_clone?clone_graph_name=hugegraph

Review Comment:
   TODO: add graph-create api desc, like https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-client/src/test/java/com/baidu/hugegraph/api/GraphsApiTest.java#L66
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org