Spec-Zone.ru › Elasticsearch 8
›Elasticsearch Guide [8.17] ›REST APIs ›Security APIs

Disable user profile API

New API reference

For the most up-to-date API details, refer to Security APIs.

The user profile feature is designed only for use by Kibana and Elastic’s Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.

Disables a user profile so it’s not visible in user profile searches.

Request

POST /_security/profile/<uid>/_disable

PUT /_security/profile/<uid>/_disable

Prerequisites

To use this API, you must have the manage_user_profile cluster privilege.

Description

When you activate a user profile, it’s automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.

To re-enable a disabled user profile, use the enable user profile API .

Path parameters

<uid>
(Required, string) Unique identifier for the user profile.

Query parameters

refresh
(Optional, enum) If true, Elasticsearch refreshes the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false do nothing with refreshes. Valid values: true, false, wait_for. Default: false.

Examples

The following request disables the user profile for a uid matching u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0:

resp = client.security.disable_user_profile(
    uid="u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
)
print(resp)
const response = await client.security.disableUserProfile({
  uid: "u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0",
});
console.log(response);
POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_disable

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user-profile.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API