latestOpenAPI 3.1.02026-08-23100133183.1 KB

0d66c7340876

Instances

Perform action on an instance or multiple instances

Perform an action on a single or multiple instances.

Note: to hibernate an instance, you must first shutdown it. All instance volumes would be detached and the instance will be deleted.

Important: To remove an instance and stop charging your account, you must delete it. Using shutdown will keep charging your account.

When deleting an instance, you can specify which of its' attached volumes will be deleted by providing volume_ids array. Any attached volumes that are not specified in the array would be detached.

Note: If not providing a volume_ids array, only the OS volume will be deleted and the rest detached.

put/v1/instances

Headers

user-agentstring required
cf-connecting-ipstring required

Request body

action'boot' | 'start' | 'shutdown' | 'delete' | 'discontinue' | 'hibernate' | 'configure_spot' | 'force_shutdown' | 'delete_stuck' | 'deploy' | 'transfer' required
volume_idsstring[]

Volume IDs to delete. Specify empty array to indicate no volumes should be deleted (previously known as "hibernate")

delete_permanentlyboolean

Delete the volumes permanently. Only applicable for delete (or discontinue) action, when volume IDs to delete are also provided.

Example request

{
  "volume_ids": [
    "ad07095b-2427-43cd-bd4c-04a01c4f8ad6"
  ]
}

Response

All actions completed successfully

instanceIdstring uuid required

Instance ID

action'boot' | 'start' | 'shutdown' | 'delete' | 'discontinue' | 'hibernate' | 'configure_spot' | 'force_shutdown' | 'delete_stuck' | 'deploy' | 'transfer' required

Action that was requested

status'success' | 'error' required

Whether the action succeeded or failed

errorstring

Error message if the action failed

statusCodenumber

HTTP status code of the error

Example response

[
  {
    "statusCode": 400
  }
]