Path parameters
- uid
string Required A unique identifier for the user profile.
Query parameters
- if_seq_no
number Only perform the operation if the document has this sequence number.
- if_primary_term
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', it waits for a refresh to make this operation visible to search. If 'false', nothing is done with refreshes.
Values are
true
,false
, orwait_for
.
BodyRequired
- labels
object 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 (.
). - data
object 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.
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}"'
{
"labels": {
"direction": "east"
},
"data": {
"app1": {
"theme": "default"
}
}
}
{
"acknowledged": true
}