Retrieve Details of a Screen Capture Request

get

/console/screencapture/{name}

Retrieves details of the specified screen capture. Use this request to verify whether the POST /console/screencapture/ and PUT /console/screencapture/{name} requests were completed successfully. If the screen capture is taken successfully, the state field changes from queued to pending, to in-progress, to uploading, and then finally to complete. When the state field changes to complete, you can access the screen capture from the location specified in the media_uri field. If the state field shows error, the screen capture has not been created even though a location is specified in the media_uri field. You'll need to identify the issue and resolve it, before creating a new request for another screen capture. Look at the information provided in the error_reason field to identify the issue.

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

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 retrieve details of a screen capture by submitting a GET 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 -X GET 
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
        https://api-z999.compute.us0.oraclecloud.com/console/screencapture/Compute-acme/jack.jones@example.com/<instance_name>/<autogenerated-id>
  • 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 Response Body

The following example shows the response body in JSON format. In this example, the /Compute-acme/jack.jones@example.com/webserver1/d2ae862d-69be-43e0-bbc6-06d679b7fcdc/20170216-053718 screen capture is in the error state. Look at the information provided in the error_reason field to identify the issue and resolve it. After resolving this issue, you can create a request for another screen capture.

{
  "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": "https://api-z999.compute.us0.oraclecloud.com/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": false,
  "error_reason": "Error capturing instance screen, last state 'in-progress' (unsupported operand type(s) for -: 'NoneType' and 'int')",
  "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": "not_requested"
  }
}