You can call AIRec API operations by sending HTTP or HTTPS GET
, POST
, PUT
, or DELETE
requests based on URLs. Each URL or request body must include request parameters. All API operations of AIRec comply with RESTful API design specifications.
The following example demonstrates how to use an unencoded URL request to call the CreateInstance operation:
POST https://airec.cn-hangzhou.aliyuncs.com/openapi/instances
{
"chargeType": "PrePaid",
"type": "Standard",
"quota": {
"qps": 100,
"userCount": 1000000,
"itemCount": 1000000
},
"paymentInfo":{
"duration":1,
"pricingCycle":"Month",
"autoRenew":true
}
}
https
specifies the protocol for transmitting the request.airec.cn-hangzhou.aliyuncs.com
specifies the endpoint of AIRec./openapi/instances
specifies the URI.
Communication protocol
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, use HTTPS when you specify the accessKeyId and accessKeySecret parameters in the ModifyDataSource operation.
Data format
Requests and responses are displayed in the JSON
format.
Character encoding
Requests and responses are encoded by using the UTF-8
character set.