Skip to content

Enhance move-to-step API to allow optionally dropping step name #58128

@dakrone

Description

@dakrone

Currently the move-to-step API for ILM looks like this:

POST /_ilm/move/foo
{
  "current_step": {
    "phase": "warm",
    "action": "shrink",
    "name": "check-allocation"
  },
  "next_step": {
    "phase": "cold",
    "action": "allocate",
    "name": "allocate"
  }
}

However, in order to use this API, we require a user to know the name of the step they are on and wish to go to. These steps are not documented because they are subject to change an more of an implementation detail rather than something that can be relied upon.

A nice enhancement for this would be if we could make the step name for next_step optional, where ILM would go to the first step of the action if the step name was not specified, such as:

POST /_ilm/move/foo
{
  "current_step": {
    "phase": "warm",
    "action": "shrink",
    "name": "check-allocation"
  },
  "next_step": {
    "phase": "cold",
    "action": "allocate"
  }
}

This would also help make the move-to-step API safer to use, as some of our actions contain validation in steps that occur at the beginning of the action (things like checking whether a shrink can be skipped for instance). We could ensure that users are more likely to run this validation when moving to a step directly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions