Updated on 2025-11-13 GMT+08:00

Querying a Blocklist Type

Scenario

This interface is invoked to query a blocklist type.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • Blocklist types have been created.

Method

This interface supports only the POST method.

URL

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/blackType/query

In the URL, ip indicates the IP address of the CC-iSales server, and port indicates the HTTPS port number of the CC-iSales server.

Table 1 Parameter in the URL

No.

Parameter

Value Type

Mandatory or Not

Description

1

vdnId

Integer

Yes

ID of a VCC.

The value is an integer ranging from 1 to 9999.

Request Description

Table 2 Request header parameters

No.

Parameter

Value Type

Mandatory or Not

Description

1

Content-Type

String

Yes

The value is fixed at application/json; charset=UTF-8.

2

Authorization

String

Yes

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

3

locale

String

No

i18n (internationalization, Language International Code), for example, zh_CN indicates Chinese and en_US indicates English. The default value is zh_CN.

Table 3 Request body parameters

No.

Parameter

Value Type

Mandatory or Not

Description

1

name

String

No

Blocklist type name. Fuzzy search is supported.

2

offset

Integer

Yes

Parameter for determining the start page of the query.

Value of offset = Value of limit x (Value of page – 1)

page indicates the start page to be queried.

3

limit

Integer

Yes

Number of query records on each page.

The value ranges from 1 to 100.

Response Description

Table 4 Response body parameters

No.

Parameter

Value Type

Description

1

resultCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 5.

2

resultDesc

String

Description.

3

totalCount

Integer

Total number of records in the returned list.

4

data

Object

For details, see Table 5.

5

returnCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 6.

6

returnDesc

String

Description.

Table 5 Parameter description of data

No.

Parameter

Value Type

Description

1

id

String

Blocklist type ID.

2

name

String

Blocklist group name.

3

description

String

Blocklist group description.

4

orgName

String

Organization name.

5

actionType

String

Action type. The options are as follows:

  • 1: automatic processing
  • 2: pop-up window

6

action

String

Action.

Triggered Event

None

Error Codes

Table 6 Error code description

No.

Error Code

Description

1

0200001

Parameter error. For details about the error, see resultDesc.

2

0200006

Database operation error.

3

0200007

The number already exists in the blocklist.

4

0200018

Duplicate numbers exist.

5

0200029

The maximum number of numbers that can be added each time is exceeded.

6

02000001

Empty parameter.

7

02000002

The parameter contains invalid characters.

8

02000003

The parameter length cannot exceed the maximum length.

9

02000004

The parameter length cannot be less than the minimum length.

10

02000005

The parameter length must be within the specified range.

11

02000006

Incorrect parameter type.

12

02000007

Incorrect parameter value.

13

02000008

Parameter conversion error. Check the request parameters.

14

02000009

Incorrect parameter combination. Check the request parameters.

15

02000010

The hour and minute parameters must be set at the same time.

16

02000011

The number of parameters cannot exceed the specified number.

17

02000012

The blocklist group already exists.

18

02000013

Invalid blocklist group ID.

19

02000014

The blocklist type already exists.

20

02000015

Invalid blocklist type ID.

Example

  • The following provides an example of the request body of this interface:
    {
       "name":"test",
       "offset":1,
       "limit":"1"
    }
  • The following provides an example of the response body of this interface:
    {
        "resultCode": "0200000",
        "resultDesc": "success",
        "returnCode": "0200000",
        "returnDesc": "success",
        "totalCount": 1,
        "data": [
            {
                "id": "1293299332",
                "name": "Blocklist type",
                "description": null,
                "orgName": null,
                "actionType": "1",
                "action": "eyJidXNpUmVzdWx0IjoiMTM4Mjg4NTYifQ=="
            }
        ]
    }