Update user profile data Added in 8.2.0

PUT /_security/profile/{uid}/_data

Update specific data for the user profile that is associated with a unique ID.

Path parameters

  • uid string Required

    A unique identifier for the user profile.

Query parameters

  • Only perform the operation if the document has this sequence number.

  • Only perform the operation if the document has this primary term.

  • refresh string

    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.

    Values are true, false, or wait_for.

application/json

Body Required

  • labels object

    Searchable data that you want to associate with the user profile. This field supports a nested data structure.

    Hide labels attribute Show labels attribute object
    • * object Additional properties

      Additional properties are allowed.

  • data object

    Non-searchable data that you want to associate with the user profile. This field supports a nested data structure.

    Hide data attribute Show data attribute object
    • * object Additional properties

      Additional properties are allowed.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

PUT /_security/profile/{uid}/_data
curl \
 -X PUT http://api.example.com/_security/profile/{uid}/_data \
 -H "Content-Type: application/json" \
 -d '{"labels":{"additionalProperty1":{},"additionalProperty2":{}},"data":{"additionalProperty1":{},"additionalProperty2":{}}}'
Request examples
{
  "labels": {
    "additionalProperty1": {},
    "additionalProperty2": {}
  },
  "data": {
    "additionalProperty1": {},
    "additionalProperty2": {}
  }
}
Response examples (200)
{
  "acknowledged": true
}