Query Blocked Numbers List
Query the call blocklists.
Request URL
GET {base_url}/{api_path}/block_numbers/list?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | No | Integer | Define which page is displayed. |
| page_size | No | Integer | Define how many records per page. |
| sort_by | No | String | Define the sorting field. Valid value:
|
| order_by | No | String | Define the display order. Valid value:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| total_number | Integer | The total number of blocklist rules. |
| data | Array <Blocklist_Info> | The list of the blocked numbers' information. |
- Blocklist_Info
-
Table 3. Parameter Type Description id Integer The unique ID of the blocklist rule. name String The name of the blocklist rule. limit_type String The communication type that applies to the blocklist rule. number_list String The numbers that will be blocked by the system.
Examples
Request example
GET /openapi/v1.0/block_numbers/list?access_token=iQbvOlCrG2LgsXxDm5nl8vSEhlkogu6p HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "total_number": 3, "data": [ { "id": 3, "name": "Fraud Calls", "limit_type": "inbound", "number_list": "82469079" }, { "id": 2, "name": "Service Promotion", "limit_type": "inbound", "number_list": "010059292" }, { "id": 1, "name": "Ads", "limit_type": "inbound", "number_list": "28192929" } ] }