Adding a File Server
Scenario
This interface is invoked to add a file server. It can be used before importing an outbound call data file from the server.
Usage Description
- Prerequisites
- The corresponding AK/SK authentication permission is available.
- You have applied for a developer account.
- Precautions
- After a request is received, the server needs to return a 200 response. Other responses indicate that the writeback fails.
- The server information must be unique in the same tenant space.
- The username can contain a maximum of 30 characters and cannot contain the following special characters: `~!@#$ %^&*()+=|{}'":;<>/?.\[]!
- The password must be a string of 8 to 80 characters.
- Only the SFTP file server is supported.
Method
This interface supports only the POST method.
URI
https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/file/addServer
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.
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
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. |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
serverInfo |
JSON object |
Yes |
File server information. |
2 |
userName |
String |
Yes |
Username. |
3 |
serverPwd |
String |
Yes |
Service password, which is transferred in plaintext and stored in ciphertext on the backend. |
serverInfo
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
ip |
String |
Yes |
File server IP address. |
2 |
port |
String |
Yes |
port |
3 |
filePath |
String |
Yes |
Default file server path, for example, /home/sftp. |
Response Description
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 |
serverId |
String |
File service ID, which is globally unique. |
4 |
returnCode |
String |
Error code. The value 0200000 indicates success, and other values indicate failure. For details, see Table 5. |
5 |
returnDesc |
String |
Description. |
Triggered Event
None
Error Codes
No. |
Error Code |
Description |
---|---|---|
1 |
0200001 |
Parameter error. For details about the error, see resultDesc. |
2 |
0200033 |
The outbound call data does not exist. |
3 |
0200034 |
The substatus does not match the business result. |
4 |
02000005 |
The parameter value is not in the specified length range. |
5 |
02000001 |
Empty parameter. |
6 |
02000002 |
The parameter contains invalid characters. |
7 |
02000003 |
The parameter length cannot exceed the maximum length. |
8 |
02000004 |
The parameter length cannot be less than the minimum length. |
9 |
02000005 |
The parameter length must be within the specified range. |
10 |
02000006 |
Incorrect parameter type. |
11 |
02000007 |
Incorrect parameter value. |
12 |
02000008 |
Parameter conversion error. Check the request parameters. |
13 |
02000009 |
Incorrect parameter combination. Check the request parameters. |
14 |
02000010 |
The hour and minute parameters must be set at the same time. |
Example
- The following provides an example of the request body of this interface:
{ "userName":"zhangsan", "serverInfo":{ "ip":"1.2.3.4", "port":"22", "filePath":"/home/sftp" }, "serverPwd":"******" }
- The following provides an example of the response body of this interface:
{ "resultCode": "02000005", "description": "The parameter value must be a string of 8 to 80 characters." }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot