Suggest a user profile Added in 8.2.0

POST /_security/profile/_suggest

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.

Query parameters

  • data string | array[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.

application/json

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

    The number of profiles to return.

  • data string | array[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

    Additional properties are allowed.

    Hide hint attributes Show hint attributes object
    • uids array[string]

      A list of profile UIDs to match against.

    • labels object

      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.

Responses

POST /_security/profile/_suggest
curl \
 --request POST http://api.example.com/_security/profile/_suggest \
 --header "Content-Type: application/json" \
 --data '{"name":"string","size":42.0,"data":"string","hint":{"uids":["string"],"labels":{}}}'
Request examples
{
  "name": "string",
  "size": 42.0,
  "data": "string",
  "hint": {
    "uids": [
      "string"
    ],
    "labels": {}
  }
}
Response examples (200)
{
  "total": {
    "value": 42.0,
    "relation": "string"
  },
  "took": 42.0,
  "profiles": [
    {
      "uid": "string",
      "user": {
        "email": "string",
        "full_name": "string",
        "realm_name": "string",
        "realm_domain": "string",
        "roles": [
          "string"
        ],
        "username": "string"
      },
      "data": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "labels": {
        "additionalProperty1": {},
        "additionalProperty2": {}
      },
      "enabled": true
    }
  ]
}