The logging service provides an easy to use API endpoint for downloading the raw log files.
The logging API service is available at logging.bunnycdn.com. To access the log file, you need to send the request with the URL path as described below.
The logging API works with a basic AccessKey header authentication. To authenticate a request, you need to send your account API key through the AccessKey header.
By default, the raw logs are returned in the raw text format. Due to the amount of data required, this can present a significantly large file size. To reduce the size of the download and greatly improve the performance of the download, you can use the Accept-Encoding header to signal our service that the data can be compressed using GZip. This can decrease the file size and download time by as much as 5 times.
Below is a complete example code to download a log file from the bunny.net logging service.
curl --location \ --request GET 'https://logging.bunnycdn.com/27-01-21/60367.log' \ --header 'AccessKey: bce1fd5a-a1da-464f-955e-9295201134f5'
On top of the basic download service, the logging API provides an additional set of query-based parameters to control the delivery of the data.
The start parameter defines the number of log lines that will be skipped at the beginning of the file before starting the output.
The end parameter defines the end index of the log lines that will be processed during the output.
By default, the logs are arranged from latest to olderst. The order parameter defines the order in which the log file will be returned. Possible values: asc, desc (default).
Updated 8 months ago