Retrieves a lifecycle policy Added in 6.6.0

GET /_ilm/policy/{policy}

Path parameters

  • policy string Required

    Identifier for the policy.

Query parameters

  • Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout string

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • * object Additional properties

      Additional properties are allowed.

      Hide * attributes Show * attributes object
      • modified_date string | number Required

        A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.

      • policy object Required

        Additional properties are allowed.

        Hide policy attributes Show policy attributes object
        • phases object Required

          Additional properties are allowed.

          Hide phases attributes Show phases attributes object
          • cold object

            Additional properties are allowed.

            Hide cold attributes Show cold attributes object
          • delete object

            Additional properties are allowed.

            Hide delete attributes Show delete attributes object
          • frozen object

            Additional properties are allowed.

            Hide frozen attributes Show frozen attributes object
          • hot object

            Additional properties are allowed.

            Hide hot attributes Show hot attributes object
          • warm object

            Additional properties are allowed.

            Hide warm attributes Show warm attributes object
        • _meta object
          Hide _meta attribute Show _meta attribute object
          • * object Additional properties

            Additional properties are allowed.

      • version number Required
GET /_ilm/policy/{policy}
curl \
 -X GET http://api.example.com/_ilm/policy/{policy}
Response examples (200)
{
  "my_policy": {
    "version": 1,
    "modified_date": 82392349,
    "policy": {
      "phases": {
        "warm": {
          "min_age": "10d",
          "actions": {
            "forcemerge": {
              "max_num_segments": 1
            }
          }
        },
        "delete": {
          "min_age": "30d",
          "actions": {
            "delete": {
              "delete_searchable_snapshot": true
            }
          }
        }
      }
    },
    "in_use_by" : {
      "indices" : [],
      "data_streams" : [],
      "composable_templates" : []
    }
  }
}