Skip to main content

bunny.net CDN operations

v0.1.11

Governed bunny.net Pull Zone lifecycle, cache, hostname, access-control, statistics, request-log, origin-error, and billing-usage operations. Auth via BUNNY_API_KEY on the runner host.

12 allowed by default 16 need approval by default 2 denied by default
Pack ID
bunnycdn
Vendor
emisar
OS
linux
Actions
30
Required binaries. Install these on the host before relying on the pack. An action that calls a missing binary fails at run time.
curl jq bash

Use this pack with your agent

New to emisar? Start with the quickstart to connect one Linux host and verify an action. With a runner connected, review this pack's actions and host requirements, then follow installing and verifying a published pack. Your policy decides which actions run, wait for approval, or are denied.

Connect a CLI agent, Claude.ai or ChatGPT to discover the installed actions through the same infrastructure MCP.

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below before copying it into the runner's packs dir. That hash covers the exact bytes this page was built from, so a tampered copy is rejected. The command reloads a running daemon itself, so you don't need to restart it manually.

on the runner host
sudo emisar pack install bunnycdn --hash sha256:dda8d786654482968cbefc91e101f6247500438bb73f47babeb79c9a62c3f3a3

Setup

Calls the bunny.net Core, CDN Logging v2, and Origin Errors APIs over HTTPS. BUNNY_API_KEY is sent in the AccessKey header over curl stdin and is never placed in argv or action output. Allowlist the variable in the runner's execution.inherit_env configuration.

Environment

Set these on the runner host, then add each name to execution.inherit_env so the value reaches the action.

  • BUNNY_API_KEY required

    bunny.net account API key. Use a scratch or least-privilege account and gate mutation actions with policy.

Notes

  • The account API key is at dash.bunny.net/account/settings → API.
  • Request logs are retained by bunny.net for three days; bunny.logs returns one bounded page and bunny.log_usage_summary aggregates one bounded page.
  • Pull Zone credentials, certificate material, log-forwarding tokens, edge-rule header and match values, request authorization headers, and URL query strings are removed or redacted before output leaves the runner.
  • The pack covers Bunny CDN Pull Zones. Bunny Storage, DNS, Stream, Shield/WAF, custom-certificate private keys, token-key reset, and arbitrary edge-rule documents are separate trust surfaces.

Verify it works

Runs bunny.list_pull_zones, a low-risk read that confirms the pack can reach its target. Run it on the host once the pack is installed; pack install runs it for you.

on the runner host
sudo emisar pack verify bunnycdn

Install and configure a pack walks through the whole sequence on a host.

Actions 30 total

