OpenSearch/client
Martijn van Groningen fe937ea4b8
Add config namespace in get policy api response (#47162)
Currently the policy config is placed directly in the json object
of the toplevel `policies` array field. For example:

```
{
    "policies": [
        {
            "match": {
                "name" : "my-policy",
                "indices" : ["users"],
                "match_field" : "email",
                "enrich_fields" : [
                    "first_name",
                    "last_name",
                    "city",
                    "zip",
                    "state"
                ]
            }
        }
    ]
}
```

This change adds a `config` field in each policy json object:

```
{
    "policies": [
        {
            "config": {
                "match": {
                    "name" : "my-policy",
                    "indices" : ["users"],
                    "match_field" : "email",
                    "enrich_fields" : [
                        "first_name",
                        "last_name",
                        "city",
                        "zip",
                        "state"
                    ]
                }
            }
        }
    ]
}
```

This allows us in the future to add other information about policies
in the get policy api response.

The UI will consume this API to build an overview of all policies.
The UI may in the future include additional information about a policy
and the plan is to include that in the get policy api, so that this
information can be gathered in a single api call.

An example of the information that is likely to be added is:
* Last policy execution time
* The status of a policy (executing, executed, unexecuted)
* Information about the last failure if exists
2019-09-30 14:37:23 +02:00
..
benchmark [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
client-benchmark-noop-api-plugin Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
rest Update http-core and http-client dependencies (#46549) 2019-09-12 09:45:29 +02:00
rest-high-level Add config namespace in get policy api response (#47162) 2019-09-30 14:37:23 +02:00
sniffer Update http-core and http-client dependencies (#46549) 2019-09-12 09:45:29 +02:00
test [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
transport [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00