API referenceSections

Probe the site and apply its profile now, checked and rolled back if the site answers differently

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}/tune/apply

Probe the site and apply its profile now, checked and rolled back if the site answers differently

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.

Responses

200 Applied

Content type: application/json

A site's automatic tuning (ADR 0116)

  • policy string required
    Allowed values: "inherit" "off"
  • plan_policy string required
    Allowed values: "auto" "suggest" "off"
  • effective string required
    Allowed values: "auto" "suggest" "off"
  • plan_warm boolean required
  • state string required

    '' (never), applied, rolled_back, failed, reverted

  • profile TuneProfile required
    • version integer required
    • stacks array<string> required
    • items array<TuneItem> required
      • id string required

        static_cache, immutable_assets, compression, no_compress_auth, kernel_cache, pool_warm, pool_suspend, pool_recycle, pool_64bit, php_opcache, php_realpath, php_fastcgi, aspnet_compilation, asp_engine, asp_session_off, core_inprocess, php_open_basedir_off (shown only: the site's or plan's choice, never switched by the tuner)

      • applied boolean required
      • reason string optional

        Why not applied: not_this_stack, needs_iis_performance, plan_not_warm, user_choice, nothing_found, overridden_by_app, session_in_use

      • detail string optional
    • hash string required
    • want object optional
  • up_to_date boolean required
  • applied_at string (date-time) | null optional
  • probed_at string (date-time) | null optional
  • last_error string optional
  • blocked_until string (date-time) | null optional
  • overridden array<string> | null optional
  • drifted array<string> | null optional
  • events array<TuneEvent> required
    • id string required
    • site_id string required
    • at string (date-time) required
    • kind string required

      applied, rolled_back, reverted, failed, drift, overridden

    • detail object required

      before_ms, after_ms, cold_ms (time to first byte), source, items, reason

Example
{
  "policy": "inherit",
  "plan_policy": "auto",
  "effective": "auto",
  "plan_warm": true,
  "state": "string",
  "profile": {
    "version": 0,
    "stacks": [
      "string"
    ],
    "items": [
      {
        "id": "string",
        "applied": true,
        "reason": "string",
        "detail": "string"
      }
    ],
    "hash": "string",
    "want": {}
  },
  "up_to_date": true,
  "applied_at": "2026-01-01T00:00:00Z",
  "probed_at": "2026-01-01T00:00:00Z",
  "last_error": "string",
  "blocked_until": "2026-01-01T00:00:00Z",
  "overridden": [
    "string"
  ],
  "drifted": [
    "string"
  ],
  "events": [
    {
      "id": "string",
      "site_id": "string",
      "at": "2026-01-01T00:00:00Z",
      "kind": "string",
      "detail": {}
    }
  ]
}

default Error

Content type: application/json

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