Skip to content

Commit 39bcd03

Browse files
committed
fix: fix docs
1 parent 339fa53 commit 39bcd03

File tree

8 files changed

+144
-46
lines changed

8 files changed

+144
-46
lines changed

content/cn/docs/clients/restful-api/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ weight: 1
99
> - HugeGraph 1.7.0+ 引入了图空间功能,API 路径格式为:`/graphspaces/{graphspace}/graphs/{graph}`
1010
> - HugeGraph 1.5.x 及之前版本使用旧路径:`/graphs/{graph}`, 以及创建/克隆图的 api 使用 text/plain 作为 Content-Type, 1.7.0 及之后使用 json
1111
> - 默认图空间名称为 `DEFAULT`,可直接使用
12+
> - 旧版本 doc 参考:[HugeGraph 1.5.x RESTful API](https://github.com/apache/incubator-hugegraph-doc/tree/release-1.5.0)
1213
1314
除了下方的文档,你还可以通过 `localhost:8080/swagger-ui/index.html` 访问 `swagger-ui` 以查看 `RESTful API`[示例可以参考此处](/cn/docs/quickstart/hugegraph/hugegraph-server#swaggerui-example)
1415

content/cn/docs/clients/restful-api/auth.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ city: Beijing})
2222

2323
##### 接口说明:
2424
用户认证与权限控制接口包括 5 类:UserAPI、GroupAPI、TargetAPI、BelongAPI、AccessAPI。
25+
**注意**: 1.5.0 及之前,group/target 等 id 的格式类似 -69:grant,1.7.0 及之后,id 和 name 一致,如 admin [HugeGraph 1.5.x RESTful API](https://github.com/apache/incubator-hugegraph-doc/tree/release-1.5.0)
2526

2627
### 10.2 用户(User)API
2728
用户接口包括:创建用户,删除用户,修改用户,和查询用户相关信息接口。

content/cn/docs/clients/restful-api/graphspace.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: "Graphspace API"
33
linkTitle: "Graphspace"
44
weight: 1
5+
description: "Graphspace(图空间)REST 接口:多租户与资源隔离的创建、查看、更新与删除,以及使用前置条件与限制。"
56
---
67

78
### 2.0 Graphspace
@@ -73,8 +74,8 @@ POST http://localhost:8080/graphspaces
7374
"name": "gs1",
7475
"description": "1st graph space",
7576
"cpu_limit": 1000,
76-
"memory_limit": 1024,
77-
"storage_limit": 1000,
77+
"memory_limit": 8192,
78+
"storage_limit": 1000000,
7879
"compute_cpu_limit": 0,
7980
"compute_memory_limit": 0,
8081
"oltp_namespace": "hugegraph-server",
@@ -145,8 +146,8 @@ GET http://localhost:8080/graphspaces/gs1
145146
"name": "gs1",
146147
"description": "1st graph space",
147148
"cpu_limit": 1000,
148-
"memory_limit": 1024,
149-
"storage_limit": 1000,
149+
"memory_limit": 8192,
150+
"storage_limit": 1000000,
150151
"oltp_namespace": "hugegraph-server",
151152
"olap_namespace": "hugegraph-server",
152153
"storage_namespace": "hugegraph-server",
@@ -237,17 +238,17 @@ PUT http://localhost:8080/graphspaces/gs1
237238
"name": "gs1",
238239
"description": "1st graph space",
239240
"cpu_limit": 2000,
240-
"memory_limit": 1024,
241-
"storage_limit": 1000,
241+
"memory_limit": 40960,
242+
"storage_limit": 2048,
242243
"oltp_namespace": "hugegraph-server",
243244
"olap_namespace": "hugegraph-server",
244245
"storage_namespace": "hugegraph-server",
245246
"operator_image_path": "127.0.0.1/hugegraph-registry/hugegraph-computer-operator:3.1.1",
246247
"internal_algorithm_image_url": "127.0.0.1/hugegraph-registry/hugegraph-computer-algorithm:3.1.1",
247248
"compute_cpu_limit": 0,
248249
"compute_memory_limit": 0,
249-
"max_graph_number": 100,
250-
"max_role_number": 10,
250+
"max_graph_number": 1000,
251+
"max_role_number": 100,
251252
"cpu_used": 0,
252253
"memory_used": 0,
253254
"storage_used": 0,

content/en/docs/clients/restful-api/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ weight: 1
99
> - HugeGraph 1.7.0+ introduces graphspaces, and REST paths follow `/graphspaces/{graphspace}/graphs/{graph}`.
1010
> - HugeGraph 1.5.x and earlier still rely on the legacy `/graphs/{graph}` path, and the create/clone graph APIs require `Content-Type: text/plain`; 1.7.0+ expects JSON bodies.
1111
> - The default graphspace name is `DEFAULT`, which you can use directly if you do not need multi-tenant isolation.
12+
> - **Note**: Before version 1.5.0, the format of ids such as group/target was similar to -69:grant. After version 1.7.0, the id and name were consistent, such as admin [HugeGraph 1.5.x RESTful API](https://github.com/apache/incubator-hugegraph-doc/tree/release-1.5.0)
13+
1214

1315
Besides the documentation below, you can also open `swagger-ui` at `localhost:8080/swagger-ui/index.html` to explore the RESTful API. [Here is an example](/docs/quickstart/hugegraph/hugegraph-server#swaggerui-example)
1416

content/en/docs/clients/restful-api/auth.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Description: User 'boss' has read permission for people in the 'graph1' graph fr
1717

1818
##### Interface Description:
1919
The user authentication and access control interface includes 5 categories: UserAPI, GroupAPI, TargetAPI, BelongAPI, AccessAPI.
20+
**Note** Before 1.5.0, the format of ids such as group/target was similar to -69:grant. After 1.7.0, the id and name were consistent. Such as admin [HugeGraph 1.5 x RESTful API](https://github.com/apache/incubator-hugegraph-doc/tree/release-1.5.0)
2021

2122
### 10.2 User (User) API
2223
The user interface includes APIs for creating users, deleting users, modifying users, and querying user-related information.

content/en/docs/clients/restful-api/cypher.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,31 @@ weight: 15
1111
##### Method & Url
1212

1313
```javascript
14-
GET /graphs/{graph}/cypher?cypher={cypher}
14+
GET / graphspaces / {graphspace}
15+
/graphs/
16+
{
17+
graph
18+
}
19+
/cypher?cypher={cypher}
1520
```
1621
1722
##### Params
23+
24+
**Path parameters**
25+
26+
- graphspace: Graphspace name
1827
- graph: Graph name
28+
29+
**Query parameters**
30+
1931
- cypher: Cypher statement
2032
2133
2234
##### Example
2335
2436
```javascript
25-
GET http://localhost:8080/graphs/hugecypher1/cypher?cypher=match(n:person) return n.name as name order by n.name limit 1
37+
GET
38+
http://localhost:8080/graphspaces/DEFAULT/graphs/hugecypher1/cypher?cypher=match(n:person) return n.name as name order by n.name limit 1
2639
```
2740

2841
##### Response Status
@@ -61,10 +74,19 @@ GET http://localhost:8080/graphs/hugecypher1/cypher?cypher=match(n:person) retur
6174
##### Method & Url
6275

6376
```javascript
64-
POST /graphs/{graph}/cypher
77+
POST / graphspaces / {graphspace}
78+
/graphs/
79+
{
80+
graph
81+
}
82+
/cypher
6583
```
6684

6785
##### Params
86+
87+
**Path parameters**
88+
89+
- graphspace: Graphspace name
6890
- graph: Graph name
6991

7092
##### Body
@@ -78,7 +100,8 @@ Note:
78100
##### Example
79101

80102
```javascript
81-
POST http://localhost:8080/graphs/hugecypher1/cypher
103+
POST
104+
http://localhost:8080/graphspaces/DEFAULT/graphs/hugecypher1/cypher
82105
```
83106

84107
###### Request Body

content/en/docs/clients/restful-api/graphs.md

Lines changed: 95 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ weight: 12
88

99
**Important Reminder**: Since HugeGraph 1.7.0, dynamic graph creation must enable authentication mode. For non-authentication mode, please refer to [Graph Configuration File](https://hugegraph.apache.org/docs/config/config-guide/#4-hugegraphproperties) to statically create graphs through configuration files.
1010

11-
#### 6.1.1 List all graphs
11+
#### 6.1.1 List all graphs in the graphspace
12+
13+
##### Params
14+
15+
**Path parameters**
16+
17+
- graphspace: Graphspace name
1218

1319
##### Method & Url
1420

1521
```
16-
GET http://localhost:8080/graphs
22+
GET http://localhost:8080/graphspaces/DEFAULT/graphs
1723
```
1824

1925
##### Response Status
@@ -35,6 +41,13 @@ GET http://localhost:8080/graphs
3541

3642
#### 6.1.2 Get details of the graph
3743

44+
##### Params
45+
46+
**Path parameters**
47+
48+
- graphspace: Graphspace name
49+
- graph: Graph name
50+
3851
##### Method & Url
3952

4053
```
@@ -56,15 +69,18 @@ GET http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph
5669
}
5770
```
5871

59-
#### 6.1.3 Clear all data of a graph, include: schema, vertex, edge and index .etc.,**This operation
60-
61-
requires administrator privileges**
72+
#### 6.1.3 Clear all data of a graph, include: schema, vertex, edge and index, **This operation requires administrator privileges**
6273

6374
##### Params
6475

65-
Since emptying the graph is a dangerous operation, we have added parameters for confirmation to the
66-
API to
67-
avoid false calls by users:
76+
**Path parameters**
77+
78+
- graphspace: Graphspace name
79+
- graph: Graph name
80+
81+
**Query parameters**
82+
83+
Since emptying the graph is a dangerous operation, we have added parameters for confirmation to the API to avoid false calls by users:
6884

6985
- confirm_message: default by `I'm sure to delete all data`
7086

@@ -80,13 +96,18 @@ DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/clear?confirm_
8096
204
8197
```
8298

83-
#### 6.1.4 Clone graph,**this operation requires administrator privileges**
99+
#### 6.1.4 Clone graph, **this operation requires administrator privileges**
84100

85101
##### Params
86102

87-
- clone_graph_name: name of an existed graph.
88-
To clone from an existing graph, the user can choose to transfer the configuration file,
89-
which will replace the configuration in the existing graph
103+
**Path parameters**
104+
105+
- graphspace: Graphspace name
106+
- graph: Name of the new graph to create
107+
108+
**Query parameters**
109+
110+
- clone_graph_name: name of an existed 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
90111

91112
##### Method & Url
92113

@@ -128,7 +149,14 @@ Clone a `non-auth` mode graph (set `Content-Type: application/json`)
128149
}
129150
```
130151

131-
#### 6.1.5 Create graph,**this operation requires administrator privileges**
152+
#### 6.1.5 Create graph, **this operation requires administrator privileges**
153+
154+
##### Params
155+
156+
**Path parameters**
157+
158+
- graphspace: Graphspace name
159+
- graph: Graph name
132160

133161
##### Method & Url
134162

@@ -170,13 +198,18 @@ Create a non-auth graph (set `Content-Type: application/json`)
170198
}
171199
```
172200

173-
#### 6.1.6 Delete graph and it's data
201+
#### 6.1.6 Delete graph and its data
174202

175203
##### Params
176204

177-
Since deleting a graph is a dangerous operation, we have added parameters for confirmation to the
178-
API to
179-
avoid false calls by users:
205+
**Path parameters**
206+
207+
- graphspace: Graphspace name
208+
- graph: Graph name
209+
210+
**Query parameters**
211+
212+
Since deleting a graph is a dangerous operation, we have added parameters for confirmation to the API to avoid false calls by users:
180213

181214
- confirm_message: default by `I'm sure to drop the graph`
182215

@@ -196,7 +229,14 @@ DELETE http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph_clone?confirm_
196229
197230
### 6.2 Conf
198231

199-
#### 6.2.1 Get configuration for a graph,**This operation requires administrator privileges**
232+
#### 6.2.1 Get configuration for a graph, **This operation requires administrator privileges**
233+
234+
##### Params
235+
236+
**Path parameters**
237+
238+
- graphspace: Graphspace name
239+
- graph: Graph name
200240

201241
##### Method & Url
202242

@@ -255,7 +295,14 @@ Under normal circumstances, the graph mode is None. When you need to restore the
255295
you need to temporarily modify the graph mode to Restoring or Merging as needed.
256296
When you complete the restore, change the graph mode to None.
257297

258-
#### 6.3.1 Get graph mode.
298+
#### 6.3.1 Get graph mode
299+
300+
##### Params
301+
302+
**Path parameters**
303+
304+
- graphspace: Graphspace name
305+
- graph: Graph name
259306

260307
##### Method & Url
261308

@@ -281,6 +328,13 @@ GET http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/mode
281328
282329
#### 6.3.2 Modify graph mode. **This operation requires administrator privileges**
283330

331+
##### Params
332+
333+
**Path parameters**
334+
335+
- graphspace: Graphspace name
336+
- graph: Graph name
337+
284338
##### Method & Url
285339

286340
```
@@ -309,11 +363,14 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/mode
309363
}
310364
```
311365

312-
#### 6.3.3 Get graph's read mode.
366+
#### 6.3.3 Get graph's read mode
313367

314368
##### Params
315369

316-
- name: name of a graph
370+
**Path parameters**
371+
372+
- graphspace: Graphspace name
373+
- graph: Graph name
317374

318375
##### Method & Url
319376

@@ -339,7 +396,10 @@ GET http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph_read_mode
339396

340397
##### Params
341398

342-
- name: name of a graph
399+
**Path parameters**
400+
401+
- graphspace: Graphspace name
402+
- graph: Graph name
343403

344404
##### Method & Url
345405

@@ -375,7 +435,10 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph_read_mode
375435

376436
##### Params
377437

378-
- name: name of a graph
438+
**Path parameters**
439+
440+
- graphspace: Graphspace name
441+
- graph: Graph name
379442

380443
##### Method & Url
381444

@@ -401,7 +464,10 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/snapshot_create
401464

402465
##### Params
403466

404-
- name: name of a graph
467+
**Path parameters**
468+
469+
- graphspace: Graphspace name
470+
- graph: Graph name
405471

406472
##### Method & Url
407473

@@ -425,11 +491,14 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/snapshot_resume
425491

426492
### 6.5 Compact
427493

428-
#### 6.5.1 Manually compact graph,**This operation requires administrator privileges**
494+
#### 6.5.1 Manually compact graph, **This operation requires administrator privileges**
429495

430496
##### Params
431497

432-
- name: name of a graph
498+
**Path parameters**
499+
500+
- graphspace: Graphspace name
501+
- graph: Graph name
433502

434503
##### Method & Url
435504

0 commit comments

Comments
 (0)