IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Get enrich policy API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Get enrich policy API
editReturns information about an enrich policy.
GET /_enrich/policy/my-policy
Prerequisites
editIf you use Elasticsearch security features, you must have:
-
readindex privileges for any indices used -
The
enrich_userbuilt-in role
Path parameters
edit-
<enrich-policy> -
(Optional, string) Comma-separated list of enrich policy names used to limit the request.
To return information for all enrich policies, omit this parameter.
Examples
editGet a single policy
editGET /_enrich/policy/my-policy
The API returns the following response:
{
"policies": [
{
"config": {
"match": {
"name" : "my-policy",
"indices" : ["users"],
"match_field" : "email",
"enrich_fields" : [
"first_name",
"last_name",
"city",
"zip",
"state"
]
}
}
}
]
}
Get multiple policies
editGET /_enrich/policy/my-policy,other-policy
The API returns the following response:
{
"policies": [
{
"config": {
"match": {
"name" : "my-policy",
"indices" : ["users"],
"match_field" : "email",
"enrich_fields" : [
"first_name",
"last_name",
"city",
"zip",
"state"
]
}
}
},
{
"config": {
"match": {
"name" : "other-policy",
"indices" : ["users"],
"match_field" : "email",
"enrich_fields" : [
"first_name",
"last_name",
"city",
"zip",
"state"
]
}
}
}
]
}
Get all policies
editGET /_enrich/policy
The API returns the following response:
{
"policies": [
{
"config": {
"match": {
"name" : "my-policy",
"indices" : ["users"],
"match_field" : "email",
"enrich_fields" : [
"first_name",
"last_name",
"city",
"zip",
"state"
]
}
}
},
{
"config": {
"match": {
"name" : "other-policy",
"indices" : ["users"],
"match_field" : "email",
"enrich_fields" : [
"first_name",
"last_name",
"city",
"zip",
"state"
]
}
}
}
]
}