Create a Reboot Instance Request

post

/rebootinstancerequest/

If your instance hangs after it starts running, you can use this request to reboot your instance. After creating this request, use GET /rebootinstancerequest/{name} to retrieve the status of the request. When the status of the rebootinstancerequest changes to complete, you know that the instance has been rebooted.

To reboot the instance, you need to know its name, which you can view with the GET /instance/{container}/ request.

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Header Parameters
Body ()
The request body contains details of the reboot instance request that you want to create.
Root Schema : RebootInstanceRequest-post-request
Type: object
The request body contains details of the reboot instance request that you want to create.
Show Source

Response

Supported Media Types

201 Response

Created. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : RebootInstanceRequest-response
Type: object
Show Source

Examples

cURL Command

The following example shows how to create reboot instance request by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X POST
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@requestbody.json"
        https://api-z999.compute.us0.oraclecloud.com/rebootinstancerequest/
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file to create a reboot instance request for the instance /Compute-acme/jack.jones@example.com/7b036196-d077-4b6a-b2c8-64bc9d8d97ce.

{
 "hard": true,
 "instance": "/Compute-acme/jack.jones@example.com/7b036196-d077-4b6a-b2c8-64bc9d8d97ce"
}

Example of Response Body

The following example shows the response body in JSON format.

{
  "name": "/Compute-acme/jack.jones@example.com/7b036196-d077-4b6a-b2c8-64bc9d8d97ce/8666a368-6264-4cee-9ec4-63996234deb1",
  "client_owned": true,
  "hard": true,
  "creation_time": "2016-05-10T16:08:10Z",
  "uri": "https://api-z999.compute.us0.oraclecloud.com/rebootinstancerequest/Compute-acme/jack.jones@example.com/7b036196-d077-4b6a-b2c8-64bc9d8d97ce/8666a368-6264-4cee-9ec4-63996234deb1",
  "instance_id": "7b036196-d077-4b6a-b2c8-64bc9d8d97ce",
  "instance": "/Compute-acme/jack.jones@example.com/7b036196-d077-4b6a-b2c8-64bc9d8d97ce",
  "state": "active",
  "request_id": "8666a368-6264-4cee-9ec4-63996234deb1",
  "error_reason": ""
}