hosting

POST /v1/sites/{siteId}/protection/file-permissions

Apply the vendor's recommended permissions on a site.

Tất cả các điểm cuối hosting

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 sites.view; 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 POST https://api.zinndigital.com/v1/sites/{siteId}/protection/file-permissions \
  -H "Authorization: Bearer zdk_live_…"

Đã đă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

Changes file modes on the customer's **live** files to the vendor's own recommendation. ⛔ **It takes no body, and that is the security property.** The check is re-run inside the same vendor conversation and the recommendation is applied against the handle that conversation just produced, so a stale `check_id` from a client cannot be replayed against files that have changed since. The only defensible input to an operation that alters file modes is the number the platform running it published moments ago. A report with nothing to fix is a `422` refusal rather than a silent success: *"we changed nothing"* and *"there was nothing to change"* are different sentences, and only one of them is reassuring. Files the vendor named without naming a mode are skipped, never sent with a guess. `404` for a site with no vendor hosting package. Requires `sites.view` and `sites.panel_access`.

Tham số

TênLoạiBắt buộcNội dung này là gì
siteId (path)UuidSite ID (UUIDv7).

Phản hồi

TênLoạiBắt buộcNội dung này là gì
check_idintegerThe vendor's handle for this check. **Null** when the vendor gave us none, in which case there is nothing to apply and `actionable` is false. ⛔ A client never sends it back: `fi…
public_html_wrongbooleanWhether the document root's own mode is wrong.
root_wrongbooleanWhether the package root's own mode is wrong.
failuresSitePermissionFailure[]The individual files the check flagged.
actionablebooleanWhether *Fix these* can do anything: a live check handle **and** something to fix. Its own field so the button is not offered against a report that can only be refused.

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 409 · 422 · 429 · 503