Skip to content

Sites

If you omit the account ID header in this api call, it will return all sites available to your user. If you include the account ID header, it will only returns sites for this account.

GET /api/sites

Returned Params
  • sites: Array
    • id: string
    • name: string
    • primary_domain: string
    • location: string (Geographic Region)
    • region: string (Availability Zone)
    • account: Object
      • id: String
      • name: String
    • package: String
    • created_at
    • updated_at

All calls below require an Account Scope, Please include X-Auth-Account header with your Account ID.

View Site

GET /api/sites/:id/restart

Returned Params
  • site: Object
    • id: string
    • name: string
    • primary_domain: string
    • location: string (Geographic Region)
    • region: string (Availability Zone)
    • package: String
    • php_version: String
    • domain_cname: String
    • ssh: Object
      • ipaddr: String
      • username: String
      • password: String
      • port: Integer
    • domains: Array
      • See domains api endpoint
    • subscription: Object
    • id: String
    • status: String
    • created_at: DateTime
    • updated_at: DateTime
    • price: Object
      • amount_cents: Integer
      • term: String
    • product: Object
      • id: String
      • name: String
    • account: Object
      • id: String
      • name: String
    • created_at
    • updated_at

Update Site / Resize

PATCH /api/sites/:id

Params
  • site: Object
    • name: String
    • plan: String

Restart a Site

Restart the WordPress container for a site. Does not affect other containers such as the database or redis.

POST /api/sites/:id


Delete a Site

DELETE /api/sites/:id

Removing a site may affect volume discounts on existing sites.


WordPress SSO wp-admin

List All WP Users

This returns raw user details from the WordPress site. The associated ID is WordPress' internal ID, not a CloudPress user.

GET /api/sites/:id/sso

Returned Params
  • users: Array
    • ID: Integer
    • user_login: String
    • display_name: String
    • user_email: String
    • user_registered: DateTime
    • roles: String
    • url: String

Login as User

POST /api/sites/:id/sso

Params
  • username: String | The user to login as.
Returned Params
  • url: String

Tasks

List all tasks for a given site

GET /api/sites/{site-id}/tasks

GET /api/sites/{site-id}/tasks/{filter-name}/filter

Filter is optional, can be one of:

  • OK
  • PENDING
  • RUNNING
  • CANCELLED
  • PAUSED
  • FAILED
  • TODAY <-- Special filter to show all events from today.

All responses will be limited to the 100 most recent tasks.

Returned Params

Returns and array of objects:

  • id: Integer
  • name: String
  • data: String | Raw data from the event
  • labels: Object
  • status: String | OK, PENDING, RUNNING, CANCELLED, PAUSED, FAILED
  • start_on: Timestamp | When the task was started
  • end_on: Timestamp | Not consistently used, but may be when the task was completed.
  • created_at: Timestamp
  • updated_at: Timestamp
  • performed_by: Object
    • id: String | ID of the user who performed this action
    • name: String | Full name of the user
    • email: String

Metrics

Realtime Resources

This endpoint will return the realtime status for a site.

GET /api/sites/{site-id}/metrics/resources

Returned Params
  • total_storage: Decimal
  • {Image Name}: Object | i.e. "WordPress"
    • cpu: Decimal | Percentage of total plan
    • storage: Decimal | GB
    • memory: Decimal | MB

Raw Metrics

This is an advanced endpoint that shows raw container metrics for a given site. Due to the nature of the CloudPress platform, new sites may return metric data created prior to the creation of your site. This is expected behavior, as the site may already exist waiting for a customer order.

Futhermore, it may return additional containers that the customer may not directly be able to interface with. For example, 'CloudPress Lite' may not include redis, but you may still see a redis container in these results. This is also an expected behavior of our platform.

POST /api/sites/{site-id}/metrics/resources

kind can be one or more of:

  • cpu
  • cpu_throttled
  • memory
  • memory_throttled
  • storage
Params
  • kind: Array | ['storage', 'memory'] (example)
  • period_start: Integer | unix timestamp
  • period_end: Integer | unix timestamp
  • step: String | defaults to '1m'.

Period and Step parameters have no affect on storage metric. That will always return the current value.

Returned Params
  • service_name: Object
    • id: Integer
    • name: String
    • image: String
    • resources: Object | Dependent on which values selected
      • cpu: Array
      • cpu_throttled: Array
      • memory: Array
      • memory_throttled: Array
      • storage: Decimal

CDN Metrics

Retrieve RAW cdn metrics. Full description of the returned data can be found on Bunny's API Documentation Site. Note: Click the 200 under Responses to see field explanation.

Metrics are per-hour.

POST /api/sites/{site-id}/metrics/cdn

Params
  • period_start: Integer | Unix timestamp
  • step: String | hourly or monthly
Returned Params
  • TotalBandwidthUsed: Integer | For the given period
  • TotalOriginTraffic: Integer | For the given period
  • AverageOriginResponseTime: Integer | For the given period
  • TotalRequestsServed: Integer | For the given period
  • CacheHitRatio: Integer
  • OriginResponseTimeChart: Object
    • "2025-11-20T00:00:00Z": => 0 | String => Integer, where the String is a iso8601 represented timestamp.
  • BandwidthUsedChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • BandwidthCachedChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • CacheHitRateChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • RequestsServedChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • PullRequestsPulledChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • OriginShieldBandwidthUsedChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • OriginShieldInternalBandwidthUsedChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • OriginTrafficChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • GeoTrafficDistribution: Object
    • "EU: Stockholm, SE": => 0
  • Error3xxChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • Error4xxChart: Object
    • "2025-11-20T00:00:00Z": => 0
  • Error5xxChart: Object
    • "2025-11-20T00:00:00Z": => 0
Example: Show Monthly Bandwidth
curl -X POST -d {"period_start": 1760983782, "step": "monthly"}

This will return data for the past month, in daily increments, but more importantly, the TotalBandwidthUsed value will be for the entire 30 day period.


Backups

Please use the Tasks endpoint to monitor the status of these actions.


List All Backups

Return a list of backups for a given site

GET /api/sites/{site-id}/backups

Returned Params
  • {label}: Object | i.e. wordpress, or mysql
    • id: Integer | ID of the volume (required for backup operations)
    • size: Decimal | GB - total raw backup size
    • usage: Decimal | GB - compressed and deduplicated backup size (actual usage on disk)
    • archives: Array
      • id: String
      • name: String
      • created: String | in iso8601 format

Create a backup

PATCH /api/sites/{site-id}/backups/{volume-id}

Params
  • name: String | Backup Name

Delete a backup

DELETE /api/sites/{site-id}/backups/{volume-id}

Params
  • backup_id: String | Backup ID

Restore a backup

PATCH /api/sites/{site-id}/restores/{volume-id}

Params
  • backup_id: String | Backup ID

Change PHP Version

List Available

GET /api/sites/{site-id}/variants

Params
  • {kind}: Array<Object> | Currently only php is returned.
    • id: Integer | variant_id needed for changing the version
    • label: String
    • is_default: Boolean | When deploying a new site, this will be used.
    • active: Boolean | Current version the site is using

Change

When changing a site's php version, the site will be restarted with a different container image. Please allow time for the site to restart.

PATCH /api/sites/{site-id}/variants/php

Params
  • variant_id: Integer
Returned Params
  • task_id: Integer | The ID of the task so you can follow along.