mirror of https://github.com/zulip/zulip.git
api-docs: Remove include links in endpoint descriptions.
Two endpoints had linked markdown files that were used in their general descriptions to add warning notes with important information (`/create-user` and `/get-user-groups`). This moves the warning content to be inline in the endpoint descriptions so that the important content is in the OpenAPI documentation and is still formatted to be rendered in a warning block. Deletes `can-create-users-only.md` and `api-members-only.md` since they were only used for these two endpoint descriptions. Also, cleans up the other instance of a inline warning block in an endpoint description (`/fetch-api-key`).
This commit is contained in:
parent
8a0070ace7
commit
6e924125ad
|
@ -1,4 +0,0 @@
|
||||||
!!! warn ""
|
|
||||||
|
|
||||||
This endpoint is only available to Members and Administrators;
|
|
||||||
bots and guests cannot use this endpoint.
|
|
|
@ -1,13 +0,0 @@
|
||||||
!!! warn ""
|
|
||||||
|
|
||||||
This endpoint is limited to organizations administrators who
|
|
||||||
additionally have the `can_create_users` permission for the Zulip organization.
|
|
||||||
|
|
||||||
Zulip Cloud users can request the `can_create_users` permission for a bot by contacting
|
|
||||||
[Zulip Cloud support](/help/contact-support) with an explanation for why it is needed.
|
|
||||||
|
|
||||||
Self-hosted installations can toggle `can_create_users` on an account using
|
|
||||||
the `manage.py change_user_role` command.
|
|
||||||
|
|
||||||
**Changes**: Before Zulip 4.0 (feature level 36), this endpoint was
|
|
||||||
available to all organization administrators.
|
|
|
@ -64,8 +64,8 @@ paths:
|
||||||
**Note:** If you signed up using passwordless authentication and
|
**Note:** If you signed up using passwordless authentication and
|
||||||
never had a password, you can [reset your password](/help/change-your-password).
|
never had a password, you can [reset your password](/help/change-your-password).
|
||||||
|
|
||||||
See the [API keys](/api/api-keys) documentation for
|
See the [API keys](/api/api-keys) documentation for more details
|
||||||
more details on how to download API key manually.
|
on how to download an API key manually.
|
||||||
|
|
||||||
In a [Zulip development environment](https://zulip.readthedocs.io/en/latest/development/overview.html),
|
In a [Zulip development environment](https://zulip.readthedocs.io/en/latest/development/overview.html),
|
||||||
see also [the unauthenticated variant](/api/dev-fetch-api-key).
|
see also [the unauthenticated variant](/api/dev-fetch-api-key).
|
||||||
|
@ -6319,11 +6319,24 @@ paths:
|
||||||
summary: Create a user
|
summary: Create a user
|
||||||
tags: ["users"]
|
tags: ["users"]
|
||||||
description: |
|
description: |
|
||||||
{!can-create-users-only.md!}
|
|
||||||
|
|
||||||
Create a new user account via the API.
|
Create a new user account via the API.
|
||||||
|
|
||||||
`POST {{ api_url }}/v1/users`
|
`POST {{ api_url }}/v1/users`
|
||||||
|
|
||||||
|
!!! warn ""
|
||||||
|
|
||||||
|
**Note**: This endpoint is limited to organization administrators
|
||||||
|
who additionally have the `can_create_users` permission for the Zulip
|
||||||
|
organization. Zulip Cloud users can request the `can_create_users`
|
||||||
|
permission for a bot by contacting [Zulip Cloud support][support]
|
||||||
|
with an explanation for why it is needed. Self-hosted installations
|
||||||
|
can toggle `can_create_users` on an account using the `manage.py
|
||||||
|
change_user_role` command.
|
||||||
|
|
||||||
|
**Changes**: Before Zulip 4.0 (feature level 36), this endpoint was
|
||||||
|
available to all organization administrators.
|
||||||
|
|
||||||
|
[support]: /help/contact-support
|
||||||
x-requires-administrator: true
|
x-requires-administrator: true
|
||||||
parameters:
|
parameters:
|
||||||
- name: email
|
- name: email
|
||||||
|
@ -13962,11 +13975,15 @@ paths:
|
||||||
summary: Get user groups
|
summary: Get user groups
|
||||||
tags: ["users"]
|
tags: ["users"]
|
||||||
description: |
|
description: |
|
||||||
{!api-members-only.md!}
|
|
||||||
|
|
||||||
Fetches all of the user groups in the organization.
|
Fetches all of the user groups in the organization.
|
||||||
|
|
||||||
`GET {{ api_url }}/v1/user_groups`
|
`GET {{ api_url }}/v1/user_groups`
|
||||||
|
|
||||||
|
!!! warn ""
|
||||||
|
|
||||||
|
**Note**: This endpoint is only available to [members and
|
||||||
|
administrators](/help/roles-and-permissions); bots and guests
|
||||||
|
cannot use this endpoint.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Success.
|
description: Success.
|
||||||
|
|
Loading…
Reference in New Issue