2022-03-15 08:08:25 +08:00
|
|
|
|
[role="xpack"]
|
|
|
|
|
[[security-api-enable-user-profile]]
|
|
|
|
|
=== Enable user profile API
|
|
|
|
|
++++
|
|
|
|
|
<titleabbrev>Enable user profile</titleabbrev>
|
|
|
|
|
++++
|
|
|
|
|
|
2022-09-29 09:14:09 +08:00
|
|
|
|
NOTE: The user profile feature is designed only for use by {kib} and
|
|
|
|
|
Elastic’s {observability}, {ents}, and {elastic-sec} 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.
|
2022-03-15 08:08:25 +08:00
|
|
|
|
|
|
|
|
|
Enables a user profile so it's visible in
|
2022-04-01 07:33:23 +08:00
|
|
|
|
<<security-api-suggest-user-profile,user profile searches>>.
|
2022-03-15 08:08:25 +08:00
|
|
|
|
|
|
|
|
|
[[security-api-enable-user-profile-request]]
|
|
|
|
|
==== {api-request-title}
|
|
|
|
|
|
|
|
|
|
`POST /_security/profile/<uid>/_enable`
|
|
|
|
|
|
|
|
|
|
`PUT /_security/profile/<uid>/_enable`
|
|
|
|
|
|
|
|
|
|
[[security-api-enable-user-profile-prereqs]]
|
|
|
|
|
==== {api-prereq-title}
|
|
|
|
|
|
|
|
|
|
To use this API, you must have the `manage_user_profile` cluster privilege.
|
|
|
|
|
|
|
|
|
|
[[security-api-enable-user-profile-desc]]
|
|
|
|
|
==== {api-description-title}
|
|
|
|
|
|
2022-04-14 22:38:41 +08:00
|
|
|
|
When you <<security-api-activate-user-profile,activate a user profile>>, it's
|
2022-03-15 08:08:25 +08:00
|
|
|
|
automatically enabled and visible in user profile searches. If you later
|
|
|
|
|
<<security-api-disable-user-profile,disable the user profile>>, you can use the
|
|
|
|
|
enable user profile API to make the profile visible in these searches again.
|
|
|
|
|
|
|
|
|
|
[[security-api-enable-user-profile-path-params]]
|
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
|
|
|
|
|
`<uid>`::
|
|
|
|
|
(Required, string) Unique identifier for the user profile.
|
|
|
|
|
|
|
|
|
|
[[security-api-enable-user-profile-query-params]]
|
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
|
2024-04-17 20:37:07 +08:00
|
|
|
|
include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=refresh]
|
2022-03-15 08:08:25 +08:00
|
|
|
|
|
|
|
|
|
[[security-api-enable-user-profile-example]]
|
|
|
|
|
==== {api-examples-title}
|
|
|
|
|
|
|
|
|
|
The following request enables the user profile for a `uid` matching
|
2022-06-04 21:23:20 +08:00
|
|
|
|
`u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0`:
|
2022-03-15 08:08:25 +08:00
|
|
|
|
|
|
|
|
|
[source,console]
|
|
|
|
|
----
|
2022-06-04 21:23:20 +08:00
|
|
|
|
POST /_security/profile/u_79HkWkwmnBH5gqFKwoxggWPjEBOur1zLPXQPEl1VBW0_0/_enable
|
2022-03-15 08:08:25 +08:00
|
|
|
|
----
|
2022-06-04 21:23:20 +08:00
|
|
|
|
// TEST[setup:user_profiles]
|
2022-03-15 08:08:25 +08:00
|
|
|
|
|