Skip to content
Permalink
Browse files
paths, crosspoints, rings, rays, mode, index create API description
Change-Id: I9114c0c29e89c8b24d771270a44c8e79aca1403f
  • Loading branch information
zhoney authored and javeme committed Nov 23, 2018
1 parent f1bd3eb commit 7c31934dbc2b025b31aaaaaf75e7c7b732818e72
Showing 3 changed files with 517 additions and 23 deletions.
@@ -52,15 +52,14 @@ GET http://localhost:8080/graphs/hugegraph

##### Params

由于清空图是一个比较危险的操作,为避免用户误调用,我们给API添加了一些用于确认的参数,目前有两个
由于清空图是一个比较危险的操作,为避免用户误调用,我们给API添加了用于确认的参数

- token: 默认为`162f7848-0b6d-4faf-b557-3a0797869c55`
- confirm_message: 默认为`I'm sure to delete all data`

##### Method & Url

```
DELETE http://localhost:8080/graphs/hugegraph/clear?token=162f7848-0b6d-4faf-b557-3a0797869c55&confirm_message=I%27m+sure+to+delete+all+data
DELETE http://localhost:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+to+delete+all+data
```

##### Response Status
@@ -73,14 +72,10 @@ DELETE http://localhost:8080/graphs/hugegraph/clear?token=162f7848-0b6d-4faf-b55

#### 5.2.1 查看某个图的配置,**该操作需要管理员权限**

##### Params

- token: 默认为`162f7848-0b6d-4faf-b557-3a0797869c55`

##### Method & Url

```
GET http://localhost:8080/graphs/hugegraph/conf?token=162f7848-0b6d-4faf-b557-3a0797869c55
GET http://localhost:8080/graphs/hugegraph/conf
```

##### Response Status
@@ -110,4 +105,64 @@ serializer=cassandra
store=hugegraph
...
```
```

### 5.3 Mode

#### 5.3.1 查看某个图的模式. **该操作需要管理员权限**

##### Method & Url

```
GET http://localhost:8080/graphs/hugegraph/mode
```

##### Response Status

```json
200
```

##### Response Body

```json
{
"mode": "NONE"
}
```

> 合法的图模式包括:NONE,RESTORING,MERGING
#### 5.3.2 设置某个图的模式. **该操作需要管理员权限**

##### Params

- token: 默认为`162f7848-0b6d-4faf-b557-3a0797869c55`

##### Method & Url

```
PUT http://localhost:8080/graphs/hugegraph/mode
```

##### Response Body

```
"RESTORING"
```

> 合法的图模式包括:NONE,RESTORING,MERGING
##### Response Status

```json
200
```

##### Response Body

```json
{
"mode": "RESTORING"
}
```
@@ -21,6 +21,7 @@ POST http://localhost:8080/graphs/hugegraph/schema/indexlabels
"fields": [
"city"
]
}
```

@@ -34,14 +35,17 @@ POST http://localhost:8080/graphs/hugegraph/schema/indexlabels

```json
{
"id": 1,
"base_type": "VERTEX_LABEL",
"base_value": "person",
"name": "personByCity",
"fields": [
"city"
],
"index_type": "SECONDARY"
"index_label": {
"id": 1,
"base_type": "VERTEX_LABEL",
"base_value": "person",
"name": "personByCity",
"fields": [
"city"
],
"index_type": "SECONDARY"
},
"task_id": 2
}
```

0 comments on commit 7c31934

Please sign in to comment.