Create Filedownload

This API is used to create file download service.

1. Request Definition

  • API URL
https://cdn-api.swiftfederation.com/v1.0/filedownloads
  • Request Method
POST
  • Request Header

Refer to HTTP Request Headers

  • Request Body

Request Body Data Format: JSON

Field Required Type Description
name Mandatory string Domain name. Can only contain lowercase letters, digits, hyphens, or periods.
ftpPassword Mandatory string FTP password of file download storage access.
customerId Mandatory int Customer ID of this domain.
redirectHttpToHttps Optional boolean Whether redirect all plain HTTP requests to HTTPS. true: Enabled, false: Disabled. Default is false.
active Optional boolean To indicate if service is enabled or disabled. true: Enabled, false: Disabled. Default is true.
  • Request Body Example
{
    "name": "cdn.website2.com",
    "ftpPassword": "abcd1234",
    "customerId": 11,
    "redirectHttpToHttps":true,
    "active": true
}


2. Response Definition

  • Response Header

Refer to HTTP Response Headers

  • Response Body
Field Type Description
id int Service ID number.
name string Domain name.
customerId int Customer Id
originUrl string IP or domain name of origin server.
deliveryDomain string Delivery domain which will be CName to.
streamingService boolean true: Enabled, false: Disabled.
active boolean true: Enabled, false: Disabled.
originAccountId int FTP Account id.
webDavUrl string Webdav access URL.
deliveryEndpoint string Delivery endpoint uri.
diskUsage int Disk usage in byte unit.
redirectHttpToHttps boolean Whether redirect all plain HTTP requests to HTTPS. true: Enabled, false: Disabled. Default is false.
  • Response Body Example
{
    "id": 201,
    "name": "lfdvod1",
    "customerId": 11,
    "originUrl": "1.2.3.4",
    "deliveryDomain": "edge.swiftserve.com",
    "active": true,
    "originAccountId": 123,
    "webDavUrl": "\nhttp://ftp.example.swiftserve.com/webdav/lfdvod1/",
    "deliveryEndpoint": "edge.swiftserve.com/customer1/lfdvod1",
    "diskUsage": 0,
    "redirectHttpToHttps":true
}
           Updated 2024-08-26 07:42:13

results matching ""

    No results matching ""