Fetch a log
Fetch a log of a given setup with entries between date_start and date_end.
Be aware that it may last many minutes till the download begins, because the log has to be prepared on-the-fly. The successful api request results in a download of a gzip-file. We advise to not specify date ranges greater than a day, because the download may become very large. Many small downloads are recommended and easier to handle.
The id of the setup you want a log for. Use Fetch all setups to get the ids of your setups.
The date that defines the start of the log entries. It should be formatted as 'YYYY-mm-dd HH:ii:ss'. The whitespace has to be escaped as a plus sign. The time zone should be UTC. Be aware that the logs are only kept for several days. See the webpanel for more information.
The date that defines the start of the log entries. See date_start for more information. Be aware that that the system needs some time to process the logs. Thus this date should be at least 3 hours ago (UTC).
On success, you get the status code 200 and the requested log as gzipped file. After unzipping it, you have a text file with semicolon-separated columns. It might look like this:
18.104.22.168;2013-01-19 23:08:00;domain.com;/images/logo.png;439001;200;hit 22.214.171.124;2013-01-19 23:08:00;cname.com;/static/index.xml;1157;200;hit 126.96.36.199;2013-01-19 23:08:00;domain.com;/css/main.css;470;304;miss
All response codes other than 200 show that fetching the log was not successful.
It's often necessary to automate log downloads with shell scripts. Downloading a log on your shell is very easy with wget. Don't forget to adjust the email, password and dates in the following command:
wget \ --output-document=log.gz \ --email@example.com \ --http-password=password \ 'https://api.wavecdn.com/v3/log/1/2013-01-20+16:00:00/2013-01-20+17:00:00'