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: Integername: Stringdata: String | Raw data from the eventlabels: Objectstatus: String | OK, PENDING, RUNNING, CANCELLED, PAUSED, FAILEDstart_on: Timestamp | When the task was startedend_on: Timestamp | Not consistently used, but may be when the task was completed.created_at: Timestampupdated_at: Timestampperformed_by: Objectid: String | ID of the user who performed this actionname: String | Full name of the useremail: 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 planstorage: Decimal | GBmemory: 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 timestampperiod_end: Integer | unix timestampstep: 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: Objectid: Integername: Stringimage: Stringresources: Object | Dependent on which values selectedcpu: Arraycpu_throttled: Arraymemory: Arraymemory_throttled: Arraystorage: 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 timestampstep: String | hourly or monthly
Returned Params
TotalBandwidthUsed: Integer | For the given periodTotalOriginTraffic: Integer | For the given periodAverageOriginResponseTime: Integer | For the given periodTotalRequestsServed: Integer | For the given periodCacheHitRatio: IntegerOriginResponseTimeChart: 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 mysqlid: Integer | ID of the volume (required for backup operations)size: Decimal | GB - total raw backup sizeusage: Decimal | GB - compressed and deduplicated backup size (actual usage on disk)archives: Arrayid: Stringname: Stringcreated: 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 onlyphpis returned.id: Integer |variant_idneeded for changing the versionlabel: Stringis_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.