Changing Host desired state

Format

MethodPOST
URL

/tasks/create

Request contentsHostAction Object
Successful answerTaskResult Object
Unexpected errorHTTP 500

HostAction Object

Schema

typeStringTask type identifier. In this case, "host_action"
host_idStringHost's unique identifier
actionString

Action to be applied to this Host. Either "enable", "disable" or "shutdown".

  • "enable": puts the host in "running" (also called operational) state.
  • "disable": puts the host in "stopped" (also called manteinance) state. In this state, host does not provide reources to pools or guests.
  • "shutdown": shuts down the host OS. It must be disabled first.

JSON example

{
    "type": "host_action",
    "host_id": "flexdemo",
    "action": "disable"
}