WaveCDN API
Add a setup
Add a new setup with the specified parameters. You can add up to 100 setups.
Request
POST https://api.wavecdn.com/v3/setup
Request body
sub_domain={..}
The sub_domain for the setup. Only chars and digits are allowed. The length must be between 3 and 30 characters. If you specify example as sub_domain, the final domain is example.wavecdn.net. You'll get an error if the sub_domain already exists! The type of the data source where to pull the files from:
source={..}
Specify storage if you want to use our WaveCDN Storage as data source.
Specify origin if you want to use your own origin. In this case, you need to add an origin in order to use the setup.
origin_host_header={..}
(Optional) Can be specified if source is origin. It defines the host header that is used in backend requests. The default one is your cdn domain, for example testsetup.wavecdn.net. If you have multiple virtual hosts on your origin, you probably need to adjust this value.
Response
On success, the status code 201 and the new setup is returned. For a detailed description of output see Fetch a setup. The outputs are equal.
If an error occurs, you get a code different than 201 and the error message as response. Example:
<?xml version="1.0" encoding="UTF-8"?> <error> <code>500</code> <message>sub_domain: Already exists. Choose a different one.</message> </error>