Updated on 2024-10-10 GMT+08:00

Querying the Billing Option

Function

  • This API is used to query the billing option.
  • The billing option status can be active (effective, default value) or upcoming (to take effect).
  • The acceleration type can only be base (basic acceleration).
  • A single tenant can call this API five times per second.

URI

GET /v1.0/cdn/charge/charge-modes

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

product_type

Yes

String

Acceleration type. The value is base (basic acceleration).

status

No

String

Billing option status. The options are active (effective) and upcoming (to take effect). If this parameter is not passed, the default value active is used.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

result

Array of Map<String,Object> objects

Result of querying the billing option.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error

ErrMsg object

Error code and error message.

Table 4 ErrMsg

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

Querying the billing option

GET https://{endpoint}/v1.0/cdn/charge/charge-modes?&product_type='base'&status='active'

Example Responses

Status code: 200

Success response

  • Querying the billing option
    {
      "result" : {
        "charge_mode" : "flux",
        "effective_time" : 1666238400000,
        "service_area" : "global",
        "status" : "active",
        "product_type" : "base"
      }
    }

Status Codes

Status Code

Description

200

Success response

400

Error response