2.4. Executing Instance ActionsΒΆ
POST /instances/{instance_id}/action
Creates a task to execute the specified action on the specified instance. The supported actions are: start, stop, pause, suspend, reset, reinstall, and repair.
Request example:
# curl -s -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
-H 'X-Effective-User-ID: c3862f44c4bc48358db62ae22d684f33' \
-H 'X-Effective-Project-ID: 04e0d744d0f544c69ff7c17db5c8b4b9' -d '
{
"action": "start"
}
' https://<controller_hostname>/api/v1/instances/6e634127-5c8c-4205-8ac6-a8113cdc58a1/action
Response example:
{
"instance_uuid": "6e634127-5c8c-4205-8ac6-a8113cdc58a1",
"status": null,
"started_at": "2020-12-24T06:46:51.000000",
"user_id": "c3862f44c4bc48358db62ae22d684f33",
"finished_at": null,
"state": "running",
"progress": 0,
"message": null,
"project_id": "04e0d744d0f544c69ff7c17db5c8b4b9",
"type": "start",
"id": 56
}
Dec 08, 2021