List ism policies

Is there a easy way to list all the policies that are added to the cluster,

2 Likes

Hey @jathin12,

We don’t have an API for GET policies as of now, but will add one in the future.
In the meantime you can query the index itself like this:

GET .opendistro-ism-config/_search
{
  "size": 10,
  "query": {
    "exists": {
      "field": "policy"
    }
  }
}
2 Likes

this worked for me. thank you

Current Opensearch (1.2.4) appears to have the list function now, at its natural location:

GET /_opendistro/_ism/policies

returns

{
  "policies" : [ ],
  "total_policies" : 0
}
2 Likes