Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
integrations-doc: Update URL specification section for incoming webhooks.
Lauryn Menard2fb9817ea4ac
diff --git a/api_docs/incoming-webhooks-overview.md b/api_docs/incoming-webhooks-overview.mdindex 9c0f740ffe9..6829da49165 100644--- a/api_docs/incoming-webhooks-overview.md+++ b/api_docs/incoming-webhooks-overview.md@@ -156,51 +156,61 @@ below are for a webhook named `MyWebHook`.spot why something isn't working or if the service is using custom HTTPheaders.-## URLs+## URL specification-The base URL for an incoming webhook integration bot is-`{{ api_url }}/v1/external/INTEGRATION_NAME?api_key=API_KEY` where+The base URL for an incoming webhook integration bot, where`INTEGRATION_NAME` is the name of the specific webhook integration and`API_KEY` is the API key of the bot created by the user for the-integration.+integration, is:-The list of existing webhook integrations can be found in-`zerver/lib/integrations.py` (at `WEBHOOK_INTEGRATIONS`) or by browsing-the [Integrations documentation](/integrations/).+```+{{ api_url }}/v1/external/INTEGRATION_NAME?api_key=API_KEY+```++The list of existing webhook integrations can be found by browsing the+[Integrations documentation](/integrations/) or in+`zerver/lib/integrations.py` at `WEBHOOK_INTEGRATIONS`.Parameters accepted in the URL include:-* `api_key`: **Required**. The API key of the bot created by the user- for the integration. To get a bot's API key, see the [API- keys](/api/api-keys) documentation.+### api_key *(required)*++The API key of the bot created by the user for the integration. To get a+bot's API key, see the [API keys](/api/api-keys) documentation.++### stream++The stream for the integration to send notifications to. Can be either+the stream ID or the [URL-encoded][url-encoder] stream name. By default+the integration will send direct messages to the bot's owner.++!!! tip ""++ A stream ID can be found when [browsing streams][browse-streams]+ in the web app via the URL.-* `stream`: The stream for the integration to send notifications to.- Can be either the stream ID or the [URL-encoded][url-encoder] stream- name. By default the integration will send direct messages to the- bot's owner.+### topic- !!! tip ""+The topic in the specified stream for the integration to send+notifications to. The topic should also be [URL-encoded][url-encoder].+By default the integration will have a topic configured for stream+messages.- A stream ID can be found when [browsing streams][browse-streams]- in the web app via the URL.+### only_events, exclude_events-* `topic`: The topic in the specified stream for the integration to- send notifications to. The topic should also be- [URL-encoded][url-encoder]. By default the integration will have a- topic configured for stream messages.+Some incoming webhook integrations support these parameters to filter+which events will trigger a notification. You can append either+`&only_events=["event_a","event_b"]` or+`&exclude_events=["event_a","event_b"]` (or both, with different events)+to the URL, with an arbitrary number of supported events.-* `only_events`, `exclude_events`: Some incoming webhook integrations support- these parameters to filter which events will trigger a notification. You can- append either `&only_events=["event_a","event_b"]` or- `&exclude_events=["event_a","event_b"]` (or both, with different events) to- the URL, with an arbitrary number of supported events. You can use UNIX-style- wildcards like `*` to include multiple events. For example, `test*` matches- every event that starts with `test`.+You can use UNIX-style wildcards like `*` to include multiple events.+For example, `test*` matches every event that starts with `test`.- !!! tip ""+!!! tip ""- For a list of supported events, see the integration's [integration- documentation](/integrations) page.+ For a list of supported events, see a specific [integration's+ documentation](/integrations) page.[browse-streams]: /help/browse-and-subscribe-to-streams[add-bot]: /help/add-a-bot-or-integrationdiff --git a/templates/zerver/integrations/include/event-filtering-additional-feature.md b/templates/zerver/integrations/include/event-filtering-additional-feature.mdindex 19667278471..82428b65ba2 100644--- a/templates/zerver/integrations/include/event-filtering-additional-feature.md+++ b/templates/zerver/integrations/include/event-filtering-additional-feature.md@@ -1,8 +1,10 @@### Filtering incoming events-The {{ integration_display_name }} integration supports filtering for-the following events:+The {{ integration_display_name }} integration supports+[filtering][event-filters] for the following events:{% set comma = joiner(", ") %}{% for event_type in all_event_types -%} {{- comma() -}} `{{ event_type }}` {%- endfor %}++[event-filters]: /api/incoming-webhooks-overview#only_events-exclude_eventsdiff --git a/templates/zerver/integrations/include/generate-integration-url.md b/templates/zerver/integrations/include/generate-integration-url.mdindex 5ae3585865b..ca808e77fbb 100644--- a/templates/zerver/integrations/include/generate-integration-url.md+++ b/templates/zerver/integrations/include/generate-integration-url.md@@ -15,4 +15,4 @@ The generated URL will look something like this:see [the webhook URLs specification][incoming-webhook-urls].*[generate-url]: /help/generate-integration-url-[incoming-webhook-urls]: /api/incoming-webhooks-overview#urls+[incoming-webhook-urls]: /api/incoming-webhooks-overview#url-specificationdiff --git a/templates/zerver/integrations/include/webhooks-url-specification.md b/templates/zerver/integrations/include/webhooks-url-specification.mdindex 0e580513291..9057c624fd0 100644--- a/templates/zerver/integrations/include/webhooks-url-specification.md+++ b/templates/zerver/integrations/include/webhooks-url-specification.md@@ -1,3 +1,3 @@* [Webhook URLs specification][incoming-webhook-urls]-[incoming-webhook-urls]: /api/incoming-webhooks-overview#urls+[incoming-webhook-urls]: /api/incoming-webhooks-overview#url-specification