Add an Archive Server

Add an archive server to store PBX recording files and backup files.

Request URL

POST {base_url}/{api_path}/archive_server/create?access_token={access_token}

Request parameters

Parameter Required Type Description
name Yes String The name of the archive server.
server_type Yes String The type of the archive server.

Valid value:

  • ftp: FTP server.
  • sftp: SFTP server.
  • amazon_s3: S3-compatible object storage.
  • google_storage: Google Cloud Storage.
  • sharepoint: Microsoft SharePoint site.
host No String The server address.
Note: This parameter is required when server_type is ftp or sftp.
port No Integer The server port.
Note: This parameter is required when server_type is ftp or sftp.
protoc No String The protocol used by the FTP server.
Note: This parameter is required when server_type is ftp.

Valid value:

  • ftp: Standard FTP.
  • ftpes: FTPES (explicit encryption).
method No Integer The authentication method used by the SFTP server.
Note: This parameter is required when server_type is sftp.

Valid value:

  • 0: Not specified.
  • 1: Password authentication.
  • 2: Key authentication.
username No String The username for the FTP or SFTP account.
Note: This parameter is required when server_type is ftp or sftp.
password No String The password for the FTP or SFTP account.
Note: This parameter is required when server_type is ftp, or when server_type is sftp and method is 1.
ssh_private_key No String The filename of the SSH private key used for SFTP authentication.
Note:
endpoint No String The endpoint of the S3-compatible storage.
Note: This parameter is required when server_type is amazon_s3.
region No String The region of the S3-compatible storage.
Note: This parameter is required when server_type is amazon_s3.
access_key_id No String The access key ID for the S3-compatible storage account.
Note: This parameter is required when server_type is amazon_s3.
secret_access_key No String The secret access key for the S3-compatible storage account.
Note: This parameter is required when server_type is amazon_s3.
tenant_id No String The Microsoft Entra tenant ID.
Note: This parameter is required when server_type is sharepoint.
client_id No String The application (client) ID registered in Microsoft Entra ID.
Note: This parameter is required when server_type is sharepoint.
client_secret No String The client secret for the application registered in Microsoft Entra ID.
Note: This parameter is required when server_type is sharepoint.
private_key No String The filename of the private key used for Google Cloud Storage authentication.
Note:

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
id Integer The ID of the archive server.
upper_limited Integer The upper limit of archive servers, returned when errcode is 60002 (the maximum is reached).

Example

Request example

POST /openapi/v1.0/archive_server/create?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
  "name": "Sample-FTP-Server",
  "server_type": "ftp",
  "protoc": "ftp",
  "host": "121.41.123.45",
  "port": 21,
  "username": "root",
  "password": "password"
}

Response example

HTTP/1.1 200 OK
{
  "errcode": 0,
  "errmsg": "SUCCESS",
  "submsg": "",
  "id": 10,
  "upper_limited": 0
}