Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
openapi: Make api-docs filename match with operationIds.
orientord8ef853545c9
diff --git a/templates/zerver/api/add-linkifiers.md b/templates/zerver/api/add-linkifier.mdsimilarity index 100%rename from templates/zerver/api/add-linkifiers.mdrename to templates/zerver/api/add-linkifier.mddiff --git a/templates/zerver/api/add-emoji-reaction.md b/templates/zerver/api/add-reaction.mdsimilarity index 100%rename from templates/zerver/api/add-emoji-reaction.mdrename to templates/zerver/api/add-reaction.mddiff --git a/templates/zerver/api/changelog.md b/templates/zerver/api/changelog.mdindex c0f22b82851..8dc8b8d7c88 100644--- a/templates/zerver/api/changelog.md+++ b/templates/zerver/api/changelog.md@@ -66,21 +66,21 @@ below features are supported.value means no limit.* [`POST /register`](/api/register-queue): The response now contains a`is_owner`, similar to the existing `is_admin` and `is_guest` fields.-* [`POST /typing`](/api/typing): Removed legacy support for sending email+* [`POST /set-typing-status`](/api/set-typing-status): Removed legacy support for sending emailaddresses, rather than user IDs, to encode private message recipients.**Feature level 10**-* [`GET users/me`](/api/get-profile): Added `avatar_version`, `is_guest`,+* [`GET users/me`](/api/get-own-user): Added `avatar_version`, `is_guest`,`is_active`, `timezone`, and `date_joined` fields to the User objects.-* [`GET users/me`](/api/get-profile): Removed `client_id` and `short_name`+* [`GET users/me`](/api/get-own-user): Removed `client_id` and `short_name`from the reponse to this endpoint. These fields had no purpose andwere inconsistent with other API responses describing users.**Feature level 9**-* [`POST users/me/subscriptions`](/api/add-subscriptions), [`DELETE- /users/me/subscriptions`](/api/remove-subscriptions): Other users to+* [`POST users/me/subscriptions`](/api/subscribe), [`DELETE+ /users/me/subscriptions`](/api/unsubscribe): Other users tosubscribe/unsubscribe, declared in the `principals` parameter, cannow be referenced by user_id, rather than Zulip display emailaddress.@@ -90,15 +90,15 @@ below features are supported.**Feature level 8**-* [`GET /users`](/api/get-all-users), [`GET /users/{user_id}`](/api/get-user)- and [`GET /users/me`](/api/get-profile): User objects now contain the+* [`GET /users`](/api/get-users), [`GET /users/{user_id}`](/api/get-user)+ and [`GET /users/me`](/api/get-own-user): User objects now contain the`is_owner` field as well.* Added [time mentions](/help/format-your-message-using-markdown#mention-a-time)to supported markdown features.**Feature level 7**-* [`GET /events`](/api/get-events-from-queue): `realm_user` and+* [`GET /events`](/api/get-events): `realm_user` and`realm_bot` events no longer contain an `email` field to identifythe user; use the `user_id` field instead. Previously, some (butnot all) events of these types contained an `email` key in addition to@@ -106,7 +106,7 @@ below features are supported.* [`PATCH /users/{user_id}`](/api/update-user): The `is_admin` and`is_guest` parameters were removed in favor of the more general`role` parameter for specifying a change in user role.-* [`GET /events`](/api/get-events-from-queue): `realm_user` events+* [`GET /events`](/api/get-events): `realm_user` eventssent when a user's role changes now include `role` property, insteadof the previous `is_guest` or `is_admin` booleans.* `GET /realm/emoji`: The user who uploaded a given custom emoji is@@ -115,16 +115,16 @@ below features are supported.**Feature level 6**-* [`GET /events`](/api/get-events-from-queue): `realm_user` events to+* [`GET /events`](/api/get-events): `realm_user` events toupdate a user's avatar now include the `avatar_version` field, whichis important for correctly refetching medium-size avatar images whenthe user's avatar changes.-* [`GET /users`](/api/get-all-users) and [`GET+* [`GET /users`](/api/get-users) and [`GET/users/{user_id}`](/api/get-user): User objects now contain the`avatar_version` field as well.**Feature level 5**-* [`GET /events`](/api/get-events-from-queue): `realm_bot` events,+* [`GET /events`](/api/get-events): `realm_bot` events,sent when changes are made to bot users, now contain aninteger-format `owner_id` field, replacing the `owner` field (whichwas an email address).@@ -149,7 +149,7 @@ below features are supported.**Feature level 2**:-* [`POST /messages/{message_id}/reactions`](/api/add-emoji-reaction):+* [`POST /messages/{message_id}/reactions`](/api/add-reaction):The `reaction_type` parameter is optional; the server will guess the`reaction_type` if it is not specified (checking custom emoji, thenunicode emoji for any with the provided name).@@ -160,13 +160,13 @@ below features are supported.**Feature level 1**:-* [`GET /server_settings`](/api/server-settings): Added+* [`GET /server_settings`](/api/get-server-settings): Added`zulip_feature_level`, which can be used by clients to detect whichof the features described in this changelog are supported.* [`POST /register`](/api/register-queue): Added `zulip_feature_level`to the response if `zulip_version` is among the requested`event_types`.-* [`GET /users`](/api/get-all-users): User objects for bots now+* [`GET /users`](/api/get-users): User objects for bots nowcontain a `bot_owner_id`, replacing the previous `bot_owner` field(which had the email address of the bot owner).* [`GET /users/{user_id}`](/api/get-user): Endpoint added.@@ -174,16 +174,16 @@ below features are supported.values for the `anchor` parameter, deprecating and replacing the`use_first_unread_anchor` parameter.* [`GET /messages`](/api/get-messages) and [`GET- /events`](/api/get-events-from-queue): Message objects now use+ /events`](/api/get-events): Message objects now use`topic_links` rather than `subject_links` to indicate links eitherpresent in the topic or generated by Linkifiers applied to the topic.-* [`POST /users/me/subscriptions`](/api/add-subscriptions): Replaced+* [`POST /users/me/subscriptions`](/api/subscribe): Replaced`is_announcement_only` boolean with `stream_post_policy` enum forspecifying who can post to a stream.* [`PATCH /streams/{stream_id}`](/api/update-stream): Replaced`is_announcement_only` boolean with `stream_post_policy` enum forspecifying who can post to a stream.-* [`GET /streams`](/api/get-all-streams): Replaced+* [`GET /streams`](/api/get-streams): Replaced`is_announcement_only` boolean with `stream_post_policy` enum forspecifying who can post to a stream.* `GET /api/v1/user_uploads`: Added new endpoint for requesting a@@ -200,24 +200,24 @@ below features are supported.## Changes in Zulip 2.1-* [`GET /users`](/api/get-all-users): Added `include_custom_profile_fields`+* [`GET /users`](/api/get-users): Added `include_custom_profile_fields`to request custom profile field data.-* [`GET /users/me`](/api/get-profile): Added `avatar_url` field,+* [`GET /users/me`](/api/get-own-user): Added `avatar_url` field,containing the user's avatar URL, to the response.-* [`GET /users/me/subscriptions`](/api/get-subscribed-streams): Added+* [`GET /users/me/subscriptions`](/api/get-subscriptions): Added`include_subscribers` parameter controlling whether data on theother subscribers is included. Previous behavior was to always sendsubscriber data.-* [`GET /users/me/subscriptions`](/api/get-subscribed-streams):+* [`GET /users/me/subscriptions`](/api/get-subscriptions):Stream-level notification settings like `push_notifications` werechanged to be nullable boolean fields (true/false/null), with `null`meaning that the stream inherits the organization-level default.Previously, the only values were true/false. A client communicatessupport for this feature using `client_capabilities`.-* [`GET /users/me/subscriptions`](/api/get-subscribed-streams): Added+* [`GET /users/me/subscriptions`](/api/get-subscriptions): Added`wildcard_mentions_notify` notification setting, with the sameglobal-plus-stream-level-override model as other notification settings.-* [`GET /server_settings`](/api/server-settings): Added+* [`GET /server_settings`](/api/get-server-settings): Added`external_authentication_methods` structure, used to display loginbuttons nicely in the mobile apps.* Added `first_message_id` field to Stream objects. This is helpful@@ -241,7 +241,7 @@ below features are supported.* [`POST /messages`](/api/send-message): Added support for using userIDs and stream IDs for specifying the recipients of a message.-* [`POST /typing`](/api/typing): Added support for specifying the+* [`POST /set-typing-status`](/api/set-typing-status): Added support for specifying therecipients with user IDs, deprecating the original API of specifyingthem using email addresses.diff --git a/templates/zerver/api/create-stream.md b/templates/zerver/api/create-stream.mdindex 9d12f5edccb..9b1bbd9261c 100644--- a/templates/zerver/api/create-stream.md+++ b/templates/zerver/api/create-stream.md@@ -1,7 +1,7 @@# Create a streamYou can create a stream using Zulip's REST API by submitting a-[subscribe](/api/add-subscriptions) request with a stream name that+[subscribe](/api/subscribe) request with a stream name thatdoesn't yet exist. You can specify the initial configuration of thestream using the `invite_only` and `announce` parameters to thatrequest.diff --git a/templates/zerver/api/get-org-emoji.md b/templates/zerver/api/get-custom-emoji.mdsimilarity index 100%rename from templates/zerver/api/get-org-emoji.mdrename to templates/zerver/api/get-custom-emoji.mddiff --git a/templates/zerver/api/get-events-from-queue.md b/templates/zerver/api/get-events.mdsimilarity index 100%rename from templates/zerver/api/get-events-from-queue.mdrename to templates/zerver/api/get-events.mddiff --git a/templates/zerver/api/list-linkifiers.md b/templates/zerver/api/get-linkifiers.mdsimilarity index 100%rename from templates/zerver/api/list-linkifiers.mdrename to templates/zerver/api/get-linkifiers.mddiff --git a/templates/zerver/api/get-profile.md b/templates/zerver/api/get-own-user.mdsimilarity index 100%rename from templates/zerver/api/get-profile.mdrename to templates/zerver/api/get-own-user.mddiff --git a/templates/zerver/api/server-settings.md b/templates/zerver/api/get-server-settings.mdsimilarity index 100%rename from templates/zerver/api/server-settings.mdrename to templates/zerver/api/get-server-settings.mddiff --git a/templates/zerver/api/get-all-streams.md b/templates/zerver/api/get-streams.mdsimilarity index 100%rename from templates/zerver/api/get-all-streams.mdrename to templates/zerver/api/get-streams.mddiff --git a/templates/zerver/api/get-subscribed-streams.md b/templates/zerver/api/get-subscriptions.mdsimilarity index 100%rename from templates/zerver/api/get-subscribed-streams.mdrename to templates/zerver/api/get-subscriptions.mddiff --git a/templates/zerver/api/get-presence.md b/templates/zerver/api/get-user-presence.mdsimilarity index 100%rename from templates/zerver/api/get-presence.mdrename to templates/zerver/api/get-user-presence.mddiff --git a/templates/zerver/api/get-all-users.md b/templates/zerver/api/get-users.mdsimilarity index 100%rename from templates/zerver/api/get-all-users.mdrename to templates/zerver/api/get-users.mddiff --git a/templates/zerver/api/index.md b/templates/zerver/api/index.mdindex 2713cc3a629..c4a12f76a98 100644--- a/templates/zerver/api/index.md+++ b/templates/zerver/api/index.md@@ -16,7 +16,7 @@ guide should help you find the API you need:* If you're building an interactive bot that reacts to activity insideZulip, you'll want to look at Zulip's[Python framework for interactive bots](/api/running-bots) or- [Zulip's real-time events API](/api/get-events-from-queue).+ [Zulip's real-time events API](/api/get-events).And if you still need to build your own integration with Zulip, check outthe full [REST API](/api/rest), generally starting withdiff --git a/templates/zerver/api/integrations-overview.md b/templates/zerver/api/integrations-overview.mdindex ecf1e653d0e..435da800add 100644--- a/templates/zerver/api/integrations-overview.md+++ b/templates/zerver/api/integrations-overview.md@@ -62,7 +62,7 @@ integration and don't have an engineer on staff,* To react to activity inside Zulip, look at Zulip's[Python framework for interactive bots](/api/running-bots) or- [Zulip's real-time events API](/api/get-events-from-queue).+ [Zulip's real-time events API](/api/get-events).* If what you want isn't covered by the above, check out the full[REST API](/api/rest). The web, mobile, desktop, and terminal apps arediff --git a/templates/zerver/api/mark-as-read-bulk.md b/templates/zerver/api/mark-all-as-read.mdsimilarity index 100%rename from templates/zerver/api/mark-as-read-bulk.mdrename to templates/zerver/api/mark-all-as-read.mddiff --git a/templates/zerver/api/mute-topics.md b/templates/zerver/api/mute-topic.mdsimilarity index 100%rename from templates/zerver/api/mute-topics.mdrename to templates/zerver/api/mute-topic.mddiff --git a/templates/zerver/api/real-time-events.md b/templates/zerver/api/real-time-events.mdindex 6e8b3f62ead..b20d6680ed5 100644--- a/templates/zerver/api/real-time-events.md+++ b/templates/zerver/api/real-time-events.md@@ -23,7 +23,7 @@ interface for processing Zulip messages.More complex applications (like a Zulip terminal client) may need toinstead use the raw [register](/api/register-queue) and-[events](/api/get-events-from-queue) endpoints.+[events](/api/get-events) endpoints.## Usage examples@@ -56,5 +56,5 @@ You may also pass in the following keyword arguments to `call_on_each_event`:{generate_api_arguments_table|zulip.yaml|/real-time:post}-See the [GET /events](/api/get-events-from-queue) documentation for+See the [GET /events](/api/get-events) documentation formore details on the format of individual events.diff --git a/templates/zerver/api/register-queue.md b/templates/zerver/api/register-queue.mdindex 02d95d66bb1..25b64148f1a 100644--- a/templates/zerver/api/register-queue.md+++ b/templates/zerver/api/register-queue.md@@ -13,7 +13,7 @@ intended primarily for complex applications for which the more convenientThis endpoint returns a `queue_id` and a `last_event_id`; these can beused in subsequent calls to the-["events" endpoint](/api/get-events-from-queue) to request events from+["events" endpoint](/api/get-events) to request events fromthe Zulip server using long-polling.The server will queue events for up to 10 minutes of inactivity.@@ -24,7 +24,7 @@ client loses network connectivity with the Zulip server for 10 minutesor longer.Once the server garbage-collects your event queue, the server will-[return an error](/api/get-events-from-queue#bad_event_queue_id-errors)+[return an error](/api/get-events#bad_event_queue_id-errors)with a code of `BAD_EVENT_QUEUE_ID` if you try to fetch events fromthe event queue. Your software will need to handle that errorcondition by re-initializing itself (e.g. this is what triggers yourdiff --git a/templates/zerver/api/remove-linkifiers.md b/templates/zerver/api/remove-linkifier.mdsimilarity index 100%rename from templates/zerver/api/remove-linkifiers.mdrename to templates/zerver/api/remove-linkifier.mddiff --git a/templates/zerver/api/remove-emoji-reaction.md b/templates/zerver/api/remove-reaction.mdsimilarity index 100%rename from templates/zerver/api/remove-emoji-reaction.mdrename to templates/zerver/api/remove-reaction.mddiff --git a/templates/zerver/api/delete-user-group.md b/templates/zerver/api/remove-user-group.mdsimilarity index 100%rename from templates/zerver/api/delete-user-group.mdrename to templates/zerver/api/remove-user-group.mddiff --git a/templates/zerver/api/typing.md b/templates/zerver/api/set-typing-status.mdsimilarity index 100%rename from templates/zerver/api/typing.mdrename to templates/zerver/api/set-typing-status.mddiff --git a/templates/zerver/api/add-subscriptions.md b/templates/zerver/api/subscribe.mdsimilarity index 100%rename from templates/zerver/api/add-subscriptions.mdrename to templates/zerver/api/subscribe.mddiff --git a/templates/zerver/api/remove-subscriptions.md b/templates/zerver/api/unsubscribe.mdsimilarity index 100%rename from templates/zerver/api/remove-subscriptions.mdrename to templates/zerver/api/unsubscribe.mddiff --git a/templates/zerver/api/update-subscription-properties.md b/templates/zerver/api/update-subscription-settings.mdsimilarity index 100%rename from templates/zerver/api/update-subscription-properties.mdrename to templates/zerver/api/update-subscription-settings.mddiff --git a/templates/zerver/help/include/rest-endpoints.md b/templates/zerver/help/include/rest-endpoints.mdindex 801e4c83687..b011a75c17d 100644--- a/templates/zerver/help/include/rest-endpoints.md+++ b/templates/zerver/help/include/rest-endpoints.md@@ -4,26 +4,26 @@* [Get a raw message](/api/get-raw-message)* [Send a message](/api/send-message)* [Update a message](/api/update-message)-* [Add an emoji reaction](/api/add-emoji-reaction)-* [Remove an emoji reaction](/api/remove-emoji-reaction)+* [Add an emoji reaction](/api/add-reaction)+* [Remove an emoji reaction](/api/remove-reaction)* [Render a message](/api/render-message)* [Upload a file](/api/upload-file)* [Delete a message](/api/delete-message)* [Construct a narrow](/api/construct-narrow)* [Get a message's edit history](/api/get-message-history)* [Update a message's flags](/api/update-message-flags)-* [Mark messages as read in bulk](/api/mark-as-read-bulk)+* [Mark messages as read in bulk](/api/mark-all-as-read)#### Streams-* [Get all streams](/api/get-all-streams)-* [Get subscribed streams](/api/get-subscribed-streams)-* [Add subscriptions](/api/add-subscriptions)-* [Update subscription settings](/api/update-subscription-properties)-* [Remove subscriptions](/api/remove-subscriptions)+* [Get all streams](/api/get-streams)+* [Get subscribed streams](/api/get-subscriptions)+* [Add subscriptions](/api/subscribe)+* [Update subscription settings](/api/update-subscription-settings)+* [Remove subscriptions](/api/unsubscribe)* [Get subscription status](/api/get-subscription-status)* [Get topics in a stream](/api/get-stream-topics)-* [Topic muting](/api/mute-topics)+* [Topic muting](/api/mute-topic)* [Create a stream](/api/create-stream)* [Get stream ID](/api/get-stream-id)* [Delete a stream](/api/delete-stream)@@ -31,36 +31,36 @@#### Users-* [Get all users](/api/get-all-users)+* [Get all users](/api/get-users)* [Get a user](/api/get-user)* [Deactivate a user](/api/deactivate-user)* [Reactivate a user](/api/reactivate-user)* [Update a user](/api/update-user)-* [Get profile](/api/get-profile)+* [Get profile](/api/get-own-user)* [Create a user](/api/create-user)-* [Set "typing" status](/api/typing)-* [Get user presence](/api/get-presence)+* [Set "typing" status](/api/set-typing-status)+* [Get user presence](/api/get-user-presence)* [Get all user groups](/api/get-user-groups)* [Update notification settings](/api/update-notification-settings)* [Create a user group](/api/create-user-group)* [Update a user group](/api/update-user-group)-* [Delete a user group](/api/delete-user-group)+* [Delete a user group](/api/remove-user-group)* [Get attachments](/api/get-attachments)#### Server & organizations-* [Get server settings](/api/server-settings)-* [List linkifiers](/api/list-linkifiers)-* [Create linkifiers](/api/add-linkifiers)-* [Remove linkifiers](/api/remove-linkifiers)-* [Get all custom emoji](/api/get-org-emoji)+* [Get server settings](/api/get-server-settings)+* [List linkifiers](/api/get-linkifiers)+* [Create linkifiers](/api/add-linkifier)+* [Remove linkifiers](/api/remove-linkifier)+* [Get all custom emoji](/api/get-custom-emoji)* [Upload custom emoji](/api/upload-custom-emoji)#### Real-time events* [Real time events API](/api/real-time-events)* [Register an event queue](/api/register-queue)-* [Get events from an event queue](/api/get-events-from-queue)+* [Get events from an event queue](/api/get-events)* [Delete an event queue](/api/delete-queue)#### Specialty endpointsdiff --git a/zerver/openapi/python_examples.py b/zerver/openapi/python_examples.pyindex 41ae25b60bc..2b41fc2594e 100644--- a/zerver/openapi/python_examples.py+++ b/zerver/openapi/python_examples.py@@ -1175,7 +1175,7 @@ def test_streams(client: Client, nonadmin_client: Client) -> None:def test_queues(client: Client) -> None:- # Note that the example for api/get-events-from-queue is not tested.+ # Note that the example for api/get-events is not tested.# Since, methods such as client.get_events() or client.call_on_each_message# are blocking calls and since the event queue backend is already# thoroughly tested in zerver/tests/test_event_queue.py, it is not worthdiff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex b163ae8f219..237dabee91f 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -703,7 +703,7 @@ paths:description: |Dictionary with data on the user who added the reaction, includingthe user ID as the `id` field. **Note**: In the [events- API](/api/get-events-from-queue), this `user` dictionary+ API](/api/get-events), this `user` dictionaryconfusing had the user ID in a field called `user_id`instead. We recommend ignoring fields other than the userID. **Deprecated** and to be removed in a future release@@ -1197,7 +1197,7 @@ paths:For updating the `read` flag on common collections of messages, see alsothe- [special endpoints for marking message as read in bulk](/api/mark-as-read-bulk).+ [special endpoints for marking message as read in bulk](/api/mark-all-as-read).parameters:- name: messagesin: query@@ -1607,7 +1607,7 @@ paths:`GET {{ api_url }}/v1/users/{user_id}`- You can also fetch details on [all users in the organization](/api/get-all-users).+ You can also fetch details on [all users in the organization](/api/get-users).*This endpoint is new in Zulip Server 2.2.*parameters:@@ -3052,7 +3052,7 @@ paths:organization. Each of these tuples contain thepattern, the formatted URL and the filter'sID, in that order. See the [Create- linkifiers](/api/add-linkifiers) article for+ linkifiers](/api/add-linkifier) article fordetails on what each field means.- example:{@@ -3512,7 +3512,7 @@ paths:tags: ["users"]description: |This endpoint is used to edit the user's global notification settings.- See [this endpoint](/api/update-subscription-properties) for+ See [this endpoint](/api/update-subscription-settings) forper-stream notification settings.`PATCH {{ api_url }}/v1/settings/notifications`diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.pyindex 6c2a53a025d..c5880335456 100644--- a/zerver/tests/test_docs.py+++ b/zerver/tests/test_docs.py@@ -112,18 +112,18 @@ class DocPageTest(ZulipTestCase):self._test('/api/installation-instructions', 'No download required!')self._test('/api/send-message', 'steal away your hearts')self._test('/api/render-message', '**foo**')- self._test('/api/get-all-streams', 'include_public')+ self._test('/api/get-streams', 'include_public')self._test('/api/get-stream-id', 'The name of the stream to access.')- self._test('/api/get-subscribed-streams', 'Get all streams that the user is subscribed to.')- self._test('/api/get-all-users', 'client_gravatar')+ self._test('/api/get-subscriptions', 'Get all streams that the user is subscribed to.')+ self._test('/api/get-users', 'client_gravatar')self._test('/api/register-queue', 'apply_markdown')- self._test('/api/get-events-from-queue', 'dont_block')+ self._test('/api/get-events', 'dont_block')self._test('/api/delete-queue', 'Delete a previously registered queue')self._test('/api/update-message', 'propagate_mode')- self._test('/api/get-profile', 'takes no parameters')- self._test('/api/add-subscriptions', 'authorization_errors_fatal')+ self._test('/api/get-own-user', 'takes no parameters')+ self._test('/api/subscribe', 'authorization_errors_fatal')self._test('/api/create-user', 'zuliprc-admin')- self._test('/api/remove-subscriptions', 'not_removed')+ self._test('/api/unsubscribe', 'not_removed')self._test('/team/', 'industry veterans')self._test('/history/', 'Cambridge, Massachusetts')# Test the i18n version of one of these pages.