You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
O&M
GetConsoleScreenshot - Obtains a screenshot
Copy page
Download PDF
GetConsoleScreenshot - Obtains a screenshot
Call the GetConsoleScreenshot operation to obtain a JPG screenshot of a running instance.​
Usage notes​
  • You can only obtain the instance screenshot of an instance in the Running state.​
  • Elastic Bare Metal (EBM) instances currently do not support this feature.​
  • The returned JPG screenshot of the instance is Base64-encoded and requires manual decoding.​
  • This operation has a request limit in frequency. The recommended interval between requests is around 10s to avoid exceeding the operation frequency limit.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: GetConsoleScreenshot​
The action that you want to perform. Value: GetConsoleScreenshot.​
​
Version string required Sample value: 2020-04-01​
The version of the API. Valid value: 2020-04-01.​
​
InstanceId string required Sample value: i-3tiefmkskq3vj0******​
The instance ID. You can call the DescribeInstances operation to query the instance ID.​
​
WakeUp boolean Optional Sample value: false​
Specifies whether to wake up the instance in hibernation. Value:​
  • true: Wakes up the instance in hibernation.​
  • false (default): Does not wake up the instance in hibernation.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to response structure.​
InstanceId string Sample value: i-3tiefmkskq3vj0******​
The instance ID.​
​
Screenshot string Sample value: /9j/2wCEAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKC******​
The Base64-encoded JPG screenshot of the instance.​
tip​
You can add the prefix data:image/jpeg;base64, to the returned value and then enter the full string in the browser to open the screenshot.​
​
​
​
Sample request​
​
GET /?Action=GetConsoleScreenshot&Version=2020-04-01&InstanceId=i-3tiefmkskq3vj0****** HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
ServiceName: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "202106111445100102252431000052****",​
"Action": "GetConsoleScreenshot",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstanceId": "i-3tiefmkskq3vj0******",​
"Screenshot": "/9j/2wCEAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKC******"​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
InvalidInstanceStatus​
The status of the specified instance does not support this request.​
The current status of the instance does not support this operation.​
400​
InvalidInstanceTypeForGetConsoleScreenshot.Unsupported​
The specified InstanceType does not support get instance console screenshot.​
The specified instance type does not support the screenshot feature.​
400​
MissingParameter.InstanceId​
The required parameter InstanceId is not supplied.​
The instance ID cannot be left empty.​
404​
InvalidInstance.NotFound​
The specified instance does not exist.​
The specified instance does not exist.​
429​
FlowLimitExceeded​
You've reached the limit on request rate of resources.​
Request rate of resources exceeds the limit.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
​
Last updated: 2026.06.18 17:48:25