Suggest a user profile

  • POST also GET /_security/profile/_suggest
Auth

Get suggestions for user profiles that match specified search criteria.

Note

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.

Required authorization

Cluster privileges read_security

Query parameters

data union string | string[]

A comma-separated list of filters for the data field of the profile document. To return all content use data=*. To return a subset of content, use data=<key> to retrieve content nested under the specified <key>. By default, the API returns no data content. It is an error to specify data as both the query parameter and the request body field.

Request body

name string

A query string used to match name-related fields in user profile documents. Name-related fields are the user's username, full_name, and email.

size number · default: 10

The number of profiles to return.

data union string | string[]

A comma-separated list of filters for the data field of the profile document. To return all content use data=*. To return a subset of content, use data=<key> to retrieve content nested under the specified <key>. By default, the API returns no data content. It is an error to specify data as both the query parameter and the request body field.

hint object

Extra search criteria to improve relevance of the suggestion result. Profiles matching the spcified hint are ranked higher in the response. Profiles not matching the hint aren't excluded from the response as long as the profile matches the name field query.

uids string[]

A list of profile UIDs to match against.

labels map string to string | string[]

A single key-value pair to match against the labels section of a profile. A profile is considered matching if it matches at least one of the strings.

Response

application/json
total object required

Metadata about the number of matching profiles.

value number required
relation string required
took number required

The number of milliseconds it took Elasticsearch to run the request.

profiles object[] required

A list of profile documents, ordered by relevance, that match the search criteria.

uid string required
user object required
email union string nullable
One of: string
full_name union string nullable
realm_name string required
realm_domain string
roles string[] required
username string required
data map string to object required
labels map string to object required
enabled boolean