View on GitHub
  • bunny.add_allowed_referrer script high High: can disrupt service

    Add allowed referrer

    Add a hostname to a Pull Zone's allowlist; once an allowlist is active, unmatched referrers can be denied and legitimate embeds may stop working.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.add_blocked_ip script high High: can disrupt service

    Add blocked IP address

    Block one IPv4 or IPv6 address on a Pull Zone; requests from that address begin failing immediately.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    address string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.add_blocked_referrer script high High: can disrupt service

    Add blocked referrer

    Block one referrer hostname on a Pull Zone; matching embedded requests begin failing immediately.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.add_hostname script high High: can disrupt service

    Add Pull Zone hostname

    Add a custom hostname to a Pull Zone; traffic for a correctly pointed DNS name can begin reaching this zone before TLS is forced.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.billing_usage script low Low: read-only or trivially reversible

    Get CDN billing usage

    Get a safe account charge and bandwidth projection plus current per-Pull-Zone usage, without payment-method or billing-identity fields.

    Link to this action View source on GitHub
  • bunny.create_pull_zone script high High: can disrupt service

    Create Pull Zone

    Create a billed Bunny CDN Pull Zone pointing at one HTTPS origin; traffic served through it begins consuming account bandwidth and balance.

    Arguments
    Name Type Required
    name string Yes
    origin_url string Yes
    tier string No
    enable_logging boolean No
    enable_cache_slice boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.delete_pull_zone script critical Critical: data loss or irreversible

    Delete Pull Zone

    Delete a Pull Zone permanently; every Bunny hostname and custom hostname on that zone stops serving immediately and the operation cannot be undone.

    Arguments
    Name Type Required
    pull_zone_id integer Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.get_pull_zone script low Low: read-only or trivially reversible

    Get Pull Zone

    Show one Pull Zone's configuration and current monthly usage without credential or certificate fields. Edge-rule header values and header, cookie, and query-string match values read [REDACTED].

    Arguments
    Name Type Required
    pull_zone_id integer Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.list_pull_zones script low Low: read-only or trivially reversible

    List Pull Zones

    List one bounded page of Pull Zones accessible to the account API key without credential or certificate fields. Edge-rule header values and header, cookie, and query-string match values read [REDACTED].

    Arguments
    Name Type Required
    search string No
    page integer No
    per_page integer No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.list_regions script low Low: read-only or trivially reversible

    List Bunny regions

    List bunny.net regions and codes used by Pull Zone delivery and Origin Shield settings.

    Link to this action View source on GitHub
  • bunny.log_usage_summary script low Low: read-only or trivially reversible

    Summarize CDN log usage

    Summarize one bounded Logging API v2 page by sanitized path, cache status, status code, request count, and bytes sent. No client IP, user-agent, referrer, authorization header, or URL query string is returned.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    from string No
    to string No
    status string No
    cache_status string No
    url_contains string No
    limit integer No
    offset integer No
    order string No
    include_origin_shield boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.logs script medium Medium: changes state, easily reversible

    Fetch CDN request logs

    Fetch one bounded, filterable page from CDN Logging API v2. The result can contain client IP, user-agent, and referrer metadata, so policy should limit who may retrieve it; authorization fields and URL query strings are removed.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    from string No
    to string No
    status string No
    cache_status string No
    url_contains string No
    limit integer No
    offset integer No
    order string No
    include_origin_shield boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.optimizer_statistics script low Low: read-only or trivially reversible

    Get Optimizer statistics

    Get optimized request, traffic-saved, compression, and processing-time statistics for one Pull Zone.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    date_from string No
    date_to string No
    hourly boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.origin_errors script medium Medium: changes state, easily reversible

    Get origin error logs

    Get one day's failed-origin records for a Pull Zone. The result can contain origin request paths and failure detail, so policy should limit who may retrieve it; query strings and arbitrary embedded log fields are removed.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    date string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.origin_shield_statistics script low Low: read-only or trivially reversible

    Get Origin Shield queue statistics

    Get concurrent and queued Origin Shield request charts for one Pull Zone.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    date_from string No
    date_to string No
    hourly boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.purge_all_cache script critical Critical: data loss or irreversible

    Purge entire Pull Zone cache

    Purge the entire Pull Zone cache; every object becomes cold at once and a busy zone can overwhelm or sharply increase traffic to its origin.

    Arguments
    Name Type Required
    pull_zone_id integer Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.purge_tag script high High: can disrupt service

    Purge cache tag

    Purge every cached object carrying one tag in a Pull Zone; all matched objects become misses and can create a concentrated origin-load spike.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    cache_tag string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.purge_url script high High: can disrupt service

    Purge cached URL

    Purge one URL from Bunny's edge cache; the next request for each removed variant reaches the origin and can increase origin load.

    Arguments
    Name Type Required
    url string Yes
    async boolean No
    exact_path boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.remove_allowed_referrer script high High: can disrupt service

    Remove allowed referrer

    Remove a hostname from a Pull Zone's allowlist; clients referred by it can be denied immediately.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.remove_blocked_ip script high High: can disrupt service

    Remove blocked IP address

    Remove one IPv4 or IPv6 address from a Pull Zone blocklist; requests from that address can resume consuming CDN bandwidth.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    address string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.remove_blocked_referrer script high High: can disrupt service

    Remove blocked referrer

    Remove one referrer hostname from a Pull Zone blocklist; matching external embeds can resume consuming CDN bandwidth.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.remove_hostname script high High: can disrupt service

    Remove Pull Zone hostname

    Remove a custom hostname from a Pull Zone; requests to that hostname stop being served by the zone immediately.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.safehop_statistics script low Low: read-only or trivially reversible

    Get SafeHop statistics

    Get retried and saved request statistics for Bunny SafeHop on one Pull Zone.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    date_from string No
    date_to string No
    hourly boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.set_cache_behavior script high High: can disrupt service

    Change one Pull Zone cache behavior

    Enable or disable one declared cache behavior; the choice can change cache keys, freshness, origin load, or the traffic served while an origin is unhealthy.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    setting string Yes
    enabled boolean Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.set_cache_ttl script high High: can disrupt service

    Change Pull Zone cache TTLs

    Change edge or browser cache TTL overrides; shorter values increase origin traffic while longer values can keep stale content in circulation.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    edge_seconds string No
    browser_seconds string No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.set_force_ssl script high High: can disrupt service

    Change hostname Force SSL

    Enable or disable HTTP-to-HTTPS enforcement for one Pull Zone hostname; disabling permits unencrypted client requests where Bunny accepts them.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    hostname string Yes
    enabled boolean Yes

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.set_logging script medium Medium: changes state, easily reversible

    Change Pull Zone logging

    Enable or disable request logging with enforced IP anonymization; enabling stores request metadata for Bunny's retention window and disabling removes incident visibility.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    enabled boolean Yes
    anonymization string No
    format string No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.set_origin script high High: can disrupt service

    Change Pull Zone origin

    Change where a Pull Zone fetches content; a wrong URL, host header, or TLS choice can redirect traffic, expose requests, or take the zone offline.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    origin_url string Yes
    origin_host_header string No
    verify_origin_ssl boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.set_origin_shield script high High: can disrupt service

    Change Pull Zone Origin Shield

    Enable, disable, or relocate Origin Shield; this changes the origin request path, latency, and billable shield traffic for the Pull Zone.

    Arguments
    Name Type Required
    pull_zone_id integer Yes
    enabled boolean Yes
    zone_code string No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub
  • bunny.statistics script low Low: read-only or trivially reversible

    Get CDN statistics

    Get bandwidth, requests, cache hit rate, origin traffic, response-time, error, and geographic statistics for the account or one Pull Zone.

    Arguments
    Name Type Required
    date_from string No
    date_to string No
    pull_zone_id integer No
    hourly boolean No

    See the action source for defaults, validation, and limits.

    Link to this action View source on GitHub