Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Optimize /api links to skip trailing slash redirect.

Anders Kaseorg80a6b12690fc
diff --git a/docs/documentation/api.md b/docs/documentation/api.md
index 05f50624c7e..147c7a09304 100644
--- a/docs/documentation/api.md
+++ b/docs/documentation/api.md
@@ -327,7 +327,7 @@ above.
match the title of the endpoint from the OpenAPI `summary` field.
1. Test your endpoint, pretending to be a new user in a hurry, by
- visiting it via the links on `http://localhost:9991/api` (the API
+ visiting it via the links on `http://localhost:9991/api/` (the API
docs are rendered from the Markdown source files on page load, so
just reload to see an updated version as you edit). You should
make sure that copy-pasting the code in your examples works, and
diff --git a/docs/outreach/gsoc.md b/docs/outreach/gsoc.md
index 92c45621526..45638d3214f 100644
--- a/docs/outreach/gsoc.md
+++ b/docs/outreach/gsoc.md
@@ -215,7 +215,7 @@ Django, TypeScript/JavaScript, and CSS.
Experts: Tim Abbott, Prakhar Pratyush
-- Zulip's [**REST API documentation**](https://zulip.com/api), which is an
+- Zulip's [**REST API documentation**](https://zulip.com/api/), which is an
important resource for any organization integrating with Zulip, as
well as the developers of our API clients. Zulip has a [nice
framework](../documentation/api.md) for writing API documentation
diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md
index edc23bd36c3..654b281879d 100644
--- a/docs/overview/architecture-overview.md
+++ b/docs/overview/architecture-overview.md
@@ -44,7 +44,7 @@ team to tens of thousands of users. It has [hundreds of
features](https://zulip.com/features/) both large and small, and
supports dedicated apps for iOS, Android, Linux, Windows, and macOS,
all modern web browsers, several cross-protocol chat clients, and
-numerous dedicated [Zulip API](https://zulip.com/api) clients
+numerous dedicated [Zulip API](https://zulip.com/api/) clients
(e.g., bots).
A server can host multiple Zulip _realms_ (organizations), each on its
diff --git a/docs/tutorials/writing-views.md b/docs/tutorials/writing-views.md
index 05cd1d926dd..c3bcd560560 100644
--- a/docs/tutorials/writing-views.md
+++ b/docs/tutorials/writing-views.md
@@ -316,7 +316,7 @@ r = requests.patch(SERVER_URL + 'api/v1/realm',
```
This is simply an illustration; we recommend making use of the [Zulip
-Python API bindings](https://www.zulipchat.com/api) since they provide
+Python API bindings](https://zulip.com/api/) since they provide
a nice interface for accessing the API.
## Legacy endpoints used by the web client
diff --git a/help/change-organization-url.md b/help/change-organization-url.md
index ff5aa3d9753..7b65a6ac188 100644
--- a/help/change-organization-url.md
+++ b/help/change-organization-url.md
@@ -5,7 +5,7 @@ organization URL is a disruptive operation for users:
* Users will be logged out of existing sessions on the web, mobile and
desktop apps and need to log in again.
-* Any [API clients](/api) or [integrations](/integrations/) will need
+* Any [API clients](/api/) or [integrations](/integrations/) will need
to be updated to point to the new organization URL.
We recommend using a [wildcard
diff --git a/help/demo-organizations.md b/help/demo-organizations.md
index 5f7469f44be..e4df8c505e0 100644
--- a/help/demo-organizations.md
+++ b/help/demo-organizations.md
@@ -73,7 +73,7 @@ permanent organization:
* Users will be logged out of existing sessions on the web, mobile and
desktop apps and need to log in again.
-* Any [API clients](/api) or [integrations](/integrations/) will need
+* Any [API clients](/api/) or [integrations](/integrations/) will need
to be updated to point to the new organization URL.
{start_tabs}
diff --git a/help/guest-users.md b/help/guest-users.md
index eb4b1d84c59..21498f6d955 100644
--- a/help/guest-users.md
+++ b/help/guest-users.md
@@ -72,7 +72,7 @@ In practice, guests should rarely encounter content from an **Unknown user**,
unless users in your organization frequently change their stream subscriptions
or are [deactivated](/help/deactivate-or-reactivate-a-user).
-The only information guests can access about unknown users via the [API](/api)
+The only information guests can access about unknown users via the [API](/api/)
is which user IDs exist, and
[availability](/help/status-and-availability) updates for each user ID.
diff --git a/help/restrict-name-and-email-changes.md b/help/restrict-name-and-email-changes.md
index f2bf20f5908..9475be0cccd 100644
--- a/help/restrict-name-and-email-changes.md
+++ b/help/restrict-name-and-email-changes.md
@@ -7,7 +7,7 @@
By default, any user can [change their name](/help/change-your-name).
You can instead prevent users from changing their name. This setting is
especially useful if user names are managed via an external source, and
-synced into Zulip via the [Zulip API](/api), [LDAP][ldap-sync-data] or
+synced into Zulip via the [Zulip API](/api/), [LDAP][ldap-sync-data] or
another method.
!!! tip ""
diff --git a/templates/corporate/for/business.html b/templates/corporate/for/business.html
index b1f81df5b6d..a7b285dd76c 100644
--- a/templates/corporate/for/business.html
+++ b/templates/corporate/for/business.html
@@ -282,7 +282,7 @@
<li>
<div class="list-content">
Build your own integrations with Zulip’s
- easy-to-use <a href="/api">RESTful
+ easy-to-use <a href="/api/">RESTful
API</a>, <a href="/api/installation-instructions">client
bindings</a>, <a href="/api/incoming-webhooks-overview">incoming
webhooks</a>, <a href="/api/outgoing-webhooks">outgoing
diff --git a/templates/corporate/for/open-source.html b/templates/corporate/for/open-source.html
index d414d878538..0160bbe337b 100644
--- a/templates/corporate/for/open-source.html
+++ b/templates/corporate/for/open-source.html
@@ -511,7 +511,7 @@
<li>
<div class="list-content">
Build your own integrations with Zulip’s
- easy-to-use <a href="/api">RESTful
+ easy-to-use <a href="/api/">RESTful
API</a>, <a href="/api/installation-instructions">client
bindings</a>, <a href="/api/incoming-webhooks-overview">incoming
webhooks</a>, <a href="/api/outgoing-webhooks">outgoing
diff --git a/templates/corporate/self-hosting.html b/templates/corporate/self-hosting.html
index 00c57c5e43f..893f2b76ecb 100644
--- a/templates/corporate/self-hosting.html
+++ b/templates/corporate/self-hosting.html
@@ -238,7 +238,7 @@
</h1>
<p>
<a href="/api/incoming-webhooks-overview">Creating custom integrations</a> is a breeze with
- our well-documented <a href="/api">REST API</a>.
+ our well-documented <a href="/api/">REST API</a>.
</p>
<p>
Zulip makes it easy to
diff --git a/templates/zerver/integrations/capistrano.md b/templates/zerver/integrations/capistrano.md
index fb16384291f..a97ed53eb05 100644
--- a/templates/zerver/integrations/capistrano.md
+++ b/templates/zerver/integrations/capistrano.md
@@ -22,7 +22,7 @@ Get Zulip notifications for your Capistrano deploys!
The `--user` and `--api-key` should be the email and API key of the Zulip
bot created above. You can also put these values in a `~/.zuliprc` file on
- your Capistrano machine. See our [API docs](/api) for instructions on
+ your Capistrano machine. See our [API docs](/api/) for instructions on
creating that file.
!!! tip ""
diff --git a/templates/zerver/integrations/jenkins.md b/templates/zerver/integrations/jenkins.md
index 2dec12a828c..11cd376f66a 100644
--- a/templates/zerver/integrations/jenkins.md
+++ b/templates/zerver/integrations/jenkins.md
@@ -53,7 +53,7 @@ To learn more, see the [plugin's README](https://github.com/jenkinsci/zulip-plug
If not, create the stream and make sure you're subscribed to it.
1. Are your API key and email address correct? Test them
- using [our curl API](/api).
+ using [our curl API](/api/).
1. Configure a Jenkins log recorder for **jenkins.plugins.zulip**
and check why your messages fail to send.
diff --git a/web/templates/gear_menu_popover.hbs b/web/templates/gear_menu_popover.hbs
index 52f30f01cb0..5edcd5cc309 100644
--- a/web/templates/gear_menu_popover.hbs
+++ b/web/templates/gear_menu_popover.hbs
@@ -115,7 +115,7 @@
</a>
</li>
<li class="link-item navbar-dropdown-menu-inner-list-item">
- <a href="/api" target="_blank" rel="noopener noreferrer" class="navigate-link-on-enter navbar-dropdown-menu-link">
+ <a href="/api/" target="_blank" rel="noopener noreferrer" class="navigate-link-on-enter navbar-dropdown-menu-link">
<i class="navbar-dropdown-icon zulip-icon zulip-icon-file-text" aria-hidden="true"></i> {{t 'API documentation' }}
</a>
</li>
diff --git a/web/templates/settings/bot_settings.hbs b/web/templates/settings/bot_settings.hbs
index 711600c3dbd..fe3eb34e9d9 100644
--- a/web/templates/settings/bot_settings.hbs
+++ b/web/templates/settings/bot_settings.hbs
@@ -5,7 +5,7 @@
{{#tr}}
Looking for our <z-integrations>integrations</z-integrations> or <z-api>API</z-api> documentation?
{{#*inline "z-integrations"}}<a href="/integrations/" target="_blank" rel="noopener noreferrer">{{> @partial-block}}</a>{{/inline}}
- {{#*inline "z-api"}}<a href="/api" target="_blank" rel="noopener noreferrer">{{> @partial-block}}</a>{{/inline}}
+ {{#*inline "z-api"}}<a href="/api/" target="_blank" rel="noopener noreferrer">{{> @partial-block}}</a>{{/inline}}
{{/tr}}
</div>
<div class="bot-settings-tip" id="personal-bot-settings-tip">