You can call ECS API operations by sending HTTP or HTTPS GET requests based on URLs. Each URL must include request parameters. This topic describes the syntax of HTTP or HTTPS GET requests and provides the endpoints of ECS API.
Sample request
The following example show an unencoded URL request to call the CreateSnapshot operation:
https://ecs.aliyuncs.com/?Action=CreateSnapshot
&DiskId=d-28m5zbu****
&<Common request parameters>
https
specifies the protocol for transmitting the request.ecs.aliyuncs.com
specifies the endpoint of ECS.Action=CreateSnapshot
specifies the API operation to call.DiskId=d-28m5zbu****
is a request parameter for CreateSnapshot.<Common request parameters>
are common parameters defined in the system.
Protocols
You can send requests over HTTP or HTTPS. For a higher level of security, we recommend that you send requests over HTTPS.
If the request contains sensitive data, such as the username, password, and Secure
Shell (SSH) key pairs, we recommend that you use HTTPS. For example, you can specify
the Password
parameter when you call the CreateInstance operation.
Endpoints
The following table lists the endpoints of ECS API. To minimize network latency, we recommend that you specify the endpoint based on the region where you make API requests.
-
The following table lists the best endpoints for making API requests from mainland China.
Region Endpoint Default ecs.aliyuncs.com China (Zhangjiakou-Beijing Winter Olympic) ecs.cn-zhangjiakou.aliyuncs.com China (Hohhot) ecs.cn-huhehaote.aliyuncs.com China (Ulanqab) ecs.cn-wulanchabu.aliyuncs.com China (Heyuan) ecs.cn-heyuan.aliyuncs.com Japan (Tokyo) ecs.ap-northeast-1.aliyuncs.com Australia (Sydney) ecs.ap-southeast-2.aliyuncs.com Malaysia (Kuala Lumpur) ecs.ap-southeast-3.aliyuncs.com Indonesia (Jakarta) ecs.ap-southeast-5.aliyuncs.com India (Mumbai) ecs.ap-south-1.aliyuncs.com UAE (Dubai) ecs.me-east-1.aliyuncs.com Germany (Frankfurt) ecs.eu-central-1.aliyuncs.com UK (London) ecs.eu-west-1.aliyuncs.com -
Global acceleration is enabled for
ecs.aliyuncs.com
. This can reduce network latency caused by traffic forwarding across borders or regions. You can use this endpoint when you want to make API requests from countries or regions outside mainland China.
Request parameters
You must specify the Action
parameter to specify the API operatoin that you want to call. For example, set Action
to StartInstance. You must also specify other operation-specific request parameters and common request
parameters. For more information, see Common request parameters.
Encoding
All requests and responses are encoded in UTF-8
.