mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 23:57:20 -04:00
**Problem:** For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. **Solution:** - Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory - Update doc snippet tests to use security Rel: https://github.com/elastic/platform-docs-team/issues/208
48 lines
1.2 KiB
Text
48 lines
1.2 KiB
Text
[role="xpack"]
|
|
[[security-api-disable-user]]
|
|
=== Disable users API
|
|
++++
|
|
<titleabbrev>Disable users</titleabbrev>
|
|
++++
|
|
|
|
Disables users in the native realm.
|
|
|
|
|
|
[[security-api-disable-user-request]]
|
|
==== {api-request-title}
|
|
|
|
`PUT /_security/user/<username>/_disable`
|
|
|
|
|
|
[[security-api-disable-user-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* To use this API, you must have at least the `manage_security` cluster privilege.
|
|
|
|
[[security-api-disable-user-desc]]
|
|
==== {api-description-title}
|
|
|
|
By default, when you create users, they are enabled. You can use this API to
|
|
revoke a user's access to {es}. To re-enable a user, there is an
|
|
<<security-api-enable-user,enable users API>>.
|
|
|
|
For more information about the native realm, see
|
|
<<realms>> and <<native-realm>>.
|
|
|
|
[[security-api-disable-user-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`username`::
|
|
(Required, string) An identifier for the user.
|
|
|
|
|
|
[[security-api-disable-user-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following example disables the user `jacknich`:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
PUT /_security/user/jacknich/_disable
|
|
--------------------------------------------------
|
|
// TEST[setup:jacknich_user]
|