{
  "components": {
    "schemas": {
      "AccessEdge": {
        "properties": {
          "confidence": {
            "type": "string"
          },
          "first_seen": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_seen": {
            "format": "date-time",
            "type": "string"
          },
          "mode": {
            "enum": [
              "read",
              "readwrite"
            ],
            "type": "string"
          },
          "observed": {
            "type": "boolean"
          },
          "occurrence_count": {
            "format": "int64",
            "type": "integer"
          },
          "origin_id": {
            "format": "uuid",
            "type": "string"
          },
          "origin_kind": {
            "type": "string"
          },
          "permitted": {
            "type": "boolean"
          },
          "resource_id": {
            "format": "uuid",
            "type": "string"
          },
          "signal_source": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Agent": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "identity_id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "labels": {
            "additionalProperties": true,
            "type": "object"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive",
              "archived"
            ],
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          },
          "workspace_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "name",
          "kind",
          "status",
          "created_at",
          "updated_at",
          "version"
        ],
        "type": "object"
      },
      "AgentInput": {
        "properties": {
          "external_id": {
            "type": "string"
          },
          "identity_id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "labels": {
            "additionalProperties": true,
            "type": "object"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive",
              "archived"
            ],
            "type": "string"
          },
          "workspace_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "type": "object"
      },
      "AuditEvent": {
        "properties": {
          "action": {
            "type": "string"
          },
          "actor": {
            "type": "string"
          },
          "actor_kind": {
            "type": "string"
          },
          "hash": {
            "description": "Hex-encoded SHA-256 of this event",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "occurred_at": {
            "format": "date-time",
            "type": "string"
          },
          "prev_hash": {
            "description": "Hex-encoded SHA-256 of the previous event",
            "type": "string"
          },
          "seq": {
            "format": "int64",
            "type": "integer"
          },
          "sig": {
            "description": "Base64-encoded Ed25519 signature",
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "target_kind": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "seq",
          "occurred_at",
          "actor",
          "actor_kind",
          "action",
          "prev_hash",
          "hash"
        ],
        "type": "object"
      },
      "ConnectorApplyResult": {
        "properties": {
          "action": {
            "enum": [
              "added",
              "rotated",
              "removed",
              "disabled",
              "unchanged"
            ],
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "persisted": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ConnectorHealth": {
        "properties": {
          "avg_latency_ms": {
            "format": "int64",
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "error_count_24h": {
            "type": "integer"
          },
          "health_state": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "last_polled_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "poll_seconds": {
            "type": "integer"
          },
          "source_mode": {
            "enum": [
              "export",
              "live"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "running",
              "failed",
              "stopped",
              "disabled"
            ],
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "trend": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "status",
          "enabled"
        ],
        "type": "object"
      },
      "ConnectorHealthResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectorHealth"
            },
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/ConnectorSummary"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "items",
          "summary",
          "timestamp"
        ],
        "type": "object"
      },
      "ConnectorInfo": {
        "properties": {
          "description": {
            "type": "string"
          },
          "fields": {
            "items": {
              "properties": {
                "default": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                },
                "secret": {
                  "type": "boolean"
                },
                "type": {
                  "enum": [
                    "string",
                    "int",
                    "bool",
                    "duration"
                  ],
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "fields_known": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "transport": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConnectorOnboardInput": {
        "properties": {
          "config": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "enabled": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "poll_seconds": {
            "type": "integer"
          },
          "secrets": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind",
          "tenant"
        ],
        "type": "object"
      },
      "ConnectorSummary": {
        "properties": {
          "disabled": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "running": {
            "type": "integer"
          },
          "stopped": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CreateOrgInput": {
        "properties": {
          "data_region": {
            "description": "Optional residency region pin",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug"
        ],
        "type": "object"
      },
      "CreateUserInput": {
        "properties": {
          "display_name": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "password": {
            "format": "password",
            "minLength": 12,
            "type": "string"
          },
          "superadmin": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "CreateWorkspaceInput": {
        "properties": {
          "name": {
            "type": "string"
          },
          "settings": {
            "additionalProperties": true,
            "type": "object"
          },
          "slug": {
            "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "GrantMembershipInput": {
        "properties": {
          "role": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "tenant",
          "role"
        ],
        "type": "object"
      },
      "HealthSummary": {
        "properties": {
          "connectors": {
            "type": "integer"
          },
          "connectors_error": {
            "type": "integer"
          },
          "embedder_kind": {
            "enum": [
              "semantic",
              "local-hash"
            ],
            "type": "string"
          },
          "guard_downgrade_count": {
            "type": "integer"
          },
          "guard_profile": {
            "enum": [
              "acl_aware",
              "public_only"
            ],
            "type": "string"
          },
          "guard_public_only_kbs": {
            "items": {
              "properties": {
                "kb_name": {
                  "type": "string"
                },
                "profile": {
                  "enum": [
                    "public_only"
                  ],
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "tenant_id": {
                  "type": "string"
                },
                "tenant_slug": {
                  "type": "string"
                },
                "updated_by": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "guard_warning": {
            "type": "string"
          },
          "healthy": {
            "type": "boolean"
          },
          "knowledge_status_reason": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          },
          "retrieval_semantic": {
            "type": "boolean"
          },
          "sso_configured": {
            "type": "boolean"
          },
          "store_engine": {
            "type": "string"
          },
          "users": {
            "type": "integer"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "healthy",
          "ready",
          "store_engine",
          "version"
        ],
        "type": "object"
      },
      "IssueTokenInput": {
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "superadmin": {
            "default": false,
            "type": "boolean"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "LicenseStatus": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "holder": {
            "type": "string"
          },
          "licensee": {
            "type": "string"
          },
          "max_users": {
            "type": "integer"
          },
          "plan": {
            "type": "string"
          },
          "support_tier": {
            "type": "string"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "LoginInput": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "password": {
            "format": "password",
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "LoginResponse": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "type": "string"
          },
          "token": {
            "description": "Opaque session token (olvs_…)",
            "type": "string"
          }
        },
        "required": [
          "token",
          "session_id",
          "expires_at"
        ],
        "type": "object"
      },
      "Org": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data_region": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "name",
          "slug",
          "status",
          "created_at"
        ],
        "type": "object"
      },
      "PublicStatus": {
        "properties": {
          "components": {
            "items": {
              "properties": {
                "embedder_kind": {
                  "enum": [
                    "semantic",
                    "local-hash"
                  ],
                  "type": "string"
                },
                "guard_downgrade_count": {
                  "type": "integer"
                },
                "guard_profile": {
                  "enum": [
                    "acl_aware",
                    "public_only"
                  ],
                  "type": "string"
                },
                "guard_warning": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "retrieval_semantic": {
                  "type": "boolean"
                },
                "status": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "embedder_kind": {
            "enum": [
              "semantic",
              "local-hash"
            ],
            "type": "string"
          },
          "guard_downgrade_count": {
            "type": "integer"
          },
          "guard_profile": {
            "enum": [
              "acl_aware",
              "public_only"
            ],
            "type": "string"
          },
          "guard_warning": {
            "type": "string"
          },
          "knowledge_status_reason": {
            "type": "string"
          },
          "retrieval_semantic": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "operational",
              "degraded",
              "outage"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RosterMember": {
        "properties": {
          "display_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "role": {
            "enum": [
              "viewer",
              "editor",
              "admin",
              "owner"
            ],
            "type": "string"
          },
          "sso_only": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "active",
              "inactive",
              "error"
            ],
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          },
          "workspace_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "user_id",
          "email",
          "status",
          "sso_only",
          "role"
        ],
        "type": "object"
      },
      "SSOConfig": {
        "properties": {
          "auto_provision": {
            "type": "boolean"
          },
          "client_id": {
            "type": "string"
          },
          "default_role": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "enforce": {
            "type": "boolean"
          },
          "enforce_mfa": {
            "type": "boolean"
          },
          "issuer": {
            "format": "uri",
            "type": "string"
          },
          "protocol": {
            "enum": [
              "oidc",
              "saml"
            ],
            "type": "string"
          },
          "tenant": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SSOConfigInput": {
        "properties": {
          "auto_provision": {
            "type": "boolean"
          },
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "format": "password",
            "type": "string"
          },
          "default_role": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "enforce": {
            "type": "boolean"
          },
          "enforce_mfa": {
            "type": "boolean"
          },
          "issuer": {
            "format": "uri",
            "type": "string"
          },
          "protocol": {
            "enum": [
              "oidc",
              "saml"
            ],
            "type": "string"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "protocol",
          "issuer",
          "client_id",
          "tenant"
        ],
        "type": "object"
      },
      "SecretInput": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "format": "password",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "SecretsList": {
        "properties": {
          "sealer_available": {
            "type": "boolean"
          },
          "secrets": {
            "items": {
              "properties": {
                "created_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "hint": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "updated_at": {
                  "format": "date-time",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ServerInfo": {
        "properties": {
          "engine": {
            "type": "string"
          },
          "license": {
            "properties": {
              "licensee": {
                "type": "string"
              },
              "plan": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "support_tier": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "protocol_currency": {
            "properties": {
              "a2a_security_scheme_enforced": {
                "type": "boolean"
              },
              "a2a_version": {
                "type": "string"
              },
              "aaif_standards": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "agents_md_enforce_available": {
                "type": "boolean"
              },
              "mcp_revision": {
                "type": "string"
              },
              "mcp_revision_status": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "setup_required": {
            "type": "boolean"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "engine",
          "setup_required"
        ],
        "type": "object"
      },
      "SetupInput": {
        "properties": {
          "email": {
            "format": "email",
            "type": "string"
          },
          "password": {
            "format": "password",
            "minLength": 12,
            "type": "string"
          },
          "token": {
            "description": "One-time setup token from server startup",
            "type": "string"
          }
        },
        "required": [
          "token",
          "email",
          "password"
        ],
        "type": "object"
      },
      "SetupStatus": {
        "properties": {
          "completed": {
            "type": "boolean"
          },
          "steps": {
            "items": {
              "properties": {
                "completed": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "completed",
          "steps"
        ],
        "type": "object"
      },
      "SourceApplyResult": {
        "properties": {
          "action": {
            "enum": [
              "added",
              "rotated",
              "removed",
              "disabled",
              "unchanged"
            ],
            "type": "string"
          },
          "applied": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "persisted": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SourceRosterEntry": {
        "properties": {
          "config": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "enabled": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "poll_seconds": {
            "type": "integer"
          },
          "source_mode": {
            "enum": [
              "export",
              "live"
            ],
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SourceRosterInput": {
        "properties": {
          "config": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "enabled": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "poll_seconds": {
            "type": "integer"
          },
          "tenant": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "tenant"
        ],
        "type": "object"
      },
      "Token": {
        "properties": {
          "bound_tenant_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_superadmin": {
            "type": "boolean"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "role": {
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "revoked",
          "created_at"
        ],
        "type": "object"
      },
      "UpdateWorkspaceInput": {
        "properties": {
          "name": {
            "type": "string"
          },
          "settings": {
            "additionalProperties": true,
            "type": "object"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_superadmin": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "status",
          "is_superadmin",
          "created_at"
        ],
        "type": "object"
      },
      "WhoamiResponse": {
        "properties": {
          "aal": {
            "description": "Authentication assurance level (sessions only)",
            "type": "integer"
          },
          "actor": {
            "type": "string"
          },
          "amr": {
            "description": "Authentication method references (sessions only)",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "display_name": {
            "type": "string"
          },
          "grants": {
            "items": {
              "properties": {
                "role": {
                  "type": "string"
                },
                "tenant": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "kind": {
            "enum": [
              "user",
              "token"
            ],
            "type": "string"
          },
          "superadmin": {
            "type": "boolean"
          },
          "user_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "user_id",
          "actor",
          "superadmin"
        ],
        "type": "object"
      },
      "Workspace": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "settings": {
            "additionalProperties": true,
            "type": "object"
          },
          "slug": {
            "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "name",
          "slug",
          "status",
          "is_default",
          "created_at",
          "updated_at",
          "version"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "Opaque session (olvs_) or API (olvk_) token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "REST contract for the Olivares AI control plane. Authentication is an opaque bearer token (session olvs_… or API key olvk_…). Tenant is resolved from a bound token or the X-Olivares-Tenant header.",
    "license": {
      "name": "AGPL-3.0-only"
    },
    "title": "Olivares AI control plane API",
    "version": "v1",
    "x-stability-policy": "https://docs.olivares.ai/reference/api-stability/"
  },
  "openapi": "3.1.0",
  "paths": {
    "/healthz": {
      "get": {
        "operationId": "healthz",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Liveness probe",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/livez": {
      "get": {
        "operationId": "livez",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Liveness probe (process is up)",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/metrics": {
      "get": {
        "operationId": "getMetrics",
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Prometheus text exposition"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Prometheus exposition (text format 0.0.4) of engine metrics",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenAPI",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "This OpenAPI document",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/readyz": {
      "get": {
        "operationId": "readyz",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Readiness probe (store reachable); 503 when not ready",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/status": {
      "get": {
        "operationId": "getPublicStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicStatus"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Public status page summary (unauthenticated)",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/access-edges": {
      "get": {
        "operationId": "listAccessEdges",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Maximum number of items to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Pagination cursor from a previous response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/AccessEdge"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List access edges (R/RW map); self-audited",
        "tags": [
          "agents"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/agents": {
      "get": {
        "operationId": "listAgents",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Maximum number of items to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Pagination cursor from a previous response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/Agent"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List agents in the resolved tenant",
        "tags": [
          "agents"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "createAgent",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create an agent",
        "tags": [
          "agents"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/agents/{id}": {
      "delete": {
        "operationId": "deleteAgent",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Delete an agent",
        "tags": [
          "agents"
        ],
        "x-stability": "stable"
      },
      "get": {
        "operationId": "getAgent",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get an agent by ID",
        "tags": [
          "agents"
        ],
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "updateAgent",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update an agent",
        "tags": [
          "agents"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/audit": {
      "get": {
        "operationId": "listAuditEvents",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Start from this sequence number.",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer"
            }
          },
          {
            "description": "Maximum number of items to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/AuditEvent"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read the tenant evidence ledger",
        "tags": [
          "audit"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/audit/export": {
      "get": {
        "operationId": "exportAuditLedger",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Export format.",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "cef",
              "enum": [
                "cef",
                "leef",
                "syslog",
                "otlp",
                "ocsf"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Exported ledger stream (format-dependent text or NDJSON)"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Export the ledger (cef|leef|syslog|otlp|ocsf)",
        "tags": [
          "audit"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/audit/pubkey": {
      "get": {
        "operationId": "getAuditPubkey",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "algorithm": {
                      "type": "string"
                    },
                    "public_key": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "The Ed25519 checkpoint verification key (PEM)",
        "tags": [
          "audit"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/audit/system": {
      "get": {
        "operationId": "listSystemAuditEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/AuditEvent"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read the system-tenant evidence ledger (cross-tenant ops; superadmin only)",
        "tags": [
          "audit"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/audit/verify": {
      "get": {
        "operationId": "verifyAuditChain",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "checkpoints_checked": {
                      "type": "integer"
                    },
                    "events_checked": {
                      "type": "integer"
                    },
                    "first_seq": {
                      "type": "integer"
                    },
                    "last_seq": {
                      "type": "integer"
                    },
                    "valid": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Verify the chain and its signed checkpoints",
        "tags": [
          "audit"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/auth/login": {
      "post": {
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Exchange email/password for a session token",
        "tags": [
          "auth"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/auth/logout": {
      "post": {
        "operationId": "logout",
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Revoke the calling session",
        "tags": [
          "auth"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/auth/refresh": {
      "post": {
        "operationId": "refreshToken",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Renew the calling session token (rotates the credential, extends expiry)",
        "tags": [
          "auth"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/auth/whoami": {
      "get": {
        "operationId": "whoami",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhoamiResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "The calling principal and its tenant grants",
        "tags": [
          "auth"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/connectors/health": {
      "get": {
        "operationId": "getConnectorHealth",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorHealthResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Per-connector health metrics and fleet summary",
        "tags": [
          "connectors"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/connectors": {
      "delete": {
        "operationId": "deleteConnector",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorOnboardInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorApplyResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Remove a connector instance",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "get": {
        "operationId": "listConnectorCatalog",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectors": {
                      "items": {
                        "$ref": "#/components/schemas/ConnectorInfo"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List available connector types with their configuration fields",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "testConnector",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorOnboardInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Test connectivity for a connector configuration",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "put": {
        "operationId": "putConnector",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorOnboardInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorApplyResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Onboard or update a connector instance",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/health-summary": {
      "get": {
        "operationId": "getHealthSummary",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthSummary"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Operational health summary for the console dashboard",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/license": {
      "delete": {
        "operationId": "uninstallLicense",
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Remove the installed license (revert to community)",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "get": {
        "operationId": "getLicenseStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseStatus"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Current license status and entitlements",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "installLicense",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "acknowledge": {
                    "type": "boolean"
                  },
                  "license": {
                    "description": "Base64-encoded license blob",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseStatus"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Install a commercial license",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/secrets": {
      "delete": {
        "operationId": "deleteSecret",
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Delete a sealed secret",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "get": {
        "operationId": "listSecrets",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretsList"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List sealed secrets (names and hints, never values)",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "put": {
        "operationId": "putSecret",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "action": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create or update a sealed secret",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/setup-status": {
      "get": {
        "operationId": "getSetupStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupStatus"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "First-run setup wizard progress",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/sources": {
      "delete": {
        "operationId": "deleteSource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceRosterInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceApplyResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Remove a source connector",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "get": {
        "operationId": "listSources",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "sources": {
                      "items": {
                        "$ref": "#/components/schemas/SourceRosterEntry"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List configured source connectors and their status",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "put": {
        "operationId": "putSource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceRosterInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceApplyResult"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create or update a source connector",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/console/sso": {
      "delete": {
        "operationId": "deleteSSOConfig",
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Remove SSO/IdP configuration",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "get": {
        "operationId": "getSSOConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfig"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Current SSO/IdP configuration",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "testSSOConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOConfigInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Test SSO/IdP connectivity",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      },
      "put": {
        "operationId": "putSSOConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOConfigInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOConfig"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create or update SSO/IdP configuration",
        "tags": [
          "console"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/members": {
      "get": {
        "operationId": "listMembers",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/RosterMember"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List the resolved tenant's member roster (role, workspace scoping, groups)",
        "tags": [
          "system"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/memberships": {
      "post": {
        "operationId": "grantMembership",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantMembershipInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "tenant": {
                      "type": "string"
                    },
                    "user_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Grant a user a role in a tenant",
        "tags": [
          "system"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/server-info": {
      "get": {
        "operationId": "getServerInfo",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInfo"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Server version, engine, setup state and license status",
        "tags": [
          "health"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/setup": {
      "post": {
        "operationId": "setupFirstAdmin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {}
        ],
        "summary": "Create the first superadmin with the one-time setup token",
        "tags": [
          "auth"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/system/orgs": {
      "get": {
        "operationId": "listOrgs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/Org"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List tenant orgs (superadmin)",
        "tags": [
          "system"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "createOrg",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrgInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Org"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Provision a tenant (superadmin)",
        "tags": [
          "system"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/tokens": {
      "get": {
        "operationId": "listTokens",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/Token"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List API tokens for the calling user",
        "tags": [
          "tokens"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "issueToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueTokenInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "token": {
                      "description": "The opaque API key (olvk_…). Shown only once.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Issue an API token",
        "tags": [
          "tokens"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/tokens/{id}": {
      "delete": {
        "operationId": "revokeToken",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Revoke an API token",
        "tags": [
          "tokens"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "rotateToken",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "token": {
                      "description": "The new opaque API key (olvk_…). Shown only once.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Rotate an API token (issue new secret, revoke old)",
        "tags": [
          "tokens"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/users": {
      "get": {
        "operationId": "listUsers",
        "parameters": [
          {
            "description": "Maximum number of items to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Pagination cursor from a previous response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/User"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List users (superadmin)",
        "tags": [
          "users"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "createUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create a user (superadmin)",
        "tags": [
          "users"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/users/superadmins": {
      "get": {
        "operationId": "listSuperadmins",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/User"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List superadmin accounts and their active/inactive status (superadmin)",
        "tags": [
          "users"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/users/{id}/disable": {
      "post": {
        "operationId": "disableSuperadmin",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Disable a superadmin account — non-destructive, reversible (superadmin, AAL3 step-up)",
        "tags": [
          "users"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/users/{id}/enable": {
      "post": {
        "operationId": "enableSuperadmin",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Enable a previously disabled superadmin account (superadmin, AAL3 step-up)",
        "tags": [
          "users"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/workspaces": {
      "get": {
        "operationId": "listWorkspaces",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Maximum number of items to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Pagination cursor from a previous response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/Workspace"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "items",
                    "has_more"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List workspaces in the resolved tenant",
        "tags": [
          "workspaces"
        ],
        "x-stability": "stable"
      },
      "post": {
        "operationId": "createWorkspace",
        "parameters": [
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create a workspace (tenant admin, AAL3 step-up)",
        "tags": [
          "workspaces"
        ],
        "x-stability": "stable"
      }
    },
    "/v1/workspaces/{id}": {
      "get": {
        "operationId": "getWorkspace",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get a workspace by ID",
        "tags": [
          "workspaces"
        ],
        "x-stability": "stable"
      },
      "patch": {
        "operationId": "updateWorkspace",
        "parameters": [
          {
            "description": "Resource identifier (UUIDv7).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Target tenant id; required when the principal can act in more than one tenant.",
            "in": "header",
            "name": "X-Olivares-Tenant",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspaceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Unauthenticated"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict / setup required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Rate limited"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update a workspace",
        "tags": [
          "workspaces"
        ],
        "x-stability": "stable"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "this engine",
      "url": "/"
    }
  ],
  "tags": [
    {
      "description": "Probes, metrics and server status",
      "name": "health"
    },
    {
      "description": "Authentication, sessions, and setup",
      "name": "auth"
    },
    {
      "description": "Agent lifecycle and access edges",
      "name": "agents"
    },
    {
      "description": "Tamper-evident evidence ledger",
      "name": "audit"
    },
    {
      "description": "User management (superadmin)",
      "name": "users"
    },
    {
      "description": "API token lifecycle",
      "name": "tokens"
    },
    {
      "description": "Workspace scoping",
      "name": "workspaces"
    },
    {
      "description": "Tenant provisioning and memberships",
      "name": "system"
    },
    {
      "description": "Connector health monitoring",
      "name": "connectors"
    },
    {
      "description": "Console admin operations (secrets, sources, connectors, SSO, license)",
      "name": "console"
    }
  ]
}
