hosting
PUT /v1/sites/{siteId}/performance
Update a site's caching and acceleration settings.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền hosting.performance.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/performance \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
Merge semantics: every field is optional and only the fields present are applied, so toggling one setting never resets the others. Selecting the `premium` AccelerateWP tier starts the trial and requires a payment method on file, returning `PAYMENT_METHOD_REQUIRED` otherwise. Returns the complete updated resource. Requires `hosting.performance.manage`, and additionally `billing.payment.manage` when changing the AccelerateWP tier.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
siteId (path) | Uuid | Có | Site ID (UUIDv7). |
Idempotency-Key (header) | string | Không | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Nội dung yêu cầu
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
lscache_enabled | boolean | Không | — |
object_cache_enabled | boolean | Không | — |
object_cache_max_ttl | integer | Không | — |
wp_memory_limit | string | Không | A PHP memory shorthand (`256M`, `1G`) or blank to clear the override. Anything PHP cannot parse is rejected with `INVALID_MEMORY_LIMIT` rather than normalised — PHP treats an un… |
accelerate_wp_tier | AccelerateWpTier | Không | The AccelerateWP tier. `free` is the absence of the upsell, not a tier of it — the free cache layers are separate booleans on `SitePerformance`. |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
site_id | Uuid | Có | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
stack_supported | boolean | Có | Whether **we** configure this site's web stack, so the controls below can take effect at all. Every control on this resource is applied over our **own** CloudLinux + LiteSpeed f… |
lscache_enabled | boolean | Có | LiteSpeed LSCache full-page cache. Free, native to the fleet. |
object_cache_enabled | boolean | Có | Redis per-site object cache. Free. |
object_cache_max_ttl | integer | Có | How long an object-cache entry may live, in seconds. `0` uses the plugin's own default. |
wp_memory_limit | string | Có | `WP_MEMORY_LIMIT` for this site, e.g. `256M`; blank leaves WordPress's default. This is the per-site memory control: Redis has no per-user memory quota, so a shared instance can… |
stack | SiteStackState | Có | What the site's SERVER actually has, read back from it — never what was requested. The fields above this one are desired state: both cache flags default to true, so a surface th… |
accelerate_wp | AccelerateWp | Có | — |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 422 · 429