Update a Screen Capture Request

put

/console/screencapture/{name}

Updates the specified screen capture. You can cancel a screen capture request which is not in the complete or error state by setting cancel to true in the update request. For example, if a screen capture request is stuck in the in-progress state for a long time due to unforeseen circumstances, you can cancel the screen capture to change its state to error.

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
Path Parameters
Header Parameters
Body ()
The request body contains details of the screen capture request that you want to update.
Root Schema : ScreenCapture-put-request
Type: object
The request body contains details of the screen capture request that you want to update.
Show Source
  • Two-part name of the account (/Compute-identity_domain/cloud_storage) that contains the credentials and access details of the associated Oracle Cloud Infrastructure Object Storage Classic instance.
  • Set to true to cancel a screen capture request. You can cancel a screen capture request which is not in the complete or error state.
  • Specify the multipart name of the instance. This is the name of the instance against which you have created the screen capture request that you want to update.

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : ScreenCapture-response
Type: object
Show Source
Nested Schema : cancellation
Type: object
Set of attributes describing the state of cancellation of the screen shot when the cancel parameter is set to true.

Examples

cURL Command

The following example shows how to update a screen capture, /Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718, by submitting a PUT 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 PUT
     -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/console/screencapture/Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718
  • 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.

  • acme and jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com with your user name.

Example of Request Body

The following shows an example of the request body content in the screencapture.json file. In this request, cancel is set to true to change the state of the specified screen capture to the error state.

{
   "account": "/Compute-acme/cloud_storage", 
   "name": "/Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718",
   "cancel": true
}

Example of Response Body

The following example shows the response body in JSON format when you update a screen capture to change its state to error.

{
  "account": "/Compute-acme/cloud_storage",
  "name": "/Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718",
  "creation_time": "2017-02-16T05:37:18Z",
  "uri": "http://10.252.131.5/console/screencapture/Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718",
  "instance": "/Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc",
  "state": "error",
  "request_id": "170216d541112a6f8a60aeeabb628d5996c50f",
  "cancel": true,
  "error_reason": "cancelled by user",
  "media_uri": "http://acme.devpool0.opcstorage.com:7820/v1/Storage-acme/compute_images/Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718.png",
  "cancellation": {
    "error_reason": null,
    "state": "cancelled"
  }
}