Path parameters

  • uidstring Required

    A unique identifier for the user profile.

Query parameters

  • if_seq_nonumber

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

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

  • refreshstring

    If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search. If 'wait_for', it waits for a refresh to make this operation visible to search. If 'false', nothing is done with refreshes.

    Values are true, false, or wait_for.

application/json

BodyRequired

  • labelsobject

    Searchable data that you want to associate with the user profile. This field supports a nested data structure. Within the labels object, top-level keys cannot begin with an underscore (_) or contain a period (.).

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

    Non-searchable data that you want to associate with the user profile. This field supports a nested data structure. Within the data object, top-level keys cannot begin with an underscore (_) or contain a period (.). The data object is not searchable, but can be retrieved with the get user profile API.

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

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledgedboolean Required

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

PUT /_security/profile/{uid}/_data
curl \
 --request PUT 'http://api.example.com/_security/profile/{uid}/_data' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"labels\": {\n    \"direction\": \"east\"\n  },\n  \"data\": {\n    \"app1\": {\n      \"theme\": \"default\"\n    }\n  }\n}"'
Request example
Run `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data` to update a profile document for the `u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0` user profile.
{
  "labels": {
    "direction": "east"
  },
  "data": {
    "app1": {
      "theme": "default"
    }
  }
}
Response examples (200)
A successful response from `POST /_security/profile/u_P_0BMHgaOK3p7k-PFWUCbw9dQ-UFjt01oWJ_Dp2PmPc_0/_data`, which indicates that the request is acknowledged.
{
  "acknowledged": true
}