You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/01/12 12:29:13 UTC
[pulsar-site] branch main updated: [doc][improve] add instructions for REST API JSON files and fix 404 issues (#378)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new d862841117f [doc][improve] add instructions for REST API JSON files and fix 404 issues (#378)
d862841117f is described below
commit d862841117f3acf37eeef56df297f236fd08819c
Author: Anonymitaet <50...@users.noreply.github.com>
AuthorDate: Thu Jan 12 20:29:07 2023 +0800
[doc][improve] add instructions for REST API JSON files and fix 404 issues (#378)
---
contribute/document-preview.md | 4 +++-
docs/admin-api-overview.md | 6 +++---
docs/admin-get-started.md | 6 ++++--
versioned_docs/version-2.11.x/admin-api-overview.md | 6 +++---
versioned_docs/version-2.11.x/admin-get-started.md | 4 ++--
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/contribute/document-preview.md b/contribute/document-preview.md
index 3976beae9cb..61db1347532 100644
--- a/contribute/document-preview.md
+++ b/contribute/document-preview.md
@@ -60,8 +60,10 @@ By default, a browser window will open at [http://localhost:3000](http://localho

-::: tip
+:::tip
+
When you click on `Docs`, you are taken to the latest stable version (e.g., `http://localhost:3000/docs/2.10.x/`). If you want to preview changes on `master`, change the URL to `http://localhost:3000/docs/next`
+
:::
### Stop preview
diff --git a/docs/admin-api-overview.md b/docs/admin-api-overview.md
index 6d8756ff963..a9560ff2292 100644
--- a/docs/admin-api-overview.md
+++ b/docs/admin-api-overview.md
@@ -29,11 +29,11 @@ You can interact with the admin interface via:
:::
-- HTTP calls, which are made against the admin {@inject: rest:REST:/} API provided by Pulsar brokers. For some RESTful APIs, they might be redirected to the owner brokers for serving with [`307 Temporary Redirect`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), hence the HTTP callers should handle `307 Temporary Redirect`. If you use `curl` commands, you should specify `-L` to handle redirections.
+- HTTP calls, which are made against the admin [REST API](reference-rest-api-overview.md) provided by Pulsar brokers. For some RESTful APIs, they might be redirected to the owner brokers for serving with [`307 Temporary Redirect`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), hence the HTTP callers should handle `307 Temporary Redirect`. If you use `curl` commands, you should specify `-L` to handle redirections.
:::tip
- For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc.
+ For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see [REST API doc](reference-rest-api-overview.md).
:::
@@ -41,7 +41,7 @@ You can interact with the admin interface via:
:::tip
- For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](/api/admin/).
+ For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/).
:::
diff --git a/docs/admin-get-started.md b/docs/admin-get-started.md
index a68dc556b23..b0c0a8eee4e 100644
--- a/docs/admin-get-started.md
+++ b/docs/admin-get-started.md
@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem';
## Admin setup
-Each of the three admin interfaces (the `pulsar-admin` CLI tool, the {@inject: rest:REST:/} API, and the [Java admin API](/api/admin)) requires some special setup if you have enabled authentication in your Pulsar instance.
+Each of the three admin interfaces (the `pulsar-admin` CLI tool, the [REST API](reference-rest-api-overview.md), and the [Java admin API](https://pulsar.apache.org/api/admin/)) requires some special setup if you have enabled authentication in your Pulsar instance.
````mdx-code-block
<Tabs groupId="api-choice"
@@ -34,7 +34,9 @@ If you have enabled authentication, you need to provide an auth configuration to
</TabItem>
<TabItem value="REST API">
-You can find details for the REST API exposed by Pulsar brokers in this {@inject: rest:document:/}.
+You can find details for the REST API exposed by Pulsar brokers in the [REST API doc](reference-rest-api-overview.md).
+
+If you want to test REST APIs in postman, you can use the REST API JSON files [here](https://pulsar.apache.org/swagger/master/).
</TabItem>
<TabItem value="Java">
diff --git a/versioned_docs/version-2.11.x/admin-api-overview.md b/versioned_docs/version-2.11.x/admin-api-overview.md
index 6d8756ff963..a9560ff2292 100644
--- a/versioned_docs/version-2.11.x/admin-api-overview.md
+++ b/versioned_docs/version-2.11.x/admin-api-overview.md
@@ -29,11 +29,11 @@ You can interact with the admin interface via:
:::
-- HTTP calls, which are made against the admin {@inject: rest:REST:/} API provided by Pulsar brokers. For some RESTful APIs, they might be redirected to the owner brokers for serving with [`307 Temporary Redirect`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), hence the HTTP callers should handle `307 Temporary Redirect`. If you use `curl` commands, you should specify `-L` to handle redirections.
+- HTTP calls, which are made against the admin [REST API](reference-rest-api-overview.md) provided by Pulsar brokers. For some RESTful APIs, they might be redirected to the owner brokers for serving with [`307 Temporary Redirect`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), hence the HTTP callers should handle `307 Temporary Redirect`. If you use `curl` commands, you should specify `-L` to handle redirections.
:::tip
- For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see {@inject: rest:REST:/} API doc.
+ For the latest and complete information about `REST API`, including parameters, responses, samples, and more, see [REST API doc](reference-rest-api-overview.md).
:::
@@ -41,7 +41,7 @@ You can interact with the admin interface via:
:::tip
- For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](/api/admin/).
+ For the latest and complete information about `Java admin API`, including classes, methods, descriptions, and more, see [Java admin API doc](https://pulsar.apache.org/api/admin/).
:::
diff --git a/versioned_docs/version-2.11.x/admin-get-started.md b/versioned_docs/version-2.11.x/admin-get-started.md
index a68dc556b23..0552b06045e 100644
--- a/versioned_docs/version-2.11.x/admin-get-started.md
+++ b/versioned_docs/version-2.11.x/admin-get-started.md
@@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem';
## Admin setup
-Each of the three admin interfaces (the `pulsar-admin` CLI tool, the {@inject: rest:REST:/} API, and the [Java admin API](/api/admin)) requires some special setup if you have enabled authentication in your Pulsar instance.
+Each of the three admin interfaces (the `pulsar-admin` CLI tool, the [REST API](reference-rest-api-overview.md), and the [Java admin API](https://pulsar.apache.org/api/admin/)) requires some special setup if you have enabled authentication in your Pulsar instance.
````mdx-code-block
<Tabs groupId="api-choice"
@@ -34,7 +34,7 @@ If you have enabled authentication, you need to provide an auth configuration to
</TabItem>
<TabItem value="REST API">
-You can find details for the REST API exposed by Pulsar brokers in this {@inject: rest:document:/}.
+You can find details for the REST API exposed by Pulsar brokers in [REST API doc](reference-rest-api-overview.md).
</TabItem>
<TabItem value="Java">