Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Importing a Blacklist Data File from the Server

Updated on 2023-09-27 GMT+08:00

Scenario

This interface is invoked to import a blacklist data file from the server.

Blacklist Template

Create an Excel template based on Table 1.

Table 1 Blacklist template

Blacklisted Number (Mandatory)

Expiration Time (Optional)

Validity Period (Hour) (Optional)

Maximum Number of Calls

Restriction Period

65676950

-

-

1

1

88888888

2022-05-27 23:06:25

-

-

-

88888888

2022-06-24 10:06:25

-

-

-

12345678

2022-06-24 10:06:25

-

-

-

Table 2 Parameters in the blacklist template

No.

Parameter

Type

Mandatory or Not

Description

1

Blacklisted Number (Mandatory)

String

Yes

A number can contain a maximum of 24 characters, including only digits, asterisks (*), and number signs (#).

2

Expiration Time (Optional)

String

No

Expiration time. The value is the time when the number is added plus the validity period. For example, if two numbers are added to the blacklist at 2020-12-31 10:06:25 and the validity period is 120 hours, the expiration time is 2021-01-05 10:06:25.

3

Validity Period (Hour) (Optional)

Integer

No

Validity period, in hours. The value ranges from 1 to 120.

4

Maximum Number of Calls

Integer

No

Maximum number of calls. This parameter must be set or left empty together with restrictPeriod. The value ranges from 1 to 100.

5

Restriction Period

String

No

Restriction period. The options are 0 (every hour) and 1 (every day).

Example 1: "restrictTimes":1,"restrictPeriod":"0" indicates that if an outbound call is made at 10:06:25 on December 30, 2020, another outbound call cannot be made until 11:00:00 on December 30, 2020.

Example 2: "restrictTimes":1,"restrictPeriod":"1" indicates that if an outbound call is made at 10:06:25 on December 30, 2020, another outbound call cannot be made until 00:00:00 on December 31, 2020.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • A file server is available and supports SFTP.
  • Restrictions
    • A maximum of 500,000 records can be imported using a file at a time.

Method

This interface supports only the POST method.

URI

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/blackfile/uploadFileServer

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 3 Parameters in the URL

No.

Parameter

Type

Mandatory or Not

Description

1

vdnId

Integer

Yes

VDN ID.

The value is an integer ranging from 1 to 9999.

Request Description

Table 4 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

The value is fixed to 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.

Table 5 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

serverId

String

Yes

File server ID.

2

filePath

String

No

File storage path. This parameter is optional. If the blacklist data file is stored in the default path of the file server, you do not need to set this parameter. If the file is stored in a folder in the default path of the file server, set this parameter to the file path relative to the default path of the file server.

An example is /isales/20220310.

3

fileName

String

Yes

File name, for example, demo.xlsx.

4

hour

String

No

Hour, in 24-hour format. This parameter is mandatory when a scheduled task is used for the import. The value ranges from 0 to 23. If minute is set, hour is mandatory.

5

minute

String

No

Minute. This parameter is mandatory when a scheduled task is used for the import. The options are 00 and 30. If hour is set, minute is mandatory.

Response Description

Table 6 Response body parameters

No.

Parameter

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

importTaskId

String

File import task ID.

4

returnCode

String

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

For details, see Table 7.

5

returnDesc

String

Description.

Triggered Event

None

Error Codes

Table 7 Error code description

No.

Error Code

Description

1

0200001

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

2

02000001

Empty parameter.

3

02000002

The parameter contains invalid characters.

4

02000003

The parameter length cannot exceed the maximum length.

5

02000004

The parameter length cannot be less than the minimum length.

6

02000005

The parameter length must be within the specified range.

7

02000006

Incorrect parameter type.

8

02000007

Incorrect parameter value.

9

02000008

Parameter conversion error. Check the request parameters.

10

02000009

Incorrect parameter combination. Check the request parameters.

11

02000010

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

12

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the request body of this interface:
    {
    		"serverId":"164690088271159234793429225848",
        "filePath":"/isales/upload",
        "fileName":"demoBlack.xlsx",
    		"hour":"11",
    		"minute":"00"
    }
  • The following provides an example of the response body of this interface:
    {
    	"returnCode": "0200000",
    	"importTaskId": "164757251098048478018607266946",
    	"resultCode": "0200000",
    	"resultDesc": "Exporting data... View details in Import Result.",
    	"returnDesc": "Exporting data... View details in Import Result.",
    }

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback