The API reference is in English.

Immutable source snapshot

PATCH /v1/config/gate

Update gate config. Permissions, parameters, responses and examples.

0.1.0 · source bccff29 · Current reference · Download OpenAPI specification

This address preserves one reviewed source snapshot. Use the current entry point for the selected documentation version.

Update gate config

Update gate config through PATCH /v1/config/gate. The parameters and declared response shapes below come from this exact source snapshot.

Source preview; no stable third-party integration promise. This page makes no request to a local installation.

Authority

Browser operator session only at the middleware boundary. Route-specific ownership and generation checks also apply.

Browser mutations require the exact control Origin and session-bound CSRF header. IDE callers use only their admitted route scope and exact generation.

Inspect the authority source · Authentication guide

Parameters and headers

NameLocationContract
X-CSRF-Tokenheader
Conditional / optional

Required for browser mutations with the exact control Origin. Not an IDE capability.

Schema
{
  "type": "string"
}

Request body

JSON body · required · RuntimeGateConfigUpdate

FieldTypePresence
gate_activebooleanRequired
gate_apply_to_existingbooleanRequired
gate_block_secretsbooleanRequired
gate_max_criticalintegerRequired
gate_max_highintegerRequired
gate_presetstringRequired
Complete declared request schema
{
  "additionalProperties": false,
  "properties": {
    "gate_active": {
      "title": "Gate Active",
      "type": "boolean"
    },
    "gate_apply_to_existing": {
      "title": "Gate Apply To Existing",
      "type": "boolean"
    },
    "gate_block_secrets": {
      "title": "Gate Block Secrets",
      "type": "boolean"
    },
    "gate_max_critical": {
      "maximum": 999,
      "minimum": -1,
      "title": "Gate Max Critical",
      "type": "integer"
    },
    "gate_max_high": {
      "maximum": 999,
      "minimum": -1,
      "title": "Gate Max High",
      "type": "integer"
    },
    "gate_preset": {
      "enum": [
        "observe",
        "baseline",
        "strict",
        "custom"
      ],
      "title": "Gate Preset",
      "type": "string"
    }
  },
  "required": [
    "gate_preset",
    "gate_active",
    "gate_max_critical",
    "gate_max_high",
    "gate_block_secrets",
    "gate_apply_to_existing"
  ],
  "title": "RuntimeGateConfigUpdate",
  "type": "object"
}

Responses

StatusMeaning and declared shape
200

Successful Response

application/json · RuntimeConfigOut
{
  "properties": {
    "ai_mode": {
      "enum": [
        "auto",
        "on",
        "off"
      ],
      "title": "Ai Mode",
      "type": "string"
    },
    "allowed_roots": {
      "items": {
        "type": "string"
      },
      "title": "Allowed Roots",
      "type": "array"
    },
    "auto_triage_limit": {
      "title": "Auto Triage Limit",
      "type": "integer"
    },
    "component_apply_command": {
      "title": "Component Apply Command",
      "type": "string"
    },
    "component_db_admin_enabled": {
      "title": "Component Db Admin Enabled",
      "type": "boolean"
    },
    "component_git_proxy_enabled": {
      "title": "Component Git Proxy Enabled",
      "type": "boolean"
    },
    "component_monitoring_enabled": {
      "title": "Component Monitoring Enabled",
      "type": "boolean"
    },
    "components": {
      "items": {
        "$ref": "#/components/schemas/RuntimeComponentOut"
      },
      "title": "Components",
      "type": "array"
    },
    "gate_active": {
      "title": "Gate Active",
      "type": "boolean"
    },
    "gate_block_secrets": {
      "title": "Gate Block Secrets",
      "type": "boolean"
    },
    "gate_max_critical": {
      "title": "Gate Max Critical",
      "type": "integer"
    },
    "gate_max_high": {
      "title": "Gate Max High",
      "type": "integer"
    },
    "gate_preset": {
      "enum": [
        "observe",
        "baseline",
        "strict",
        "custom"
      ],
      "title": "Gate Preset",
      "type": "string"
    },
    "installation_id": {
      "pattern": "^[a-f0-9]{12}$",
      "title": "Installation Id",
      "type": "string"
    },
    "ollama_available": {
      "title": "Ollama Available",
      "type": "boolean"
    },
    "ollama_base_url": {
      "title": "Ollama Base Url",
      "type": "string"
    },
    "ollama_model": {
      "title": "Ollama Model",
      "type": "string"
    },
    "ollama_models": {
      "items": {
        "type": "string"
      },
      "title": "Ollama Models",
      "type": "array"
    },
    "ollama_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ollama Reason"
    },
    "ollama_thinking": {
      "title": "Ollama Thinking",
      "type": "boolean"
    },
    "scanner_url": {
      "title": "Scanner Url",
      "type": "string"
    },
    "schema_init": {
      "$ref": "#/components/schemas/SchemaInitStatusOut"
    }
  },
  "required": [
    "installation_id",
    "allowed_roots",
    "scanner_url",
    "ai_mode",
    "ollama_base_url",
    "ollama_available",
    "ollama_model",
    "ollama_thinking",
    "ollama_models",
    "ollama_reason",
    "auto_triage_limit",
    "component_monitoring_enabled",
    "component_git_proxy_enabled",
    "component_db_admin_enabled",
    "gate_preset",
    "gate_active",
    "gate_max_critical",
    "gate_max_high",
    "gate_block_secrets",
    "component_apply_command",
    "components",
    "schema_init"
  ],
  "title": "RuntimeConfigOut",
  "type": "object"
}
400

Exact host, malformed request or URL credential refusal

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
401

Missing or invalid membership

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
403

Exact origin, CSRF or route authority refusal

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
422

Validation Error

application/json · HTTPValidationError
{
  "properties": {
    "detail": {
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "title": "Detail",
      "type": "array"
    }
  },
  "title": "HTTPValidationError",
  "type": "object"
}
429

Authentication rate or connection limit

application/json · object
{
  "properties": {
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "detail"
  ],
  "type": "object"
}
503

Check readiness and the recorded job state. A healthy control plane does not prove scanner readiness. See source-linked error catalog.

An empty or broad schema preserves the source contract. It is not a promise of an empty response.

Source-linked errors

Literal HTTP errors in this handler and same-file helper call graph, plus control middleware. Dynamic and cross-module failures may add other errors; source links are authoritative.

2 source error observations
StatusSource detailRecovery
503 ↗Dynamic detail; inspect sourceCheck readiness and the recorded job state. A healthy control plane does not prove scanner readiness.
503 ↗Dynamic detail; inspect sourceCheck readiness and the recorded job state. A healthy control plane does not prove scanner readiness.

Read the recovery guide

Synthetic examples

These examples validate declared JSON shapes and formats. They contain no real installation data and do not prove runtime admission, cross-field validation, authority or successful work.

Request JSON
{
  "gate_active": false,
  "gate_apply_to_existing": false,
  "gate_block_secrets": false,
  "gate_max_critical": 1,
  "gate_max_high": 1,
  "gate_preset": "observe"
}
Response 200 JSON
{
  "ai_mode": "auto",
  "allowed_roots": [],
  "auto_triage_limit": 1,
  "component_apply_command": "synthetic",
  "component_db_admin_enabled": false,
  "component_git_proxy_enabled": false,
  "component_monitoring_enabled": false,
  "components": [],
  "gate_active": false,
  "gate_block_secrets": false,
  "gate_max_critical": 1,
  "gate_max_high": 1,
  "gate_preset": "observe",
  "installation_id": "aaaaaaaaaaaa",
  "ollama_available": false,
  "ollama_base_url": "synthetic",
  "ollama_model": "synthetic",
  "ollama_models": [],
  "ollama_reason": "synthetic",
  "ollama_thinking": false,
  "scanner_url": "synthetic",
  "schema_init": {
    "evidence": "schema-identity-and-api-startup-verification",
    "id": "schema-init",
    "initialized_at": "2026-01-01T00:00:00Z",
    "lifecycle": "one-shot",
    "message": "synthetic",
    "startable": false,
    "state": "completed"
  }
}
Download this service's complete OpenAPI

All referenced models remain in its components section. Browse control model definitions.