API referenceSections

Exactly what a preset would change now

Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication

POST /api/v1/tenants/{tid}/sites/{id}/permissions/preview

Exactly what a preset would change now

Authentication: session cookie __Host-panel_session (contract default; see Authentication).

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
idpathstringrequired
X-CSRF-Tokenheaderstringoptional

Required on unsafe requests authenticated by session cookie; API keys do not use it.

Request body

required

Content type: application/json

object
  • no other properties
  • preset string required
    Allowed values: "wordpress" "laravel" "readonly" "default"
Example
{
  "preset": "wordpress"
}

Responses

200 OK

Content type: application/json

  • preset string required
    Allowed values: "wordpress" "laravel" "readonly" "default"
  • app string required

    wordpress, laravel or empty

  • changes array<PermissionChange> required
    • path string required
    • target string required
      Allowed values: "dir" "file"
    • from string required
    • to string required
      Allowed values: "read" "write" "blocked"
    • reason string required
    • result string optional

      ok, kept, or an error code (applied records only)

    • kept boolean optional
  • harden array<string> required

    WordPress Toolkit hardening items to turn on (ADR 0082)

  • hide array<string> required

    Path segments IIS will answer 404 for

  • notes array<string> required
  • hash string required

    Send back to apply exactly this plan

Example
{
  "preset": "wordpress",
  "app": "string",
  "changes": [
    {
      "path": "string",
      "target": "dir",
      "from": "string",
      "to": "read",
      "reason": "string",
      "result": "string",
      "kept": true
    }
  ],
  "harden": [
    "string"
  ],
  "hide": [
    "string"
  ],
  "notes": [
    "string"
  ],
  "hash": "string"
}

default Error

Content type: application/json

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required