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

Querying Bandwidth Information

Function

This API is used to query the bandwidth used by a cloud phone. This API applies only to cloud phone servers that use system-defined networks.

URI

GET /v1/{project_id}/cloud-phone/bandwidths

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

If the offset is 0 (default value) or an integer greater than 0, all resources after the offset will be queried.

limit

No

Integer

Specifies the number of resources returned on each page. The value ranges from 1 to 100 (default). Generally, this parameter is set to 10, 20, or 50.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an Identity and Access Management (IAM) API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Specifies the unique request ID.

band_widths

Array of Bandwidth objects

Indicates the bandwidth information.

Table 5 Bandwidth

Parameter

Type

Description

band_width_name

String

Specifies the bandwidth name of the cloud phone server.

band_width_id

String

Specifies the unique identifier of the bandwidth used by the cloud phone server.

band_width_size

Integer

Specifies the bandwidth size of the cloud phone server.

band_width_charge_mode

Integer

Specifies the billing mode of the cloud phone server bandwidth.

  • 0: bandwidth (charged by bandwidth)

  • 1: traffic (charged by traffic)

band_width_share_type

Integer

Specifies the bandwidth type of the cloud phone server.

  • 0: per, exclusive bandwidth

  • 1: whole, shared bandwidth

create_time

String

Time when the bandwidth is created,

The UTC time is in YYYY-MM-DDTHH:MM:SSZ format.

update_time

String

Bandwidth Update Time,

The UTC time is in YYYY-MM-DDTHH:MM:SSZ format.

Example Requests

Querying the bandwidth in use

GET https://{CPH Endpoint}/v1/{project_id}/cloud-phone/bandwidths

Example Responses

Status code: 200

OK

{
  "request_id" : "70bb40bef50e4a14b116a5a527fd7432",
  "band_widths" : [ {
    "band_width_id" : "70bb40-bef5-0e4a-14b116-a5a527fd7432",
    "band_width_name" : "BANDWIDTH_70bb40bef50e4a14b116a5a527fd7432",
    "band_width_size" : 300,
    "band_width_share_type" : 1,
    "create_time" : "2017-10-10T00:00:00Z",
    "update_time" : "2018-11-12T00:00:00Z"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.