URL
https://cdnsun.com/api/cdns
Method
POST
Curl example
curl -i -X POST -u username:password -H 'Accept: application/json' -H 'Content-type: application/json' --url 'https://cdnsun.com/api/cdns' -d '{"cdn":{"service_type":"HTTP_PUSH","origin_storage_id":2,"service_domain":"static.mycompany.com"}}'Options
| Option | Data Type | Description | Example | Known Values | Note |
|---|
| service_type* | string | Specify the CDN service type. | HTTP_PUSH | HTTP_PUSH | |
| service_domain* | string | Specify the domain name for customized CDN URLs. | static.mycompany.com | | |
| origin_storage_id* | integer | Specify the integer ID of the Origin Storage. It is the source of origin content for the CDN service. | 2 | | |
| cache_expiry | integer | For how long (minutes) should CDN edge servers cache your content. | 2160 | 1, 2, 3, 5, 10, 30, 60, 240, 720, 1440, 2160, 2880, 4320, 5760, 7200, 8640, 10800, 11520, 12960, 14400, 21600, 28800, 36000, 43200 | |
| url_signing_on | boolean | Protect your CDN content from unwanted downloads. | false | false, true | |
| proxy_cache_key | string | Specify the CDN cache key. | $host$uri | $host$request_uri, $host$uri | |
| ignore_set_cookie_on | boolean | Whether Ignore Set-Cookie is enabled or disabled. | true | true, false | |
| block_crawlers_on | boolean | Whether Block Search Engine Crawlers is enabled or disabled. | true | true, false | |
| secondary_service_domains | array | Secondary Service Domains. | [secdom1.mycompany.com, secdom2.mycompany.com] | | Specify up to 7 Secondary Service Domains. |
| location_ids | array | Specify the integer ID(s) of subscribed CDN Locations. | [1, 2] | | |