Purge an object cache

Remove objects from the cache, for all buckets, one bucket or a key prefix in it. We remove them in the background. The object cache must be running or degraded.

POST https://{availability_zone}.betterstackcloud.com/v1/object-proxies/{id}/purge
id string required

The ID of the object cache to purge.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

bucket string

The name of the bucket to purge. Leave it out to purge every bucket.

prefix string

Purge the keys that start with this prefix. Leave it out to purge every key.

202 Accepted
{
  "id": "example",
  "name": "Example object cache",
  "type": "OP100",
  "usable_cache_gb": 1,
  "status": "provisioning",
  "status_message": "example",
  "eviction_policy": "least_frequently_used",
  "max_capacity_gb": 1,
  "cache_ttl_seconds": 86400,
  "listing_cache_ttl_seconds": 0,
  "fsync": true,
  "public_access": false,
  "public_ipv4": false,
  "placement_group_id": "123456789",
  "cache_used_gb": 1.5,
  "config_applied_at": "2026-07-01T12:00:00.000Z",
  "endpoints": {
    "private": [
      {
        "network_id": "123456789",
        "ip_address": "example",
        "url": "https://example.com"
      }
    ],
    "public": {
      "hostname": "proxy.example.com",
      "url": "https://example.com",
      "records": [
        "example"
      ]
    }
  },
  "buckets": [
    {
      "id": "example",
      "name": "Example",
      "origin_endpoint": "example",
      "origin_bucket": "example",
      "origin_prefix": "example",
      "origin_region": "us",
      "origin_force_path_style": false,
      "origin_creation_date": "2026-07-01T12:00:00.000Z",
      "scoped_credentials": false,
      "created_at": "2026-07-01T12:00:00.000Z"
    }
  ],
  "network_ids": [
    "123456789"
  ],
  "term": "monthly",
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z",
  "team_id": "t123",
  "metadata": {
    "example": "value"
  }
}

Returns the object cache.

id string

The object cache's ID, a UUID.

name string

The object cache's name, at most 255 characters.

type string

The object cache's type, such as OP100.

usable_cache_gb integer

The cache space of the object cache's type, in GB.

status string

The object cache's state.
Valid values:
provisioning: We're starting the object cache.
running: The object cache is ready.
degraded: Part of the object cache isn't working. status_message says why. An original bucket that is down leaves the object cache running.
rescaling: We're changing the object cache's type.
failed: We couldn't create the object cache. status_message says why. Create a new one instead.
destroyed: The object cache is destroyed.

status_message string or null

Why the object cache failed or is degraded, or null when there's nothing to report.

eviction_policy string

Which cached objects we remove first when the cache is full.
Valid values:
least_frequently_used: Removes the objects read least often, so a frequently read object survives a flood of one-off reads.
least_recently_used: Removes the objects read longest ago, which suits workloads that scan through data.

max_capacity_gb integer

The cache space to use, in GB, from 10 to usable_cache_gb.

cache_ttl_seconds integer

How long we keep an object in the cache, in seconds, from 60 to 2592000.

listing_cache_ttl_seconds integer

How long we keep a bucket listing in the cache, in seconds, from 0 to 86400. 0 turns listing caching off.

fsync boolean

Whether a write waits for the origin. With true, we confirm a write once the origin stored it. With false, we confirm it once it's in the object cache's journal and upload it to the origin later.

public_access boolean

Whether the object cache also has a public HTTPS endpoint.

public_ipv4 boolean

Whether the object cache has a public IPv4 address.

placement_group_id string or null

The ID of your placement group the object cache was created in, or null when the object cache is in none.

cache_used_gb number

The cache space in use, in GB.

config_applied_at datetime or null

When we last applied the configuration to the object cache. Once config_applied_at is later than your update, the update is in effect. Stays null until we first apply the configuration. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

endpoints object

Where S3 clients connect, an HTTP endpoint in each attached network and the public HTTPS endpoint when public_access is on. Clients must use path-style addressing and sign requests with SigV4.

endpoints.private array of objects

The private.

endpoints.private[].network_id string

The network id.

endpoints.private[].ip_address string

The ip address.

endpoints.private[].url string

The url.

endpoints.public object or null

The public.

endpoints.public.hostname string

The hostname.

endpoints.public.url string

The url.

endpoints.public.records array of strings

The records.

buckets array of objects

The buckets the object cache serves, each mapped to a bucket at your storage provider. We never return the provider's keys.

buckets[].id string

The id.

buckets[].name string

The name.

buckets[].origin_endpoint string

The origin endpoint.

buckets[].origin_bucket string

The origin bucket.

buckets[].origin_prefix string

The origin prefix.

buckets[].origin_region string

The origin region.

buckets[].origin_force_path_style boolean

The origin force path style.

buckets[].origin_creation_date datetime or null

In ISO 8601 format, such as 2026-07-01T12:00:00Z.

buckets[].scoped_credentials boolean

The scoped credentials.

buckets[].created_at datetime

In ISO 8601 format, such as 2026-07-01T12:00:00Z.

network_ids array of strings

The IDs of the networks attached to the object cache. Order doesn't matter.

term string

The billing term. Defaults to monthly.
Valid values:
monthly: Billed every month.
annual: Paid for a year.

created_at datetime

When the object cache was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the object cache was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

team_id string

The ID of the team that owns the object cache.

metadata object

Your tags, as an object of string keys and values.