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 explorer api #2600

Merged
merged 1 commit into from
Feb 21, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 编码后的 NebulaGraph 账号和密码。编码前格式为`账号:密码`,下文示例为`root:123`,编码后为`cm9vdDoxMjM=`。
- `<account_base64_encode>`:Base64 编码后的 NebulaGraph 账号和密码。编码前格式为 `JSON.stringify([用户名, 密码])`。以用户名`root`、密码`123`为例,`JSON.stringify`函数处理后的字符串为`["root","123"]`,Base64 编码后为`WyJyb290IiwiMTIzIl0=`。
- `<nebula_address>`:NebulaGraph 访问地址。
- `<nebula_port>`:NebulaGraph 访问端口。
- `<explorer_address>`:NebulaGraph Explorer 访问地址。
Expand All @@ -48,7 +48,7 @@ curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <a
示例:

```bash
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer cm9vdDoxMjM=" -d '{"address":"192.168.8.111","port":9669}' http://192.168.8.145:7002/api-open/v1/connect
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer WyJyb290IiwiMTIzIl0=" -d '{"address":"192.168.8.111","port":9669}' http://192.168.8.145:7002/api-open/v1/connect
```

返回结果:
Expand Down