Recharge【购买CDN流量】

购买CDN流量:可指定资源类型和流量包大小进行购买。

Request Parameters

Parameter name Type Description Required
action String API 标识符 Yes
type String 资源类型 Yes
num String 流量包大小 Yes

Response Elements

Name Type Description
message String 执行结果信息
code Integer HTTP Resonpe响应状态码
data Dict 充值信息列表,每项参数可见下面 Data Item

Data Item

Name Type Description
amount String 价格

Example

Example Request:

Request Headers:

POST /api/ HTTP/1.1
Origin: https://console.plcloud.com
X-CSRFToken: 6An6xEuOJqW6dVDtlgzZr6FqgkSbJmqp
Content-Type: application/json

JSON Data:

{
  "action": "Recharge",
  "type": "cdn_flow",
  "num": "10"
}

Example Response:

{
  "message": "Success",
  "code": 200,
  "data": {
      "amount": "4.48"
  }
}