Suggest a user profile Added in 8.2.0

GET /_security/profile/_suggest

Get suggestions for user profiles that match specified search criteria.

Query parameters

  • data string | array[string]

    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 returns no data content.

application/json

Body

  • name string

    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

    Number of profiles to return.

  • data string | array[string]

    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 returns no data content.

  • 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

GET /_security/profile/_suggest
curl \
 -X GET http://api.example.com/_security/profile/_suggest \
 -H "Content-Type: application/json" \
 -d '{"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
    }
  ]
}