BunnyCDN is a powerful content delivery network (CDN) offering an API to manage and deliver content globally with ease. Through its API, you can programmatically purge cache, manage storage zones, and get detailed statistics about your content distribution. The BunnyCDN API facilitates building workflows on Pipedream that automate content delivery processes, leverage CDN data for analytics, and optimize digital asset management.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
bunnycdn: {
type: "app",
app: "bunnycdn",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://bunnycdn.com/api/billing`,
headers: {
"AccessKey": `${this.bunnycdn.$auth.api_key}`,
},
})
},
})
Automated Cache Purge on Content Update: When a website hosted on a platform like WordPress updates content, trigger a workflow on Pipedream to automatically purge the BunnyCDN cache. This ensures visitors always see the most recent version of the site.
Dynamic Content Distribution Management: Create a workflow that monitors your server for new or updated files. When changes are detected, automatically upload these files to a BunnyCDN storage zone and update your website's links to the new CDN URLs, ensuring efficient content distribution.
Analytics and Monitoring: Set up a Pipedream workflow to regularly fetch CDN usage statistics from BunnyCDN. Integrate with tools like Google Sheets or Data Studio, allowing you to build live dashboards or send daily or weekly performance reports to stakeholders.
BunnyCDN uses API keys for authentication. When you connect your BunnyCDN account, Pipedream securely stores the keys so you can easily authenticate to BunnyCDN APIs in both code and no-code steps.
To authenticate with the API, add an AccessKey HTTP header to your requests with your API key as the value. You can find this in our Dashboard in the My Account section.