Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #1973

Merged
merged 1 commit into from
Jul 18, 2022
Merged

update #1973

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/12.query-visually.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

## 页面元素

![visual_overview](https://docs-cdn.nebula-graph.com.cn/figures/visual-query-beta_2022-04-15_15-40-07_cn.png)
![visual_overview](https://docs-cdn.nebula-graph.com.cn/figures/visual-query-20220718-cn.png)

在 Explorer 页面顶部,单击 **Visual Query** 进入可视化查询页面。在**可视化查询**页面左侧可以看到图空间对应的所有 Tag (如 player 和 team) 和名为**任意标签** Tag。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

登录 Explorer 后,系统首先会显示图空间选择页面,用户只需选择目标图空间即可。

![Create_graphspace](https://docs-cdn.nebula-graph.com.cn/figures/create-graphspace_cn.png)
![Create_graphspace](https://docs-cdn.nebula-graph.com.cn/figures/select-space-220718-cn.png)

之后如果要再次选择图空间,可以通过以下方式:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

|参数|类型|是否必填|默认值|示例|说明|
|:---|:---|:---|:---|:---|:---|
|`job_id`|number|必填|-|`1964`|作业 ID。可以通过其他 API 查询到,或者在作业列表页面查看。|
|`job_id`|number|必填|-|`1964`|作业 ID。可以通过 API [获取所有作业列表](api-get-jobs.md)查询,或者在作业列表页面查看。|

### Headers 参数

Expand All @@ -29,15 +29,15 @@

### 请求示例

```http
```bash
curl -i -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Cookie: "explorer_token=eyJhbxxx"" http://192.168.8.145:7002/api-open/v1/jobs/30600/cancel
```

## 返回参数

|参数|类型|示例|说明|
|:---|:---|:---|:---|
|`code` | number | `0` | |
|`code` | number | `0` | 请求结果码。请求成功返回`0`,请求不成功返回对应的错误码。详情参见[工作流 API 概览](workflow-api-overview.md)。 |
|`message` | string | `Success` | 执行结果信息。 |
|`data` | object | - | 返回的数据列表。 |
|    - `success` | bool | `true` | 是否成功终止。|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

|参数|类型|是否必填|默认值|示例|说明|
|:---|:---|:---|:---|:---|:---|
|`job_id`|number|必填|-|`1964`|作业 ID。可以通过其他 API 查询到,或者在作业列表页面查看。|
|`job_id`|number|必填|-|`1964`|作业 ID。可以通过 API [获取所有作业列表](api-get-jobs.md)查询,或者在作业列表页面查看。|

### Headers 参数

Expand All @@ -29,15 +29,15 @@

### 请求示例

```http
```bash
curl -i -X GET -H "Content-Type: application/json" -H "Cookie: "explorer_token=eyJhbxxx"" http://192.168.8.145:7002/api-open/v1/jobs/1964
```

## 返回参数

|参数|类型|示例|说明|
|:---|:---|:---|:---|
|`code` | number | `0` | |
|`code` | number | `0` | 请求结果码。请求成功返回`0`,请求不成功返回对应的错误码。详情参见[工作流 API 概览](workflow-api-overview.md)。 |
|`message` | string | `Success` | 执行结果信息。 |
|`data` | object | - | 返回的数据列表。 |
|    - `id` | number | `1964` | 作业 ID。|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

|参数|类型|是否必填|默认值|示例|说明|
|:---|:---|:---|:---|:---|:---|
|`job_id`|number|必填|-|`29987`|作业 ID。可以通过其他 API 查询到,或者在作业列表页面查看。|
|`job_id`|number|必填|-|`29987`|作业 ID。可以通过 API [获取所有作业列表](api-get-jobs.md)查询,或者在作业列表页面查看。|
|`task_id`|number|必填|-|`8c171f70fb6f11ecac7e6da0662c195b`|作业 ID。可以通过其他 API 查询到,或者在指定作业页面单击组件,在右上角查看。|

### Headers 参数
Expand All @@ -34,15 +34,15 @@

### 请求示例

```http
```bash
curl -i -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Cookie: "explorer_token=eyJhbxxx"" http://192.168.8.145:7002/api-open/v1/jobs/29987/tasks/8c171f70fb6f11ecac7e6da0662c195b/sample_result?limit=1000
```

## 返回参数

|参数|类型|示例|说明|
|:---|:---|:---|:---|
|`code` | number | `0` | |
|`code` | number | `0` | 请求结果码。请求成功返回`0`,请求不成功返回对应的错误码。详情参见[工作流 API 概览](workflow-api-overview.md)。 |
|`message` | string | `Success` | 执行结果信息。 |
|`data` | object | - | 返回的数据列表。 |
|    - `items`|list|-|详细结果列表。|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@

`jobs?`后的内容为 Body 参数,`filter`的内容是进过 URL 编码的结果。原始内容为:`{ "status": 2, "orderByCreateTime": "asc"}`。

```http
```bash
curl -i -X GET -H "Content-Type: application/json" -H "Cookie: "explorer_token=eyJhbxxx"" http://192.168.8.145:7002/api-open/v1/jobs?filter=%7B%20%22status%22%3A%202%2C%20%20%22orderByCreateTime%22%3A%20%22asc%22%7D&pageSize=10&page=1
```

## 返回参数

|参数|类型|示例|说明|
|:---|:---|:---|:---|
|`code` | number | `0` | |
|`code` | number | `0` | 请求结果码。请求成功返回`0`,请求不成功返回对应的错误码。详情参见[工作流 API 概览](workflow-api-overview.md)。 |
|`message` | string | `Success` | 执行结果信息。 |
|`data` | object | - | 返回的数据列表。 |
|   - `total` | number | `2` |记录总数。 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@

`jobs?`后的内容为 Body 参数,`filter`的内容是进过 URL 编码的结果。原始内容为:`{"status": 2, "fromCreateTime": 1657874100000}`。

```http
```bash
curl -i -X GET -H "Content-Type: application/json" -H "Cookie: "explorer_token=eyJhbxxx"" http://192.168.8.145:7002/api-open/v1/workflows/4216617528/jobs?filter=%7B%22status%22%3A%202%2C%20%20%22fromCreateTime%22%3A%201657874100000%7D&pageSize=10&page=1
```

## 返回参数

|参数|类型|示例|说明|
|:---|:---|:---|:---|
|`code` | number | `0` | |
|`code` | number | `0` | 请求结果码。请求成功返回`0`,请求不成功返回对应的错误码。详情参见[工作流 API 概览](workflow-api-overview.md)。 |
|`message` | string | `Success` | 执行结果信息。 |
|`data` | object | - | 返回的数据列表。 |
|   - `total` | number | `2` |记录总数。 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@

![api-postjob](https://docs-cdn.nebula-graph.com.cn/figures/api-postjob-220715-cn.png)

```http
```bash
curl -i -X POST -H "Content-Type: application/json" -H "Cookie: "explorer_token=eyJhbxxx"" -d '{"input":{"query_1":{"name":"Tim Duncan"}}}' http://192.168.8.145:7002/api-open/v1/workflows/4216617528/jobs
```

## 返回参数

|参数|类型|示例|说明|
|:---|:---|:---|:---|
|`code` | number | `0` | |
|`code` | number | `0` | 请求结果码。请求成功返回`0`,请求不成功返回对应的错误码。详情参见[工作流 API 概览](workflow-api-overview.md)。 |
|`message` | string | `Success` | 执行结果信息。 |
|`data` | object | - | 返回的数据列表。 |
|   - `id`|string|`107`|新增作业的 ID。|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Nebula Explorer 提供 API 接口使用工作流的部分功能。

格式如下:

```http
```bash
curl <options> http://<explorer_address>:<explorer_port>/<api_path>?{<body>}
```

Expand All @@ -39,7 +39,7 @@ curl <options> http://<explorer_address>:<explorer_port>/<api_path>?{<body>}
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <account_base64_encode>" -d '{"address":"<nebula_address>","port":<nebula_port>}' http://<explorer_address>:<explorer_port>/api-open/v1/connect
```

- `<account_base64_encode>`:base64 编码后的 Nebula Graph 账号和密码。编码前格式为`账号:密码`,下文示例为`root:123`,编码后为`cm9vdDoxMjM=`。
- `<account_base64_encode>`:Base64 编码后的 Nebula Graph 账号和密码。编码前格式为`账号:密码`,下文示例为`root:123`,编码后为`cm9vdDoxMjM=`。
- `<nebula_address>`:Nebula Graph 访问地址。
- `<nebula_port>`:Nebula Graph 访问端口。
- `<explorer_address>`:Nebula Explorer 访问地址。
Expand All @@ -61,7 +61,13 @@ Traceparent: 00-1c3f55cdbf81e13a2331ed88155ce0bf-2b97474943563f20-# 00
Date: Thu, 14 Jul 2022 06:47:01 GMT
Content-Length: 54

{"code":0,"data":{"success":true},"message":"Success"}
{
"code": 0,
"data": {
"success": true
},
"message": "Success"
}
```

需要关注的参数如下:
Expand All @@ -76,9 +82,9 @@ Content-Length: 54

```http
{
code: 200,
message: 'success',
data: ResponseData
code: 0,
message: 'Success',
data: <ResponseData> //根据接口返回相应结果。
}
```

Expand All @@ -87,7 +93,7 @@ Content-Length: 54
```http
{
code: 40004000,
message: 'ErrBadRequest',
message: '<ErrBadRequest>', //返回具体报错信息。
}
```

Expand Down