{
  "openapi": "3.0.3",
  "info": {
    "title": "TridentStack Control API",
    "version": "1.0.0",
    "description": "REST API for TridentStack Control, an enterprise patch management, vulnerability detection, and compliance platform. Use API keys for programmatic access to manage endpoints, updates, policies, and security posture across your fleet.\n\nAll endpoints require authentication via the X-API-Key header unless otherwise noted. Some write operations require interactive web authentication (JWT) and are marked accordingly.\n\n**Organizations.** If your account manages Organizations, each request acts on your main account unless it carries an `X-Tenant-Id` header naming an Organization. Endpoints enrolled into an Organization are listed only when that Organization is named, so `GET /agents` on the main account can return none while `GET /licensing/summary` counts every endpoint on the bill. List your Organizations with `GET /clients`.",
    "contact": {
      "name": "TridentStack Support",
      "url": "https://tridentstack.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://control.tridentstack.com/api",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Agents",
      "description": "Manage and monitor Windows and Linux endpoints"
    },
    {
      "name": "Agent Commands",
      "description": "Install updates, restart endpoints, trigger scans"
    },
    {
      "name": "Agent Health",
      "description": "Health scores, diagnostics, and fleet health summary"
    },
    {
      "name": "Software Inventory",
      "description": "Installed software, changes, and fleet summary"
    },
    {
      "name": "Windows Updates",
      "description": "Browse the Windows Update catalog and check applicability"
    },
    {
      "name": "Windows Update Policies",
      "description": "Manage update policies with approval workflows"
    },
    {
      "name": "Deployment Rings",
      "description": "Phased rollout scheduling for update deployments"
    },
    {
      "name": "Application Updates",
      "description": "Third-party application update configurations"
    },
    {
      "name": "Configuration Policies",
      "description": "Policy objects for endpoint configuration"
    },
    {
      "name": "Agent Tags",
      "description": "Organize endpoints with tags"
    },
    {
      "name": "Vulnerabilities",
      "description": "CVE tracking, scanning, and remediation"
    },
    {
      "name": "Compliance",
      "description": "Compliance frameworks, scores, and evaluations"
    },
    {
      "name": "Automation",
      "description": "Rules for automatic tag assignment based on endpoint criteria"
    },
    {
      "name": "Log Collection",
      "description": "Collect diagnostic logs from endpoints"
    },
    {
      "name": "Network Exposure",
      "description": "Listening ports, fleet port search, and risk assessment"
    },
    {
      "name": "Linux Updates",
      "description": "Package updates for Linux endpoints"
    },
    {
      "name": "Licensing",
      "description": "Endpoint license management"
    },
    {
      "name": "Enrollment",
      "description": "Agent enrollment tokens for endpoint registration"
    },
    {
      "name": "Settings",
      "description": "Tenant-wide configuration"
    },
    {
      "name": "Reports",
      "description": "Report generation and export"
    },
    {
      "name": "Dashboards",
      "description": "Dashboard metrics and widgets"
    },
    {
      "name": "Correlation",
      "description": "Trace related operations across the system"
    },
    {
      "name": "Organizations",
      "description": "Organizations your account manages, and how to act inside them."
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Tenant-scoped API key. Create via Settings > API Keys in the web interface. Format: keyId.secretKey. Acts on your main account; add the X-Tenant-Id header to act in one of your Organizations (see GET /clients)."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token from interactive OAuth login (Microsoft or Google). Cannot be obtained programmatically. Required for write operations not accessible via API key."
      },
      "SessionCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "ts_session",
        "description": "Signed-in browser session. State-changing requests also need the x-csrf-token header."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "sensitiveTags": {
            "type": "array",
            "description": "Sensitive tag names that triggered the identity check. Present when a sensitive tag triggered the check.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "totalCount": {
            "type": "integer"
          },
          "totalPages": {
            "type": "integer"
          }
        }
      },
      "Agent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "hostname": {
            "type": "string"
          },
          "ipAddress": {
            "type": "string"
          },
          "operatingSystem": {
            "type": "string"
          },
          "osVersion": {
            "type": "string"
          },
          "osBuild": {
            "type": "string"
          },
          "architecture": {
            "type": "string",
            "enum": [
              "x64",
              "x86",
              "ARM64"
            ]
          },
          "agentVersion": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "online",
              "offline",
              "pending"
            ]
          },
          "lastCheckIn": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AgentTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "description": "Hex color code"
          },
          "description": {
            "type": "string"
          },
          "agentCount": {
            "type": "integer"
          },
          "isSensitive": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether this tag is marked as sensitive."
          }
        }
      },
      "WindowsUpdate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "updateId": {
            "type": "string",
            "format": "uuid"
          },
          "kbNumber": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "Critical",
              "Important",
              "Moderate",
              "Low",
              "Unspecified"
            ]
          },
          "classification": {
            "type": "string"
          },
          "productFamily": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "releaseDate": {
            "type": "string",
            "format": "date-time"
          },
          "superseded": {
            "type": "boolean"
          },
          "fileSizeBytes": {
            "type": "integer"
          }
        }
      },
      "HistoryEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "eventType": {
            "type": "string"
          },
          "eventCategory": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "details": {
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnrollmentToken": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "token": {
            "type": "string",
            "description": "64-character enrollment token (only shown on creation)"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "maxUses": {
            "type": "integer",
            "nullable": true
          },
          "usedCount": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PolicyObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Unique policy object identifier"
          },
          "name": {
            "type": "string",
            "description": "Policy name"
          },
          "description": {
            "type": "string",
            "description": "Policy description"
          },
          "type": {
            "type": "string",
            "enum": [
              "security",
              "configuration",
              "compliance"
            ],
            "description": "Policy type"
          },
          "tenantId": {
            "type": "integer",
            "description": "Tenant ID"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the policy is active"
          },
          "version": {
            "type": "integer",
            "description": "Policy version number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GatedBy": {
        "type": "object",
        "description": "One applicability gate that withheld an answer. A gate is a control-plane decision, distinct from detection: an endpoint whose scan simply has not completed is not gated. An empty gatedBy array means no gate fired.",
        "required": [
          "gate",
          "scope",
          "reasons",
          "suppressedCount",
          "context"
        ],
        "properties": {
          "gate": {
            "type": "string",
            "enum": [
              "policy_approval_gate",
              "ring_eligibility_gate",
              "scan_freshness_gate",
              "convergence_retired",
              "unclassified_gate"
            ],
            "description": "Which enforcement mechanism withheld the answer."
          },
          "scope": {
            "type": "string",
            "enum": [
              "all",
              "partial"
            ],
            "description": "Whether the gate withheld every candidate or only some of them."
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Why the gate fired. Stable machine-readable codes."
          },
          "suppressedCount": {
            "type": "integer",
            "nullable": true,
            "description": "How many candidates the gate withheld, when the surface returns a list. Null when the surface returns a single verdict."
          },
          "context": {
            "type": "object",
            "additionalProperties": true,
            "description": "Gate-specific identifiers, for example the policy or ring involved."
          }
        }
      }
    },
    "parameters": {
      "PageParam": {
        "name": "page",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 1
        },
        "description": "Page number for pagination"
      },
      "LimitParam": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 50,
          "maximum": 100
        },
        "description": "Results per page"
      },
      "AgentIdParam": {
        "name": "agentId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Agent UUID"
      },
      "OrganizationHeader": {
        "name": "X-Tenant-Id",
        "in": "header",
        "required": false,
        "description": "Organization to act in, for accounts that manage Organizations. Use an `id` from `GET /clients`, or the `organizationId` on a `GET /licensing/summary?withAgents=true` endpoint row. Without it, the request acts on your main account, which holds only the endpoints enrolled there, not those of your Organizations. A key reaches only the Organizations its creator can see, narrowed to the key's Organization access; any other value returns `404`.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Insufficient permissions (API key scope)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                },
                "retryAfter": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "Error": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List all agents",
        "description": "Get all agents with pagination, sorting, and filtering. Returns real-time status computed from heartbeat data.",
        "operationId": "listAgents",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Field to sort by. Supports model columns (hostname, ipAddress, operatingSystem, osVersion, agentVersion, status, lastCheckIn, lastHeartbeat, registeredAt, pendingApplicationUpdates, osBuild, platform) and computed columns (vulnTotal, vulnCritical, vulnHigh, vulnMedium, vulnLow, healthScore, uptime, systemDriveFreeBytes, pendingSystemUpdates).",
            "schema": {
              "type": "string",
              "default": "lastHeartbeat"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "DESC"
            }
          },
          {
            "name": "includeReplaced",
            "in": "query",
            "description": "Include agents that have been replaced by a new registration.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "name": "includeRetired",
            "in": "query",
            "description": "Include retired agents.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of agents with real-time status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Agent"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/agents/{agentId}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get agent details",
        "description": "Get a single agent with full details including tag assignments, restart state, license, and predecessor info.",
        "operationId": "getAgent",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agent": {
                      "$ref": "#/components/schemas/Agent"
                    },
                    "predecessorAgent": {
                      "type": "object",
                      "nullable": true,
                      "description": "Details of the retired agent this one replaced, if any."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Agents"
        ],
        "summary": "Delete an agent",
        "description": "Remove an agent with remote uninstall support. Online agents receive an uninstall command via RabbitMQ. A tombstone is created for offline agents to uninstall on reconnection.",
        "operationId": "deleteAgent",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "uninstallInitiated": {
                      "type": "boolean"
                    },
                    "tombstoneCreated": {
                      "type": "boolean"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "manualUninstallRequired": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/system-info": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get agent system information",
        "description": "Get comprehensive system hardware information for an agent including CPU, memory, storage, graphics, network adapters, BIOS, volumes, disk utilization, Defender status, domain info, and server roles.",
        "operationId": "getAgentSystemInfo",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "System hardware information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "hasSystemInfo": {
                      "type": "boolean"
                    },
                    "bootTime": {
                      "type": "integer",
                      "nullable": true
                    },
                    "uptimeSeconds": {
                      "type": "integer",
                      "nullable": true
                    },
                    "uptimeFormatted": {
                      "type": "string",
                      "nullable": true
                    },
                    "manufacturer": {
                      "type": "string",
                      "nullable": true
                    },
                    "systemModel": {
                      "type": "string",
                      "nullable": true
                    },
                    "cpu": {
                      "type": "object"
                    },
                    "memory": {
                      "type": "object"
                    },
                    "disks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "volumes": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "graphics": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "networkAdapters": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "bios": {
                      "type": "object",
                      "nullable": true
                    },
                    "defender": {
                      "type": "object",
                      "nullable": true
                    },
                    "domain": {
                      "type": "object"
                    },
                    "diskUtilization": {
                      "type": "object",
                      "nullable": true
                    },
                    "serverRoles": {
                      "type": "object",
                      "nullable": true
                    },
                    "lastUpdated": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/audit-logs": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get agent audit logs",
        "description": "Get audit logs for a specific agent, filtered by entity ID or affected agents.",
        "operationId": "getAgentAuditLogs",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Filter by audit log category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated audit logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "auditLogs": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/stats/summary": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get agent statistics summary",
        "description": "Get fleet-wide agent statistics including total, online, offline, and retired counts. Filtered by tenant context.",
        "operationId": "getAgentStatsSummary",
        "responses": {
          "200": {
            "description": "Agent statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer"
                        },
                        "online": {
                          "type": "integer"
                        },
                        "offline": {
                          "type": "integer"
                        },
                        "retired": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/update-checks": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "List agent tasks",
        "description": "Get historical task results for an agent (installs, scripts, inventory, policies) with pagination and filtering.",
        "operationId": "listAgentTasks",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "taskType",
            "in": "query",
            "description": "Filter by task type (e.g., System Update Install, Application Update Install).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by task status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "queuedAt"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "DESC"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated task list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "updateChecks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/update-checks/latest": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get latest update check summary",
        "description": "Get the latest system and application update check summary from the Agent model fields.",
        "operationId": "getLatestUpdateCheck",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "checkType",
            "in": "query",
            "description": "Filter to a specific check type.",
            "schema": {
              "type": "string",
              "enum": [
                "system_updates",
                "application_updates"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest update check summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "windowsUpdates": {
                      "type": "object",
                      "properties": {
                        "lastCheck": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "pendingCount": {
                          "type": "integer",
                          "nullable": true
                        },
                        "results": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    },
                    "applicationUpdates": {
                      "type": "object",
                      "properties": {
                        "lastCheck": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        },
                        "pendingCount": {
                          "type": "integer",
                          "nullable": true
                        },
                        "results": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/update-checks/{checkId}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get task details",
        "description": "Get detailed task result by ID.",
        "operationId": "getTaskDetail",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "checkId",
            "in": "path",
            "required": true,
            "description": "Task ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Task details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "updateCheck": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/history": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get agent history events",
        "description": "Get paginated history events for an agent, including child events. Only returns top-level events (no parent).",
        "operationId": "getAgentHistory",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "eventType",
            "in": "query",
            "description": "Filter by event type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventCategory",
            "in": "query",
            "description": "Filter by event category.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "triggerType",
            "in": "query",
            "description": "Filter by trigger type (manual, automatic).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "triggerSource",
            "in": "query",
            "description": "Filter by trigger source.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by event status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated history events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "serverTimestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/history/{eventId}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Get a single history event",
        "description": "Get a single history event with full details and associated task.",
        "operationId": "getHistoryEvent",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "History event ID.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "History event details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "event": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/install-updates": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Install updates on an agent",
        "description": "Trigger update installations on a specific agent. Supports system updates (Windows KB), application updates (winget), Linux packages, and driver updates. Validates applicability before sending the install command.",
        "operationId": "installUpdates",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "installType",
                  "updates"
                ],
                "properties": {
                  "installType": {
                    "type": "string",
                    "enum": [
                      "System Update Install",
                      "Application Update Install",
                      "Linux Package Install",
                      "Driver Update Install"
                    ],
                    "description": "Type of installation to perform."
                  },
                  "updates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "Update objects. For system updates: {kb, title}. For app updates: {app_name, package_id, target_version}. For Linux: {package_id, name}. For drivers: {wuaUpdateId, title}."
                    },
                    "minItems": 1
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "force_reboot": {
                        "type": "boolean",
                        "default": false
                      },
                      "accept_eula": {
                        "type": "boolean",
                        "default": true
                      },
                      "timeout_seconds": {
                        "type": "integer",
                        "default": 3600
                      },
                      "priority": {
                        "type": "integer",
                        "default": 7
                      },
                      "securityOnly": {
                        "type": "boolean",
                        "description": "Linux only: install security updates only."
                      },
                      "rebootBehavior": {
                        "type": "string",
                        "description": "Linux only: reboot behavior after install."
                      }
                    }
                  },
                  "pendingDriverUpdates": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Driver updates to chain after system updates complete."
                  },
                  "triggerSource": {
                    "type": "string"
                  },
                  "triggerType": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Install command queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "commandId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "installType": {
                      "type": "string"
                    },
                    "updateCount": {
                      "type": "integer"
                    },
                    "estimatedDuration": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (bad installType, empty updates, updates not applicable)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Agent is offline or another install is already in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "RabbitMQ command service unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/install-build-upgrade": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Trigger a Windows feature upgrade",
        "description": "Initiate a feature upgrade on a specific agent using enablement packages or full upgrade media. Supports staged (two-phase) or direct (all-in-one) installation modes.",
        "operationId": "installBuildUpgrade",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "targetVersion"
                ],
                "properties": {
                  "targetVersion": {
                    "type": "string",
                    "description": "Target Windows version (e.g., '25H2', '24H2')."
                  },
                  "installMode": {
                    "type": "string",
                    "enum": [
                      "staged",
                      "direct"
                    ],
                    "default": "staged",
                    "description": "'staged' pre-stages then waits for commit, 'direct' runs all-in-one."
                  },
                  "autoRestart": {
                    "type": "boolean",
                    "description": "For enablement packages, automatically restart after install."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Build upgrade initiated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "task": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "commandId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid target version, hardware incompatibility, or missing upgrade media.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Agent is offline or another install is in progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/finalize-build-upgrade": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Finalize a pre-staged build upgrade",
        "description": "Trigger the finalize phase of a pre-staged build upgrade, or restart after enablement package install. For full upgrades, sends finalize_build_upgrade command. For enablement packages, sends a restart command.",
        "operationId": "finalizeBuildUpgrade",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Finalize or restart command sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "task": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "commandId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "No pending build upgrade found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/applicable-updates": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Get applicable Windows updates",
        "description": "Get cached applicable Windows updates for this agent, including driver updates, install time estimates, pre-staging status, and supersedence information.",
        "operationId": "getApplicableUpdates",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "refresh",
            "in": "query",
            "description": "If 'true', recompute applicability before returning.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Applicable updates with driver updates and metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "applicableUpdates": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "driverUpdates": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "driverCount": {
                      "type": "integer"
                    },
                    "computedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "staleness": {
                      "type": "object",
                      "nullable": true
                    },
                    "telemetryUpdatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true
                    },
                    "preStagingEnabled": {
                      "type": "boolean"
                    },
                    "supersedenceInfo": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/pre-staging": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Get pre-staging status",
        "description": "Get the pre-staging status for an agent, including which updates have been pre-staged.",
        "operationId": "getPreStagingStatus",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Pre-staging status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Remove all pre-staged updates",
        "description": "Remove all pre-staged updates from an agent by sending a cleanup command.",
        "operationId": "removeAllPreStaged",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "default": "manual"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cleanup command sent or no updates to remove",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/pre-staging/trigger": {
      "post": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Trigger pre-staging",
        "description": "Manually trigger pre-staging for an agent, optionally bypassing the maintenance window check.",
        "operationId": "triggerPreStaging",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "respectWindow": {
                    "type": "boolean",
                    "default": false,
                    "description": "If true, respect the configured maintenance window."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pre-staging triggered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/pre-staging/updates": {
      "delete": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Remove specific pre-staged updates",
        "description": "Remove specific pre-staged updates from an agent by update IDs.",
        "operationId": "removePreStagedUpdates",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updateIds"
                ],
                "properties": {
                  "updateIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1
                  },
                  "reason": {
                    "type": "string",
                    "default": "manual"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cleanup command sent for specified updates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "updateIds array is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/build-upgrade/media": {
      "delete": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Clean up build upgrade media",
        "description": "Send a cleanup command to remove leftover upgrade media from a failed feature upgrade. Used when an endpoint has stale data preventing a new upgrade attempt.",
        "operationId": "cleanupBuildUpgradeMedia",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Cleanup command sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "commandId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/install-updates/bulk": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Bulk install updates",
        "description": "Trigger update installations on multiple agents at once. Supports installAllPending mode to auto-discover each agent's pending updates. Maximum 500 agents per request.",
        "operationId": "bulkInstallUpdates",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agentIds",
                  "installType"
                ],
                "properties": {
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 500
                  },
                  "installType": {
                    "type": "string",
                    "enum": [
                      "System Update Install",
                      "Application Update Install"
                    ]
                  },
                  "updates": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "installAllPending": {
                    "type": "boolean",
                    "default": false,
                    "description": "Auto-discover and install all pending updates per agent."
                  },
                  "options": {
                    "type": "object"
                  },
                  "staggerDelayMs": {
                    "type": "integer",
                    "default": 0,
                    "description": "Delay in milliseconds between agent commands."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk install results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "hostname": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "commandId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden. A non-privileged API key receives the following response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "privilegedKeyRequired": {
                    "summary": "API key is not marked as privileged",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action needs an API key marked as privileged."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/restart/bulk": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Bulk restart agents",
        "description": "Send restart commands to multiple agents at once. Maximum 100 agents per request. Offline agents are skipped.",
        "operationId": "bulkRestart",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agentIds"
                ],
                "properties": {
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 100
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "force",
                      "prompted"
                    ],
                    "default": "force"
                  },
                  "countdownSeconds": {
                    "type": "integer",
                    "default": 60
                  },
                  "message": {
                    "type": "string",
                    "default": ""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk restart results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "hostname": {
                            "type": "string"
                          },
                          "success": {
                            "type": "boolean"
                          },
                          "commandId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "requested": {
                          "type": "integer"
                        },
                        "found": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        },
                        "failed": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden. A non-privileged API key receives the following response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "privilegedKeyRequired": {
                    "summary": "API key is not marked as privileged",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action needs an API key marked as privileged."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/push-policies/bulk": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Bulk push policies",
        "description": "Push configuration policies to multiple agents at once. Maximum 100 agents per request. Offline agents are skipped.",
        "operationId": "bulkPushPolicies",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agentIds"
                ],
                "properties": {
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 100
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk policy push results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "hostname": {
                            "type": "string"
                          },
                          "success": {
                            "type": "boolean"
                          },
                          "commandsQueued": {
                            "type": "integer"
                          },
                          "reason": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "requested": {
                          "type": "integer"
                        },
                        "found": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        },
                        "failed": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Insufficient permissions (API key scope)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "sensitiveTagRequiresPrivilegedKey": {
                    "summary": "A sensitive tag requires a privileged API key",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action reaches sensitive tag servers and needs an API key marked as privileged.",
                      "sensitiveTags": [
                        "servers"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/bulk-finalize-build-upgrade": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Bulk finalize build upgrades",
        "description": "Trigger finalize or enablement restart for multiple agents at once. Each agent must have a pending build upgrade task.",
        "operationId": "bulkFinalizeBuildUpgrade",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agentIds"
                ],
                "properties": {
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk finalize results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "success": {
                            "type": "boolean"
                          },
                          "commandId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "error": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden. A non-privileged API key receives the following response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "privilegedKeyRequired": {
                    "summary": "API key is not marked as privileged",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action needs an API key marked as privileged."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/restart": {
      "post": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Restart an agent",
        "description": "Send a manual restart command to an agent. Supports force mode (immediate countdown) and prompted mode (user notification with postpone option). Agent must be online.",
        "operationId": "restartAgent",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "force",
                      "prompted"
                    ]
                  },
                  "countdownSeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 300,
                    "default": 60,
                    "description": "Force mode: seconds before restart."
                  },
                  "allowPostpone": {
                    "type": "boolean",
                    "default": true,
                    "description": "Prompted mode: allow user to postpone."
                  },
                  "maxPostponeMinutes": {
                    "type": "integer",
                    "minimum": 30,
                    "maximum": 1440,
                    "default": 240,
                    "description": "Prompted mode: maximum postpone duration."
                  },
                  "promptTimeoutMinutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 30,
                    "default": 10,
                    "description": "Prompted mode: timeout before auto-restart."
                  },
                  "repromptIntervalMinutes": {
                    "type": "integer",
                    "minimum": 15,
                    "maximum": 120,
                    "default": 30,
                    "description": "Prompted mode: interval between re-prompts."
                  },
                  "customMessage": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true,
                    "description": "Custom message displayed to user."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Restart command sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "commandId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "mode": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error or agent must be online.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Insufficient permissions (API key scope)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "sensitiveTagRequiresPrivilegedKey": {
                    "summary": "A sensitive tag requires a privileged API key",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action reaches sensitive tag servers and needs an API key marked as privileged.",
                      "sensitiveTags": [
                        "servers"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/reboot-settings": {
      "get": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Get reboot settings",
        "description": "Get the reboot settings for a specific agent.",
        "operationId": "getRebootSettings",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Reboot settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "rebootSettings": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "Agent Commands"
        ],
        "summary": "Update reboot settings",
        "description": "Update the reboot settings for a specific agent.",
        "operationId": "updateRebootSettings",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "policy"
                ],
                "properties": {
                  "policy": {
                    "type": "string",
                    "enum": [
                      "inherit",
                      "window",
                      "never"
                    ]
                  },
                  "rebootWindowStart": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$",
                    "nullable": true,
                    "description": "Required when policy is 'window'. Format: HH:MM."
                  },
                  "rebootWindowEnd": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$",
                    "nullable": true,
                    "description": "Required when policy is 'window'. Format: HH:MM."
                  },
                  "rebootWindowTimezone": {
                    "type": "string",
                    "maxLength": 50,
                    "default": "UTC"
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 500,
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reboot settings updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "rebootSettings": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/health/summary": {
      "get": {
        "tags": [
          "Agent Health"
        ],
        "summary": "Get fleet health summary",
        "description": "Get fleet-wide health summary, scoped to the authenticated user's tenant.",
        "operationId": "getFleetHealthSummary",
        "responses": {
          "200": {
            "description": "Fleet health summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/settings/health": {
      "get": {
        "tags": [
          "Agent Health"
        ],
        "summary": "Get health score settings",
        "description": "Get health score configuration including category weights and high-risk ports.",
        "operationId": "getHealthSettings",
        "responses": {
          "200": {
            "description": "Health settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "put": {
        "tags": [
          "Agent Health"
        ],
        "summary": "Update health score settings",
        "description": "Update health score configuration. Admin access required.",
        "operationId": "updateHealthSettings",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "weights": {
                    "type": "object",
                    "description": "Category weights that must sum to 100.",
                    "properties": {
                      "vulnerability": {
                        "type": "number"
                      },
                      "compliance": {
                        "type": "number"
                      },
                      "updates": {
                        "type": "number"
                      },
                      "networkExposure": {
                        "type": "number"
                      }
                    }
                  },
                  "highRiskPorts": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated health settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Weights must sum to 100.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/health": {
      "get": {
        "tags": [
          "Agent Health"
        ],
        "summary": "Get agent health score",
        "description": "Get health score for an agent. By default performs a real-time calculation. Use cached=true to get the last cached score.",
        "operationId": "getAgentHealthScore",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "cached",
            "in": "query",
            "description": "If 'true', return cached score instead of real-time calculation.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent health score",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/health/history": {
      "get": {
        "tags": [
          "Agent Health"
        ],
        "summary": "Get health score history",
        "description": "Get health score history for an agent for trending analysis.",
        "operationId": "getAgentHealthHistory",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "days",
            "in": "query",
            "description": "Number of days of history to return.",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Health score history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/health/changes": {
      "get": {
        "tags": [
          "Agent Health"
        ],
        "summary": "Get health change events",
        "description": "Get health change events for an agent.",
        "operationId": "getAgentHealthChanges",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "name": "days",
            "in": "query",
            "description": "Number of days of changes to return (max 90).",
            "schema": {
              "type": "integer",
              "default": 30,
              "maximum": 90
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Health change events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/software-inventory": {
      "get": {
        "tags": [
          "Software Inventory"
        ],
        "summary": "Get agent software inventory",
        "description": "Get the software inventory for a specific agent with pagination, filtering, and policy management status. Framework/runtime packages are hidden by default.",
        "operationId": "getAgentSoftwareInventory",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by display name, publisher, or winget identifier.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "managed",
            "in": "query",
            "description": "Filter by managed status (has winget package match).",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "needsUpdate",
            "in": "query",
            "description": "Filter by update needed status.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "includeHidden",
            "in": "query",
            "description": "Include framework/runtime packages hidden by default.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "displayName",
                "displayVersion",
                "publisher",
                "lastSeenAt",
                "isManaged",
                "needsUpdate"
              ],
              "default": "displayName"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "ASC"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated software inventory with summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inventory": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "totalSoftware": {
                          "type": "integer"
                        },
                        "manageableCount": {
                          "type": "integer"
                        },
                        "managedByPolicyCount": {
                          "type": "integer"
                        },
                        "needingUpdates": {
                          "type": "integer"
                        },
                        "lastSync": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/agents/{agentId}/software-changes": {
      "get": {
        "tags": [
          "Software Inventory"
        ],
        "summary": "Get software change history",
        "description": "Get software change history for a specific agent with filtering by change type, search, and date range.",
        "operationId": "getAgentSoftwareChanges",
        "parameters": [
          {
            "$ref": "#/components/parameters/AgentIdParam"
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "changeType",
            "in": "query",
            "description": "Filter by change type (INSTALLED, UPGRADED, UNINSTALLED).",
            "schema": {
              "type": "string",
              "enum": [
                "INSTALLED",
                "UPGRADED",
                "UNINSTALLED"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by display name or publisher.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Filter changes after this date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Filter changes before this date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated software changes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/software-inventory/summary": {
      "get": {
        "tags": [
          "Software Inventory"
        ],
        "summary": "Get fleet software inventory summary",
        "description": "Get fleet-wide software inventory summary including aggregate statistics, top installed software, and recent changes.",
        "operationId": "getSoftwareInventorySummary",
        "responses": {
          "200": {
            "description": "Fleet software inventory summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "stats": {
                      "type": "object",
                      "properties": {
                        "agents_with_inventory": {
                          "type": "integer"
                        },
                        "total_software_entries": {
                          "type": "integer"
                        },
                        "managed_entries": {
                          "type": "integer"
                        },
                        "needing_updates": {
                          "type": "integer"
                        },
                        "unique_winget_packages": {
                          "type": "integer"
                        }
                      }
                    },
                    "topSoftware": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "recentChanges": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-updates": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "List Windows or Linux updates with pagination, search, and filters",
        "description": "Returns paginated list of updates. Supports groupBy=kb for KB-grouped view, platform filter for Linux advisories, severity/status/product/classification filters with inclusion and exclusion variants.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search across title, KB number, description, severity, classifications, products, CVE IDs, and status keywords"
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "title",
                "release_date",
                "severity",
                "kb_number",
                "file_size_bytes",
                "classifications",
                "is_superseded",
                "approved",
                "arch_count",
                "variant_count"
              ],
              "default": "release_date"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "DESC"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "kb"
              ]
            },
            "description": "Set to 'kb' to group updates by KB number with architecture variants aggregated"
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "windows",
                "linux",
                "ubuntu",
                "debian",
                "rhel",
                "rocky",
                "all"
              ],
              "default": "windows"
            },
            "description": "Platform filter. Linux platforms query LinuxSecurityAdvisory table."
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Include filter: severity value(s)"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Include filter: superseded status (true/false)"
          },
          {
            "name": "approved",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Include filter: approval status (true/false)"
          },
          {
            "name": "product",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Include filter: product name"
          },
          {
            "name": "classification",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Include filter: classification name"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "List of updates with optional pagination",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updates": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "totalCount": {
                      "type": "integer"
                    },
                    "grouped": {
                      "type": "boolean"
                    },
                    "platform": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-updates/by-id/{id}": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Get update by internal UUID",
        "description": "Returns a single update by its internal database UUID. Most reliable lookup method.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Internal update UUID"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Update object"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-updates/by-ms-id/{msUpdateId}": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Get update by Microsoft Update Catalog GUID",
        "description": "Returns a single update by its Microsoft Update Catalog GUID. Unique per update variant (architecture/version).",
        "parameters": [
          {
            "name": "msUpdateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Microsoft Update Catalog GUID"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Update object"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-updates/{kbNumber}": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Get update(s) by KB number",
        "description": "Returns update details for a KB number. KB numbers are not unique; multiple variants may exist. Returns the most recent update with variant info if multiple exist.",
        "parameters": [
          {
            "name": "kbNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "KB number (e.g., KB5034441)"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Update object, optionally with _variantInfo if multiple variants exist"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-updates/stats/summary": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Get catalog summary statistics",
        "description": "Returns aggregate statistics of the Windows Updates catalog including counts by severity, approval status, and supersedence status.",
        "responses": {
          "200": {
            "description": "Summary statistics object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total_updates": {
                      "type": "integer"
                    },
                    "active_updates": {
                      "type": "integer"
                    },
                    "superseded_updates": {
                      "type": "integer"
                    },
                    "critical_active": {
                      "type": "integer"
                    },
                    "important_active": {
                      "type": "integer"
                    },
                    "moderate_active": {
                      "type": "integer"
                    },
                    "low_active": {
                      "type": "integer"
                    },
                    "unspecified_active": {
                      "type": "integer"
                    },
                    "approved_updates": {
                      "type": "integer"
                    },
                    "unapproved_updates": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-updates/by-ids": {
      "post": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Fetch specific updates by UUID array",
        "description": "Returns updates matching the provided array of internal UUIDs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updateIds"
                ],
                "properties": {
                  "updateIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Array of internal update UUIDs"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching updates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "updates": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-updates/lookup-kbs": {
      "post": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Look up KB numbers in catalog",
        "description": "Returns enriched details (title, release date, severity) for an array of KB numbers.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kbNumbers"
                ],
                "properties": {
                  "kbNumbers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Array of KB numbers to look up"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "KB lookup results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "kbDetails": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "totalRequested": {
                      "type": "integer"
                    },
                    "totalFound": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-updates/browse": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "Unified browse endpoint for Windows and Linux updates",
        "description": "Combines Windows SystemUpdate and Linux LinuxSecurityAdvisory into a unified browse response.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "windows",
                "linux",
                "ubuntu",
                "debian",
                "rhel"
              ]
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "critical",
                "high",
                "medium",
                "low"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search in title, CVE, KB, advisory ID"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Unified browse results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies": {
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Create a new update policy",
        "description": "Creates a new Windows Update policy with approval rules, auto-approval settings, and deployment ring assignment.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string"
                  },
                  "targetPlatforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "isActive": {
                    "type": "boolean",
                    "default": true
                  },
                  "approvalMode": {
                    "type": "string"
                  },
                  "autoApprovalRules": {
                    "type": "object"
                  },
                  "deploymentRingId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Policy created"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "List all update policies",
        "description": "Returns all Windows Update policies for the tenant with approval counts.",
        "responses": {
          "200": {
            "description": "List of policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-update-policies/feature-upgrade-versions": {
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Get Windows feature versions for upgrades",
        "description": "Returns available Windows feature upgrade version targets.",
        "responses": {
          "200": {
            "description": "Feature upgrade versions"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-update-policies/{id}": {
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Get a specific update policy",
        "description": "Returns a single Windows Update policy by ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Policy object"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "patch": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Update an existing policy",
        "description": "Updates fields on a Windows Update policy.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "approvalMode": {
                    "type": "string"
                  },
                  "autoApprovalRules": {
                    "type": "object"
                  },
                  "deploymentRingId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated policy"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Delete an update policy",
        "description": "Deletes a Windows Update policy. Default policies cannot be deleted.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Policy deleted"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{id}/approvals": {
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Get approvals for a policy",
        "description": "Returns paginated list of approved updates for a policy.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by approval status"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated approvals"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{id}/emergency-override": {
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Activate emergency override",
        "description": "Activates an emergency override on a policy, temporarily bypassing normal approval workflow.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reason"
                ],
                "properties": {
                  "reason": {
                    "type": "string"
                  },
                  "durationHours": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Emergency override activated"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Deactivate emergency override",
        "description": "Deactivates the emergency override on a policy.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Emergency override deactivated"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{id}/effective-approvals": {
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Get effective approval status for auto-approval mode",
        "description": "Returns the effective approval status for a policy operating in auto-approval mode.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Effective approvals"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{id}/duplicate": {
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Duplicate a policy",
        "description": "Creates a copy of an existing policy with a new name.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Duplicated policy"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{id}/tags": {
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Get tags assigned to a policy",
        "description": "Returns agent tags associated with a policy.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "List of tags"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Add tag to a policy",
        "description": "Associates an agent tag with a policy.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tagId"
                ],
                "properties": {
                  "tagId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tag added to policy"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{id}/tags/{tagId}": {
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Remove tag from a policy",
        "description": "Removes an agent tag association from a policy.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag removed from policy"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{policyId}/approvals": {
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Approve a single update for a policy",
        "description": "Adds a single update approval to a policy. Visibility-only updates (SSU, Dynamic) cannot be approved.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updateId"
                ],
                "properties": {
                  "updateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "deploymentPriority": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Update approved for policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "approval": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Update already approved for this policy"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{policyId}/approvals/bulk": {
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Bulk approve updates for a policy",
        "description": "Approves multiple updates for a policy in a single request. Maximum 1000 per request. Visibility-only updates are rejected.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updateIds"
                ],
                "properties": {
                  "updateIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 1000
                  },
                  "deploymentPriority": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bulk approval result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "added": {
                      "type": "integer"
                    },
                    "skipped": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Bulk remove approvals from a policy",
        "description": "Removes multiple update approvals from a policy in a single request. Maximum 1000 per request.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updateIds"
                ],
                "properties": {
                  "updateIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk removal result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "removed": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{policyId}/approvals/{approvalId}": {
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Remove a single approval from a policy",
        "description": "Removes a specific approval. Optionally creates an override to prevent re-approval for auto-approved updates.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "approvalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "createOverride",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "Set to 'true' to create an override preventing re-approval (for auto-approved updates)"
          },
          {
            "name": "reason",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional reason for the override"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Approval removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "overrideCreated": {
                      "type": "boolean"
                    },
                    "override": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{policyId}/overrides": {
      "get": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "List approval overrides for a policy",
        "description": "Returns paginated list of auto-approval overrides (exclusions) for a policy.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated overrides",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "overrides": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "page": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "pages": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Create an approval override",
        "description": "Creates an override to prevent a specific update from being auto-approved by the policy.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "updateId"
                ],
                "properties": {
                  "updateId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 1000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Override created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "override": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Override already exists"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Reset all overrides for a policy",
        "description": "Deletes all approval overrides for a policy. Requires confirmation body.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "confirm"
                ],
                "properties": {
                  "confirm": {
                    "type": "boolean",
                    "enum": [
                      true
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "All overrides reset",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{policyId}/overrides/by-update/{updateId}": {
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Remove override by update ID",
        "description": "Convenience endpoint to remove an override using the update ID rather than the override ID.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "updateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Override removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/system-update-policies/{policyId}/overrides/{overrideId}": {
      "delete": {
        "tags": [
          "Windows Update Policies"
        ],
        "summary": "Remove a specific override",
        "description": "Removes a single approval override by its ID.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "overrideId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Override removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/presets": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get available phase presets",
        "description": "Returns all available rollout phase presets (conservative, moderate, aggressive, immediate).",
        "responses": {
          "200": {
            "description": "Available presets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "presets": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/deployment-rings/timezones": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get IANA timezones and server timezone",
        "description": "Returns list of IANA timezones and the server's current timezone.",
        "responses": {
          "200": {
            "description": "Timezones list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "timezones": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "serverTimezone": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/deployment-rings/rollout-status": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get rollout status for all rings",
        "description": "Returns rollout status, phase progression, execution statistics, and next deployment window for all rings.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "active",
                "paused",
                "completed"
              ],
              "default": "all"
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Rollout statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rollouts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "stats": {
                      "type": "object"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/calendar": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get deployment windows for calendar view",
        "description": "Returns deployment window events for a date range, grouped by date. Includes execution history and skip status.",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start of date range (defaults to first day of current month)"
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End of date range (defaults to last day of current month)"
          },
          {
            "name": "ringId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter to a specific ring"
          },
          {
            "name": "includeInactive",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "eventsByDate": {
                      "type": "object"
                    },
                    "dateRange": {
                      "type": "object"
                    },
                    "totalEvents": {
                      "type": "integer"
                    },
                    "ringCount": {
                      "type": "integer"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/{id}/skip-window": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Skip a deployment window",
        "description": "Adds a date to the ring's exclusion dates, preventing deployment on that day.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deployment window skipped"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Restore a skipped deployment window",
        "description": "Removes a previously skipped date from exclusion dates.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deployment window restored"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Create a new deployment ring",
        "description": "Creates a deployment ring with rollout phases, deployment windows, emergency controls, and auto-reboot settings. Maximum 25 per tenant.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "rolloutPhases"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean",
                    "default": true
                  },
                  "timezone": {
                    "type": "string",
                    "default": "UTC"
                  },
                  "timezoneMode": {
                    "type": "string",
                    "enum": [
                      "window",
                      "agent",
                      "server"
                    ],
                    "default": "window"
                  },
                  "deploymentWindows": {
                    "type": "object"
                  },
                  "exclusionDates": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "preStagingEnabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "rolloutPhases": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "minItems": 1
                  },
                  "emergencyControls": {
                    "type": "object"
                  },
                  "autoRebootSettings": {
                    "type": "object"
                  },
                  "preset": {
                    "type": "string",
                    "enum": [
                      "conservative",
                      "moderate",
                      "aggressive",
                      "immediate",
                      "custom"
                    ]
                  },
                  "updateCriteria": {
                    "type": "object"
                  },
                  "allowEmergencyOverride": {
                    "type": "boolean",
                    "default": true
                  },
                  "priority": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Deployment ring created"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "List all deployment rings",
        "description": "Returns all deployment rings for the tenant with assigned policies and schedule summaries.",
        "parameters": [
          {
            "name": "includeInactive",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "Include inactive rings (default: only active)"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Deployment rings list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deploymentRings": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/from-preset": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Create deployment ring from preset",
        "description": "Creates a deployment ring using a predefined phase preset (conservative, moderate, aggressive, immediate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "presetId",
                  "name"
                ],
                "properties": {
                  "presetId": {
                    "type": "string",
                    "enum": [
                      "conservative",
                      "moderate",
                      "aggressive",
                      "immediate"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "timezoneMode": {
                    "type": "string",
                    "enum": [
                      "window",
                      "agent",
                      "server"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Deployment ring created from preset"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/deployment-rings/import": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Import deployment ring from JSON",
        "description": "Creates a deployment ring from an exported JSON definition. Imported rings start as inactive.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ringData"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "ringData": {
                    "type": "object",
                    "description": "Full deployment ring JSON definition"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Deployment ring imported"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/deployment-rings/{id}": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get a single deployment ring",
        "description": "Returns a deployment ring with assigned policies and schedule/phase summaries.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Deployment ring object"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "patch": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Update a deployment ring",
        "description": "Updates fields on a deployment ring. Phase percentages must be increasing and final phase must be 100%.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "timezone": {
                    "type": "string"
                  },
                  "deploymentWindows": {
                    "type": "object"
                  },
                  "rolloutPhases": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "emergencyControls": {
                    "type": "object"
                  },
                  "autoRebootSettings": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated deployment ring"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Delete a deployment ring",
        "description": "Deletes a deployment ring.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Deployment ring deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/{id}/duplicate": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Duplicate a deployment ring",
        "description": "Creates a copy of an existing deployment ring with a new name.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Duplicated deployment ring"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/{id}/reset-to-preset": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Reset ring phases to a preset",
        "description": "Replaces the ring's rollout phases with a preset configuration.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "presetId"
                ],
                "properties": {
                  "presetId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ring phases reset to preset"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-rings/{id}/policies": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get policies assigned to a deployment ring",
        "description": "Returns all policies associated with a deployment ring.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "List of assigned policies"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-executions": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "List deployment executions with filters",
        "description": "Returns paginated deployment executions with optional filters by ring, status, phase, and agent.",
        "parameters": [
          {
            "name": "ringId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of statuses"
          },
          {
            "name": "phaseId",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "scheduledAt",
                "startedAt",
                "completedAt",
                "status",
                "agentId"
              ],
              "default": "scheduledAt"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "DESC"
            }
          },
          {
            "name": "includeHistorical",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated execution list"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-executions/statistics": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get deployment execution statistics",
        "description": "Returns aggregate statistics for deployment executions over a time range.",
        "parameters": [
          {
            "name": "ringId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "timeRange",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d"
              ],
              "default": "24h"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Execution statistics"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-executions/{id}": {
      "get": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Get a specific deployment execution",
        "description": "Returns details of a single deployment execution.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Execution details"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-executions/{id}/cancel": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Cancel a deployment execution",
        "description": "Cancels a pending or in-progress deployment execution.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Execution cancelled"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deployment-executions/{id}/reboot": {
      "post": {
        "tags": [
          "Deployment Rings"
        ],
        "summary": "Trigger reboot for a deployment execution",
        "description": "Sends a reboot command to the agent associated with a deployment execution.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "force": {
                    "type": "boolean"
                  },
                  "delaySeconds": {
                    "type": "integer"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reboot triggered"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Forbidden. A non-privileged API key receives the following response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "privilegedKeyRequired": {
                    "summary": "API key is not marked as privileged",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action needs an API key marked as privileged."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/configurations": {
      "post": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Create a new application update configuration",
        "description": "Creates a configuration that groups applications for update management.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "description": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string",
                    "default": "1.0.0"
                  },
                  "isActive": {
                    "type": "boolean",
                    "default": true
                  },
                  "metadata": {
                    "type": "object"
                  },
                  "globalTargetVersionOffset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000,
                    "default": 0
                  },
                  "deploymentRingId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "allowManualDeployment": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Configuration created"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "List all configurations",
        "description": "Returns all application update configurations for the tenant.",
        "responses": {
          "200": {
            "description": "List of configurations"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/configurations/{id}": {
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Get a specific configuration",
        "description": "Returns a single application update configuration by ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration object"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "patch": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Update a configuration",
        "description": "Updates fields on an application update configuration.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean"
                  },
                  "globalTargetVersionOffset": {
                    "type": "integer"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "deploymentRingId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated configuration"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Delete a configuration",
        "description": "Deletes an application update configuration and its associated applications.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/configurations/{id}/duplicate": {
      "post": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Duplicate a configuration",
        "description": "Creates a copy of a configuration with all its applications.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Duplicated configuration"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/configurations/import": {
      "post": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Import a configuration from JSON",
        "description": "Creates a configuration from an exported JSON definition.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "configData"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "configData": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Configuration imported"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/configurations/{id}/tags": {
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Get tags assigned to a configuration",
        "description": "Returns agent tags associated with a configuration.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "List of tags"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Add tag to a configuration",
        "description": "Associates an agent tag with a configuration.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tagId"
                ],
                "properties": {
                  "tagId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tag added"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/configurations/{id}/tags/{tagId}": {
      "delete": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Remove tag from a configuration",
        "description": "Removes an agent tag association from a configuration.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag removed"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/configurations/{id}/save": {
      "put": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Save configuration with all changes",
        "description": "Saves configuration settings, new applications, edited applications, deleted applications, status changes, and tag changes in a single transaction.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "settings": {
                    "type": "object",
                    "description": "Configuration-level settings to update"
                  },
                  "newApps": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "New applications to create"
                  },
                  "editedApps": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Existing applications to update"
                  },
                  "deletedAppIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Application IDs to delete"
                  },
                  "statusChanges": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Application status toggles"
                  },
                  "tagChanges": {
                    "type": "object",
                    "description": "Tag additions and removals"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configuration saved"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/apps": {
      "post": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Create a new application",
        "description": "Creates an application within a configuration. Accepts packageId (preferred) or wingetPkg (legacy) for the package identifier.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "displayName",
                  "configurationId"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "packageId": {
                    "type": "string",
                    "description": "Package identifier (preferred)"
                  },
                  "wingetPkg": {
                    "type": "string",
                    "description": "Legacy package identifier"
                  },
                  "required": {
                    "type": "boolean",
                    "default": false
                  },
                  "ignoreDependencies": {
                    "type": "boolean",
                    "default": false
                  },
                  "configurationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sortOrder": {
                    "type": "integer",
                    "default": 0
                  },
                  "isEnabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "targetVersionOffset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "pinnedVersion": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "requiresReboot": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Application created"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/apps/config/{configId}": {
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Get applications for a configuration",
        "description": "Returns all applications belonging to a specific configuration.",
        "parameters": [
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "List of applications"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/apps/{id}": {
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Get a specific application",
        "description": "Returns a single application by ID.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Application object"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Update an application",
        "description": "Updates all fields on an application.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "packageId": {
                    "type": "string"
                  },
                  "isEnabled": {
                    "type": "boolean"
                  },
                  "targetVersionOffset": {
                    "type": "integer"
                  },
                  "pinnedVersion": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated application"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Delete an application",
        "description": "Deletes an application from its configuration.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Application deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/apps/{id}/toggle-status": {
      "put": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Toggle application enabled status",
        "description": "Enables or disables an application.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "isEnabled"
                ],
                "properties": {
                  "isEnabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status toggled"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/apps/bulk-import": {
      "post": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Bulk import applications into a configuration",
        "description": "Creates multiple applications in a single request within a configuration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "configurationId",
                  "applications"
                ],
                "properties": {
                  "configurationId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "applications": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Applications imported"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/apps/{id}/icon": {
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Get application icon",
        "description": "Returns the cached icon for an application.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Icon image data"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/policy-objects": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List all policy objects",
        "operationId": "listPolicyObjects",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of policy objects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObjects": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PolicyObject"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List all policy objects. GET endpoint that returns policy objects from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Create a policy object",
        "operationId": "createPolicyObject",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Policy object created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObject": {
                      "$ref": "#/components/schemas/PolicyObject"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Create a policy object. POST endpoint that creates or triggers policy objects. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/policy-objects/compliance-templates": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List available compliance templates",
        "operationId": "listComplianceTemplates",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of compliance templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "templates": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List available compliance templates. GET endpoint that returns compliance templates from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/policy-objects/compliance-templates/{frameworkId}/not-enforceable-guide": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Download CSV guide of not-enforceable controls for a compliance template",
        "operationId": "getNotEnforceableGuide",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "L1",
                "L2",
                "L1+L2",
                "all"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file download",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Download CSV guide of not-enforceable controls for a compliance template. GET endpoint that returns not enforceable guide from your tenant. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/from-compliance-template": {
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Create policy objects from a compliance template",
        "operationId": "createFromComplianceTemplate",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "frameworkId",
                  "name"
                ],
                "properties": {
                  "frameworkId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "level": {
                    "type": "string"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "splitByCategory": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Policy objects created from template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "policies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "settingsCount": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "framework": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Create policy objects from a compliance template. POST endpoint that creates or triggers from compliance template. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/policy-objects/{id}": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get policy object details",
        "operationId": "getPolicyObject",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Policy object details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObject": {
                      "$ref": "#/components/schemas/PolicyObject"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get policy object details. GET endpoint that returns policy objects from your tenant. Part of the TridentStack Control API."
      },
      "put": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update a policy object",
        "operationId": "updatePolicyObject",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "refreshIntervalMinutes": {
                    "type": "integer",
                    "minimum": 15,
                    "maximum": 1440
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Policy object updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObject": {
                      "$ref": "#/components/schemas/PolicyObject"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update a policy object. PUT endpoint that replaces the policy objects. Part of the TridentStack Control API."
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Delete a policy object",
        "operationId": "deletePolicyObject",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Policy object deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Delete a policy object. DELETE endpoint that removes the policy objects. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/settings": {
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Add a policy setting configuration",
        "operationId": "addPolicySettingConfiguration",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "policySettingId"
                ],
                "properties": {
                  "policySettingId": {
                    "type": "integer"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "NotConfigured",
                      "Enabled",
                      "Disabled"
                    ]
                  },
                  "configuredValues": {
                    "type": "object"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Policy setting configured",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configuration": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Add a policy setting configuration. POST endpoint that creates or triggers settings. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/settings/{configId}": {
      "put": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update a policy setting configuration",
        "operationId": "updatePolicySettingConfiguration",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string"
                  },
                  "configuredValues": {
                    "type": "object"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configuration updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configuration": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update a policy setting configuration. PUT endpoint that replaces the settings. Part of the TridentStack Control API."
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Remove a policy setting configuration",
        "operationId": "deletePolicySettingConfiguration",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Remove a policy setting configuration. DELETE endpoint that removes the settings. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/deploy": {
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Deploy a policy object to assigned agents",
        "operationId": "deployPolicyObject",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "description": "Specific agent IDs to deploy to. If omitted, deploys to all assigned agents."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deployment queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "commandsQueued": {
                      "type": "integer"
                    },
                    "policyObjectId": {
                      "type": "integer"
                    },
                    "policyObjectName": {
                      "type": "string"
                    },
                    "configurationsCount": {
                      "type": "integer"
                    },
                    "agentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. A non-privileged API key receives the following response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "privilegedKeyRequired": {
                    "summary": "API key is not marked as privileged",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action needs an API key marked as privileged."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Deploy a policy object to assigned agents. POST endpoint that creates or triggers deploy. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/tag-assignments": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List tag assignments for a policy object",
        "operationId": "listPolicyObjectTagAssignments",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag assignments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "agentCount": {
                            "type": "integer"
                          },
                          "assignmentId": {
                            "type": "integer"
                          },
                          "priority": {
                            "type": "integer"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List tag assignments for a policy object. GET endpoint that returns tag assignments from your tenant. Part of the TridentStack Control API."
      },
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Assign a tag to a policy object",
        "operationId": "createPolicyObjectTagAssignment",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tagId"
                ],
                "properties": {
                  "tagId": {
                    "type": "integer"
                  },
                  "priority": {
                    "type": "integer",
                    "default": 100
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tag assigned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Assign a tag to a policy object. POST endpoint that creates or triggers tag assignments. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/tag-assignments/{assignmentId}": {
      "patch": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update a tag assignment on a policy object",
        "operationId": "updatePolicyObjectTagAssignment",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priority": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assignment updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update a tag assignment on a policy object. PATCH endpoint that partially updates the tag assignments. Part of the TridentStack Control API."
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Remove a tag assignment from a policy object",
        "operationId": "deletePolicyObjectTagAssignment",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Assignment removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Remove a tag assignment from a policy object. DELETE endpoint that removes the tag assignments. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/drive-mappings": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List drive mappings for a policy object",
        "operationId": "listDriveMappings",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Drive mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "driveMappings": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List drive mappings for a policy object. GET endpoint that returns drive mappings from your tenant. Part of the TridentStack Control API."
      },
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Add a drive mapping to a policy object",
        "operationId": "createDriveMapping",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "driveLetter",
                  "uncPath"
                ],
                "properties": {
                  "driveLetter": {
                    "type": "string",
                    "pattern": "^[A-Za-z]$"
                  },
                  "uncPath": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "Create",
                      "Replace",
                      "Update",
                      "Delete"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "reconnect": {
                    "type": "boolean",
                    "default": true
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Drive mapping created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "driveMapping": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Add a drive mapping to a policy object. POST endpoint that creates or triggers drive mappings. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/drive-mappings/{mappingId}": {
      "put": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update a drive mapping",
        "operationId": "updateDriveMapping",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "driveLetter": {
                    "type": "string"
                  },
                  "uncPath": {
                    "type": "string"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "Create",
                      "Replace",
                      "Update",
                      "Delete"
                    ]
                  },
                  "label": {
                    "type": "string"
                  },
                  "reconnect": {
                    "type": "boolean"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "integer"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Drive mapping updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "driveMapping": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update a drive mapping. PUT endpoint that replaces the drive mappings. Part of the TridentStack Control API."
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Delete a drive mapping",
        "operationId": "deleteDriveMapping",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Drive mapping deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Delete a drive mapping. DELETE endpoint that removes the drive mappings. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{id}/add-compliance-controls": {
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Add compliance control settings to an existing policy object",
        "operationId": "addComplianceControlsToPolicyObject",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "controlIds",
                  "frameworkId"
                ],
                "properties": {
                  "controlIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "frameworkId": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Controls added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "added": {
                      "type": "integer"
                    },
                    "skipped": {
                      "type": "integer"
                    },
                    "notEnforceable": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Add compliance control settings to an existing policy object. POST endpoint that creates or triggers add compliance controls. Part of the TridentStack Control API."
      }
    },
    "/policy-objects/{policyObjectId}/versions": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List version history for a policy object",
        "description": "Get paginated version history for a policy object.",
        "operationId": "listPolicyVersions",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Version history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObjectId": {
                      "type": "integer"
                    },
                    "policyObjectName": {
                      "type": "string"
                    },
                    "versions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/policy-objects/{policyObjectId}/versions/compare": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Compare two policy versions",
        "description": "Compare two versions of a policy object.",
        "operationId": "comparePolicyVersions",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "v1",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "v2",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Version comparison",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObjectId": {
                      "type": "integer"
                    },
                    "policyObjectName": {
                      "type": "string"
                    },
                    "comparison": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/policy-objects/{policyObjectId}/versions/current": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get current version number of a policy object",
        "description": "Get the current version number.",
        "operationId": "getCurrentPolicyVersion",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Current version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyObjectId": {
                      "type": "integer"
                    },
                    "policyObjectName": {
                      "type": "string"
                    },
                    "currentVersion": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/policy-objects/{policyObjectId}/versions/{versionId}": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get specific version details",
        "description": "Get details of a specific policy version.",
        "operationId": "getPolicyVersion",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Version details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/policy-objects/{policyObjectId}/versions/{versionId}/rollback": {
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Rollback to a specific policy version",
        "description": "Rollback a policy object to a previous version. Requires admin role.",
        "operationId": "rollbackPolicyVersion",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rollback successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/policy-object-assignments": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List policy object assignments",
        "description": "List all policy object assignments with optional filters.",
        "operationId": "listPolicyObjectAssignments",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "policyObjectId",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Assignments list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assignments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Create a policy object assignment",
        "description": "Assign a policy object to an agent or group.",
        "operationId": "createPolicyObjectAssignment",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "policyObjectId"
                ],
                "properties": {
                  "policyObjectId": {
                    "type": "integer"
                  },
                  "agentId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "groupId": {
                    "type": "integer"
                  },
                  "priority": {
                    "type": "integer",
                    "default": 100
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Assignment created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/policy-object-assignments/{id}": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get a policy object assignment",
        "description": "Get details of a specific assignment.",
        "operationId": "getPolicyObjectAssignment",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Assignment details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update a policy object assignment",
        "description": "Update priority, enabled state, or notes.",
        "operationId": "updatePolicyObjectAssignment",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priority": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assignment updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Delete a policy object assignment",
        "description": "Remove a policy object assignment and mark affected agents for cleanup.",
        "operationId": "deletePolicyObjectAssignment",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Assignment deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/policies": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List policies assigned to an agent",
        "description": "Get all policy objects and their configurations assigned to an agent. Supports ETag caching.",
        "operationId": "listAgentPolicies",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    },
                    "policyObjects": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "statistics": {
                      "type": "object",
                      "properties": {
                        "totalPolicies": {
                          "type": "integer"
                        },
                        "pendingDeployment": {
                          "type": "integer"
                        },
                        "deployed": {
                          "type": "integer"
                        },
                        "failed": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (ETag match)"
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/policies/rsop": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get Resultant Set of Policy (RSoP) for an agent",
        "description": "Get the merged resultant set of policies for an agent, computed from all assigned policy objects with priority resolution. Supports ETag caching.",
        "operationId": "getAgentRsop",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "RSoP document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "hostname": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified (ETag match)"
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/vulnerabilities": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "List vulnerabilities for an agent",
        "description": "Get detected vulnerabilities for a specific agent with filtering and pagination.",
        "operationId": "listAgentVulnerabilities",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "open"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isKev",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "fixAvailable",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "software",
                "windows_os",
                "system"
              ]
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "product",
                "remediation"
              ]
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "cvssV3Score"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "DESC"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent vulnerabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/vulnerabilities/summary": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get vulnerability summary for an agent",
        "operationId": "getAgentVulnerabilitySummary",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent vulnerability summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get vulnerability summary for an agent. GET endpoint that returns summary from your tenant. Part of the TridentStack Control API."
      }
    },
    "/agents/{agentId}/vulnerabilities/scan": {
      "post": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Trigger vulnerability scan for an agent",
        "description": "Initiate a vulnerability scan for a specific agent. Rate limited to 3 per minute per agent.",
        "operationId": "scanAgentVulnerabilities",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "force": {
                    "type": "boolean",
                    "default": false
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "all",
                      "software",
                      "system"
                    ],
                    "default": "all"
                  },
                  "refreshFromAgent": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scan results or scan initiated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{agentId}/vulnerabilities/history": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get vulnerability history for an agent",
        "operationId": "getAgentVulnerabilityHistory",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Vulnerability history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get vulnerability history for an agent. GET endpoint that returns history from your tenant. Part of the TridentStack Control API."
      }
    },
    "/agents/{agentId}/vulnerabilities/{vulnId}/remediation-options": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get remediation options for a vulnerability on an agent",
        "operationId": "getVulnerabilityRemediationOptions",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "vulnId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Remediation options",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get remediation options for a vulnerability on an agent. GET endpoint that returns remediation options from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/summary": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get fleet-wide vulnerability summary",
        "operationId": "getVulnerabilitySummary",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Fleet vulnerability summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get fleet-wide vulnerability summary. GET endpoint that returns summary from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerabilities/by-cve/{cveId}": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get details for a specific CVE across the fleet",
        "operationId": "getVulnerabilityByCve",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "cveId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "CVE details with affected agents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get details for a specific CVE across the fleet. GET endpoint that returns by cve from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/details": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get detailed vulnerability list with filtering",
        "operationId": "getVulnerabilityDetails",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Vulnerability details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get detailed vulnerability list with filtering. GET endpoint that returns details from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/epss/{cveId}": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get EPSS score for a CVE",
        "operationId": "getEpssScore",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "cveId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "EPSS score data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get EPSS score for a CVE. GET endpoint that returns epss from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/dashboard": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get vulnerability dashboard data",
        "operationId": "getVulnerabilityDashboard",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Dashboard data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get vulnerability dashboard data. GET endpoint that returns dashboard from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerabilities/by-agent": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get vulnerability counts grouped by agent",
        "operationId": "getVulnerabilitiesByAgent",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Vulnerabilities by agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get vulnerability counts grouped by agent. GET endpoint that returns by agent from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerabilities/by-severity": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get vulnerability counts grouped by severity",
        "operationId": "getVulnerabilitiesBySeverity",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Vulnerabilities by severity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get vulnerability counts grouped by severity. GET endpoint that returns by severity from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerabilities/{id}/status": {
      "patch": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Update vulnerability status",
        "operationId": "updateVulnerabilityStatus",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "acknowledged",
                      "resolved",
                      "false_positive",
                      "risk_accepted"
                    ]
                  },
                  "notes": {
                    "type": "string",
                    "maxLength": 2000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update vulnerability status. PATCH endpoint that partially updates the status. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/history": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get fleet-wide vulnerability history",
        "operationId": "getVulnerabilityHistory",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Vulnerability history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get fleet-wide vulnerability history. GET endpoint that returns history from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/{id}": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get a specific vulnerability by ID",
        "operationId": "getVulnerability",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Vulnerability details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get a specific vulnerability by ID. GET endpoint that returns vulnerabilities from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerabilities/{id}/cves": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get CVEs associated with a vulnerability",
        "description": "Get CVE details for a specific vulnerability.",
        "operationId": "getVulnerabilityCves",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "CVE list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vulnerabilities/{cveId}/history": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get history for a specific CVE",
        "operationId": "getCveHistory",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "cveId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "CVE history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get history for a specific CVE. GET endpoint that returns history from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerability-exceptions": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "List vulnerability exceptions",
        "operationId": "listVulnerabilityExceptions",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "acceptable_risk",
                "compensating_control",
                "false_positive"
              ]
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cveId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiringWithin",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Days until expiration"
          },
          {
            "name": "global",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Exceptions list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exceptions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List vulnerability exceptions. GET endpoint that returns vulnerability exceptions from your tenant. Part of the TridentStack Control API."
      },
      "post": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Create a vulnerability exception",
        "operationId": "createVulnerabilityException",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "cveId",
                  "exceptionType",
                  "reason"
                ],
                "properties": {
                  "cveId": {
                    "type": "string"
                  },
                  "agentId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "If omitted, creates a global exception"
                  },
                  "exceptionType": {
                    "type": "string",
                    "enum": [
                      "acceptable_risk",
                      "compensating_control",
                      "false_positive"
                    ]
                  },
                  "reason": {
                    "type": "string"
                  },
                  "compensatingControlReference": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Exception created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exception": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Create a vulnerability exception. POST endpoint that creates or triggers vulnerability exceptions. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerability-exceptions/global": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "List global vulnerability exceptions",
        "operationId": "listGlobalVulnerabilityExceptions",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Global exceptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exceptions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List global vulnerability exceptions. GET endpoint that returns global from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerability-exceptions/summary": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Get vulnerability exception summary statistics",
        "operationId": "getVulnerabilityExceptionSummary",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Exception summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "globalCount": {
                      "type": "integer"
                    },
                    "expiringIn30Days": {
                      "type": "integer"
                    },
                    "byType": {
                      "type": "object",
                      "properties": {
                        "acceptable_risk": {
                          "type": "integer"
                        },
                        "compensating_control": {
                          "type": "integer"
                        },
                        "false_positive": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get vulnerability exception summary statistics. GET endpoint that returns summary from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerability-exceptions/check": {
      "get": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Check if a CVE is excepted",
        "operationId": "checkVulnerabilityException",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "cveId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Exception check result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "excepted": {
                      "type": "boolean"
                    },
                    "exception": {
                      "type": "object"
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "global",
                        "agent"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Check if a CVE is excepted. GET endpoint that returns check from your tenant. Part of the TridentStack Control API."
      }
    },
    "/vulnerability-exceptions/bulk": {
      "delete": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Bulk delete vulnerability exceptions",
        "operationId": "bulkDeleteVulnerabilityExceptions",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ids"
                ],
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Exceptions deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "deleted": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Bulk delete vulnerability exceptions. DELETE endpoint that removes the bulk. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/vulnerability-exceptions/{id}": {
      "put": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Update a vulnerability exception",
        "operationId": "updateVulnerabilityException",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exceptionType": {
                    "type": "string",
                    "enum": [
                      "acceptable_risk",
                      "compensating_control",
                      "false_positive"
                    ]
                  },
                  "reason": {
                    "type": "string"
                  },
                  "compensatingControlReference": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Exception updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exception": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update a vulnerability exception. PUT endpoint that replaces the vulnerability exceptions. Part of the TridentStack Control API."
      },
      "delete": {
        "tags": [
          "Vulnerabilities"
        ],
        "summary": "Delete a vulnerability exception",
        "operationId": "deleteVulnerabilityException",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Exception deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Delete a vulnerability exception. DELETE endpoint that removes the vulnerability exceptions. Part of the TridentStack Control API."
      }
    },
    "/compliance/frameworks": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "List all compliance frameworks",
        "description": "List all frameworks with coverage, evaluation metrics, and tag assignments.",
        "operationId": "listComplianceFrameworks",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Frameworks list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "summary": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/compliance/frameworks/{id}": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get compliance framework details",
        "operationId": "getComplianceFramework",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Framework details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get compliance framework details. GET endpoint that returns frameworks from your tenant. Part of the TridentStack Control API."
      }
    },
    "/compliance/frameworks/{id}/mapping-summary": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get mapping statistics for a framework",
        "operationId": "getFrameworkMappingSummary",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Mapping summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get mapping statistics for a framework. GET endpoint that returns mapping summary from your tenant. Part of the TridentStack Control API."
      }
    },
    "/compliance/frameworks/{id}/mappings": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get control-to-policy mappings for a framework",
        "operationId": "getFrameworkMappings",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Framework mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get control-to-policy mappings for a framework. GET endpoint that returns mappings from your tenant. Part of the TridentStack Control API."
      }
    },
    "/compliance/frameworks/{id}/controls": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "List controls for a framework",
        "description": "Get all controls with exemption status for a compliance framework.",
        "operationId": "listFrameworkControls",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Controls list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/frameworks/{id}/exemptions": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "List exemptions for a framework",
        "description": "Get all control exemptions for a framework, scoped to the current tenant.",
        "operationId": "listFrameworkExemptions",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Framework UUID or string ID"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Exemptions list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Compliance"
        ],
        "summary": "Apply exemptions to framework controls",
        "description": "Create or update exemptions for controls in a framework. Triggers score recalculation.",
        "operationId": "applyFrameworkExemptions",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Framework UUID or string ID"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "exemptions"
                ],
                "properties": {
                  "exemptions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "controlId",
                        "isExempt"
                      ],
                      "properties": {
                        "controlId": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "isExempt": {
                          "type": "boolean"
                        },
                        "reason": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Exemptions applied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "applied": {
                      "type": "integer"
                    },
                    "exempted": {
                      "type": "integer"
                    },
                    "unexempted": {
                      "type": "integer"
                    },
                    "changes": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/frameworks/{id}/tag-assignments": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "List tag assignments for a framework",
        "operationId": "listFrameworkTagAssignments",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag assignments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List tag assignments for a framework. GET endpoint that returns tag assignments from your tenant. Part of the TridentStack Control API."
      },
      "post": {
        "tags": [
          "Compliance"
        ],
        "summary": "Assign a tag to a compliance framework",
        "operationId": "createFrameworkTagAssignment",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tagId"
                ],
                "properties": {
                  "tagId": {
                    "type": "integer"
                  },
                  "levelFilter": {
                    "type": "string",
                    "default": "L1_AND_L2"
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "priority": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tag assigned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Assign a tag to a compliance framework. POST endpoint that creates or triggers tag assignments. Part of the TridentStack Control API."
      }
    },
    "/compliance/frameworks/{id}/tag-assignments/{assignmentId}": {
      "patch": {
        "tags": [
          "Compliance"
        ],
        "summary": "Update a framework tag assignment",
        "operationId": "updateFrameworkTagAssignment",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "levelFilter": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "priority": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assignment updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Update a framework tag assignment. PATCH endpoint that partially updates the tag assignments. Part of the TridentStack Control API."
      },
      "delete": {
        "tags": [
          "Compliance"
        ],
        "summary": "Remove a tag from a compliance framework",
        "operationId": "deleteFrameworkTagAssignment",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Assignment removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Remove a tag from a compliance framework. DELETE endpoint that removes the tag assignments. Part of the TridentStack Control API."
      }
    },
    "/compliance/dashboard": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get compliance dashboard data",
        "description": "Fleet-wide compliance summary with framework scores, top failing controls, and trend data.",
        "operationId": "getComplianceDashboard",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Dashboard data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/compliance/agents": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "List agents with compliance scores",
        "operationId": "listAgentsWithCompliance",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 200
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agents with compliance scores",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List agents with compliance scores. GET endpoint that returns agents from your tenant. Part of the TridentStack Control API."
      }
    },
    "/compliance/agents/{id}/compliance": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get compliance scores for an agent",
        "operationId": "getAgentCompliance",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent compliance scores",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scores": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "summary": {
                      "type": "object"
                    },
                    "evaluatedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get compliance scores for an agent. GET endpoint that returns compliance from your tenant. Part of the TridentStack Control API."
      }
    },
    "/compliance/agents/{id}/override-count": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get compliance override count for an agent",
        "operationId": "getAgentOverrideCount",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Override count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get compliance override count for an agent. GET endpoint that returns override count from your tenant. Part of the TridentStack Control API."
      }
    },
    "/compliance/agents/{id}/applicable-frameworks": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get applicable compliance frameworks for an agent",
        "description": "Returns frameworks assigned via tags, split by OS applicability.",
        "operationId": "getAgentApplicableFrameworks",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Applicable frameworks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasApplicableFrameworks": {
                      "type": "boolean"
                    },
                    "applicableCount": {
                      "type": "integer"
                    },
                    "applicableFrameworks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "notApplicableFrameworks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "agentOs": {
                      "type": "string"
                    },
                    "agentTags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "summary": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/agents/{id}/evaluate": {
      "post": {
        "tags": [
          "Compliance"
        ],
        "summary": "Evaluate compliance for an agent",
        "description": "Trigger a compliance evaluation. If the agent is online, requests fresh telemetry first (async, returns 202). If offline, evaluates with cached data (sync). Rate limited.",
        "operationId": "evaluateAgentCompliance",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "refreshFromAgent": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Synchronous evaluation complete",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "async": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "Async evaluation started, awaiting fresh telemetry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "async": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "parentEventId": {
                      "type": "integer"
                    },
                    "telemetryCommandSent": {
                      "type": "boolean"
                    },
                    "expectedChildren": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/agents/{id}/compliance/{frameworkId}/controls": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get control results for an agent and framework",
        "description": "Get per-control pass/fail results. frameworkId can be UUID or string ID.",
        "operationId": "getAgentFrameworkControls",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "passed",
                "failed",
                "unknown"
              ]
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "L1",
                "L2",
                "L3"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Control results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/compliance/agents/{id}/compliance/{frameworkId}/history": {
      "get": {
        "tags": [
          "Compliance"
        ],
        "summary": "Get compliance score history for an agent and framework",
        "operationId": "getAgentFrameworkHistory",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scoreType",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "combined"
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Score history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Get compliance score history for an agent and framework. GET endpoint that returns history from your tenant. Part of the TridentStack Control API."
      }
    },
    "/agent-tags": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List agent tags",
        "description": "List all agent tags with pagination and search.",
        "operationId": "listAgentTags",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "name"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ASC",
                "DESC"
              ],
              "default": "ASC"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tags list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Create an agent tag",
        "description": "Create a new agent tag. Name is auto-lowercased.",
        "operationId": "createAgentTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "systemUpdatePolicyId": {
                    "type": "integer"
                  },
                  "applicationConfigId": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tag created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "tag": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agent-tags/available-policies": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List available policies for tag assignment",
        "description": "Get system update policies and application configurations available for assignment.",
        "operationId": "listAvailablePolicies",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Available policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "systemPolicies": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "applicationConfigs": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agent-tags/available-config-policies": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List available ADMX-based configuration policies",
        "description": "Get configuration policies available for assignment to tags.",
        "operationId": "listAvailableConfigPolicies",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Available config policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agent-tags/available-compliance-frameworks": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List available compliance frameworks for tag assignment",
        "description": "Get compliance frameworks available for assignment to tags.",
        "operationId": "listAvailableComplianceFrameworks",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Available frameworks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agent-tags/{id}": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Get agent tag details",
        "description": "Get full tag details including members, policies, and compliance frameworks.",
        "operationId": "getAgentTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Update an agent tag",
        "description": "Update tag name, description, color, or policy assignments.",
        "operationId": "updateAgentTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "systemUpdatePolicyId": {
                    "type": "integer"
                  },
                  "applicationConfigId": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tag updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "tag": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "sensitiveTagRequiresPrivilegedKey": {
                    "summary": "A sensitive tag requires a privileged API key",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action reaches sensitive tag servers and needs an API key marked as privileged.",
                      "sensitiveTags": [
                        "servers"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Delete an agent tag",
        "description": "Delete a tag and cascade-remove all assignments.",
        "operationId": "deleteAgentTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "sensitiveTagRequiresPrivilegedKey": {
                    "summary": "A sensitive tag requires a privileged API key",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action reaches sensitive tag servers and needs an API key marked as privileged.",
                      "sensitiveTags": [
                        "servers"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/{id}/members": {
      "post": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Add agents to a tag",
        "description": "Bulk-add agents to a tag.",
        "operationId": "addTagMembers",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "agentIds"
                ],
                "properties": {
                  "agentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Agents processed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "results": {
                      "type": "object",
                      "properties": {
                        "added": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "alreadyTagged": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "sensitiveTagRequiresPrivilegedKey": {
                    "summary": "A sensitive tag requires a privileged API key",
                    "value": {
                      "error": "privileged_key_required",
                      "message": "This action reaches sensitive tag servers and needs an API key marked as privileged.",
                      "sensitiveTags": [
                        "servers"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/{tagId}/members/{agentId}": {
      "delete": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Remove an agent from a tag",
        "description": "Remove a specific agent from a tag.",
        "operationId": "removeTagMember",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent removed from tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/agents/{agentId}/tags": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List tags for an agent",
        "description": "Get all tags assigned to a specific agent.",
        "operationId": "listAgentTagsForAgent",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Add a tag to an agent",
        "description": "Assign a single tag to an agent.",
        "operationId": "addTagToAgent",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tagId"
                ],
                "properties": {
                  "tagId": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tag added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "tag": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Remove all tags from an agent",
        "description": "Remove all tag assignments from a specific agent.",
        "operationId": "removeAllAgentTags",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "All tags removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "deletedCount": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/agents/{agentId}/tags/{tagId}": {
      "delete": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Remove a specific tag from an agent",
        "description": "Remove a single tag from a specific agent.",
        "operationId": "removeTagFromAgent",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/{id}/config-policies": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List configuration policies assigned to a tag",
        "description": "Get ADMX-based configuration policies assigned to this tag.",
        "operationId": "listTagConfigPolicies",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Config policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configPolicies": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Assign a configuration policy to a tag",
        "description": "Add an ADMX-based configuration policy to a tag.",
        "operationId": "addConfigPolicyToTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "policyObjectId"
                ],
                "properties": {
                  "policyObjectId": {
                    "type": "integer"
                  },
                  "priority": {
                    "type": "integer",
                    "default": 100
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Policy assigned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/{tagId}/config-policies/{assignmentId}": {
      "patch": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Update a config policy assignment on a tag",
        "description": "Update priority or enabled state.",
        "operationId": "updateTagConfigPolicy",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priority": {
                    "type": "integer"
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "notes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assignment updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Remove a config policy from a tag",
        "description": "Remove an ADMX-based configuration policy from a tag.",
        "operationId": "removeConfigPolicyFromTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Policy removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/{id}/compliance-frameworks": {
      "get": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "List compliance frameworks assigned to a tag",
        "description": "Get compliance frameworks assigned to this tag.",
        "operationId": "listTagComplianceFrameworks",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Compliance frameworks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "frameworks": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "tagId": {
                      "type": "integer"
                    },
                    "tagName": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Assign a compliance framework to a tag",
        "description": "Add a compliance framework to a tag for agent evaluation.",
        "operationId": "addComplianceFrameworkToTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "frameworkId"
                ],
                "properties": {
                  "frameworkId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "levelFilter": {
                    "type": "string",
                    "default": "ALL"
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "priority": {
                    "type": "integer",
                    "default": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Framework assigned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent-tags/{tagId}/compliance-frameworks/{assignmentId}": {
      "patch": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Update a compliance framework assignment on a tag",
        "description": "Update level filter, enabled state, or priority.",
        "operationId": "updateTagComplianceFramework",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "levelFilter": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assignment updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "assignment": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Remove a compliance framework from a tag",
        "description": "Remove a compliance framework assignment from a tag.",
        "operationId": "removeComplianceFrameworkFromTag",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tagId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Framework removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/automation/rules": {
      "get": {
        "tags": [
          "Automation"
        ],
        "summary": "List automation rules",
        "operationId": "get_automation_rules",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get all tag automation rules with pagination and filtering.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Sort field",
            "schema": {
              "type": "string",
              "default": "priority"
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "description": "Sort direction",
            "schema": {
              "type": "string",
              "default": "DESC",
              "enum": [
                "ASC",
                "DESC"
              ]
            }
          },
          {
            "name": "tagId",
            "in": "query",
            "description": "Filter by tag ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "isEnabled",
            "in": "query",
            "description": "Filter by enabled state",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Automation"
        ],
        "summary": "Create automation rule",
        "operationId": "post_automation_rules",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Rule created successfully"
          }
        },
        "description": "Create a new tag automation rule with conditions and scheduling.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tagId": {
                    "type": "integer",
                    "nullable": true
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "integer",
                    "default": 100
                  },
                  "isEnabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "conditionGroups": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "schedule": {
                    "type": "string"
                  },
                  "scheduleEnabled": {
                    "type": "boolean"
                  },
                  "runOnNewAgent": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "tagId",
                  "name"
                ]
              }
            }
          },
          "description": "Rule definition"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/automation/rules/{id}": {
      "get": {
        "tags": [
          "Automation"
        ],
        "summary": "Get automation rule",
        "operationId": "get_automation_rules_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get details of a specific automation rule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "patch": {
        "tags": [
          "Automation"
        ],
        "summary": "Update automation rule",
        "operationId": "patch_automation_rules_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update an existing automation rule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "Rule fields to update"
        }
      },
      "delete": {
        "tags": [
          "Automation"
        ],
        "summary": "Delete automation rule",
        "operationId": "delete_automation_rules_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Delete an automation rule and convert its assignments to manual.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/automation/rules/{id}/toggle": {
      "post": {
        "tags": [
          "Automation"
        ],
        "summary": "Toggle automation rule",
        "operationId": "post_automation_rules_id_toggle",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Toggle an automation rule between enabled and disabled.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/automation/rules/{id}/duplicate": {
      "post": {
        "tags": [
          "Automation"
        ],
        "summary": "Duplicate automation rule",
        "operationId": "post_automation_rules_id_duplicate",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Duplicate created"
          }
        },
        "description": "Create a copy of an existing rule (disabled by default).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "description": "Optional new name"
        }
      }
    },
    "/automation/preview": {
      "post": {
        "tags": [
          "Automation"
        ],
        "summary": "Preview rule conditions",
        "operationId": "post_automation_preview",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Preview which agents would match given conditions without saving a rule.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conditionGroups": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "tagId": {
                    "type": "integer"
                  }
                },
                "required": [
                  "conditionGroups"
                ]
              }
            }
          },
          "description": "Conditions to preview"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/automation/preview/{id}": {
      "get": {
        "tags": [
          "Automation"
        ],
        "summary": "Preview saved rule",
        "operationId": "get_automation_preview_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Preview which agents would match a saved automation rule.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/automation/assignment-history": {
      "get": {
        "tags": [
          "Automation"
        ],
        "summary": "Get assignment history",
        "operationId": "get_automation_assignment_history",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get history of all tag assignments with rule and criteria information.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "agentId",
            "in": "query",
            "description": "Filter by agent ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tagId",
            "in": "query",
            "description": "Filter by tag ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignedBy",
            "in": "query",
            "description": "Filter by assignment source",
            "schema": {
              "type": "string",
              "enum": [
                "manual",
                "automation"
              ]
            }
          },
          {
            "name": "ruleId",
            "in": "query",
            "description": "Filter by rule ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/collect-logs": {
      "post": {
        "tags": [
          "Log Collection"
        ],
        "summary": "Trigger log collection",
        "operationId": "post_agents_agentId_collect_logs",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "202": {
            "description": "Collection queued"
          },
          "409": {
            "description": "Collection already in progress"
          }
        },
        "description": "Trigger log collection from an agent. Commands are queued for offline agents.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "includeConfig": {
                    "type": "boolean",
                    "default": true
                  },
                  "maxSizeMb": {
                    "type": "integer",
                    "default": 25,
                    "minimum": 1,
                    "maximum": 25
                  }
                }
              }
            }
          },
          "description": "Collection options"
        }
      }
    },
    "/agents/{agentId}/log-collections": {
      "get": {
        "tags": [
          "Log Collection"
        ],
        "summary": "List agent log collections",
        "operationId": "get_agents_agentId_log_collections",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List log collections for a specific agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/log-collections/{collectionId}": {
      "get": {
        "tags": [
          "Log Collection"
        ],
        "summary": "Get log collection details",
        "operationId": "get_agents_agentId_log_collections_collectionId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get details of a specific log collection.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "description": "Collection UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/log-collections/{collectionId}/download": {
      "get": {
        "tags": [
          "Log Collection"
        ],
        "summary": "Download log bundle",
        "operationId": "get_agents_agentId_log_collections_collectionId_download",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Download the collected log bundle as a tar.gz archive.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "collectionId",
            "in": "path",
            "required": true,
            "description": "Collection UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/log-collections": {
      "get": {
        "tags": [
          "Log Collection"
        ],
        "summary": "List all tenant log collections",
        "operationId": "get_log_collections",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List all log collections for the current tenant.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/network/fleet": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get fleet network overview",
        "operationId": "get_agents_network_fleet",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get network exposure overview across all agents.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/network/high-risk": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get high-risk ports",
        "operationId": "get_agents_network_high_risk",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get agents with high-risk open ports.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/network/ports": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get agent open ports",
        "operationId": "get_agents_agentId_network_ports",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get list of open ports for a specific agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/network/history": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get port scan history",
        "operationId": "get_agents_agentId_network_history",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get historical port scan data for an agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/network/summary": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get network summary",
        "operationId": "get_agents_agentId_network_summary",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get network exposure summary for an agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/network/ports/{port}/timeline": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get port timeline",
        "operationId": "get_agents_agentId_network_ports_port_timeline",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get timeline history for a specific port on an agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "description": "Port number",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/network/refresh": {
      "post": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Refresh network scan",
        "operationId": "post_agents_agentId_network_refresh",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Trigger a network port scan refresh for an agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/network/ports/{port}": {
      "get": {
        "tags": [
          "Network Exposure"
        ],
        "summary": "Get port details",
        "operationId": "get_agents_agentId_network_ports_port",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get detailed information about a specific open port.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "description": "Port number",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/linux-updates/install": {
      "post": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "Install Linux packages",
        "operationId": "post_agents_agentId_linux_updates_install",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "202": {
            "description": "Installation started"
          }
        },
        "description": "Trigger package installation on a Linux agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "packages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "vulnerabilityIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "installAll": {
                    "type": "boolean",
                    "default": false
                  },
                  "securityOnly": {
                    "type": "boolean",
                    "default": false
                  },
                  "rebootBehavior": {
                    "type": "string",
                    "enum": [
                      "defer",
                      "immediate",
                      "scheduled"
                    ],
                    "default": "defer"
                  }
                }
              }
            }
          },
          "description": "Installation parameters"
        }
      }
    },
    "/agents/{agentId}/linux-updates/tasks/{taskId}": {
      "get": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "Get Linux update task status",
        "operationId": "get_agents_agentId_linux_updates_tasks_taskId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get status of a Linux update installation task.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "description": "Task ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/linux-updates/available": {
      "get": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "Get available Linux updates",
        "operationId": "get_agents_agentId_linux_updates_available",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get available package updates for a Linux agent from telemetry data.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/linux-updates/applicable": {
      "get": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "Get applicable Linux updates",
        "operationId": "get_agents_agentId_linux_updates_applicable",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get policy-filtered applicable updates for a Linux agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-update-policies/{policyId}/linux-approvals": {
      "post": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "Approve/reject Linux advisories",
        "operationId": "post_system_update_policies_policyId_linux_approvals",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Approve or reject Linux security advisories for a policy.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "description": "Policy ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "advisoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "reject"
                    ],
                    "default": "approve"
                  }
                },
                "required": [
                  "advisoryIds"
                ]
              }
            }
          },
          "description": "Approval request"
        }
      },
      "get": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "List Linux advisory approvals",
        "operationId": "get_system_update_policies_policyId_linux_approvals",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get approved advisories for a policy with pagination.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "description": "Policy ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by approval status",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/system-update-policies/{policyId}/linux-approvals/bulk": {
      "post": {
        "tags": [
          "Linux Updates"
        ],
        "summary": "Bulk approve/reject Linux advisories",
        "operationId": "post_system_update_policies_policyId_linux_approvals_bulk",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Bulk approve or reject Linux security advisories for a policy.",
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "description": "Policy ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "advisoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "reject"
                    ],
                    "default": "approve"
                  }
                },
                "required": [
                  "advisoryIds"
                ]
              }
            }
          },
          "description": "Bulk approval request"
        }
      }
    },
    "/licensing/summary": {
      "get": {
        "tags": [
          "Licensing"
        ],
        "summary": "Get license summary",
        "operationId": "get_licensing_summary",
        "responses": {
          "200": {
            "description": "License summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "totalLicensed": {
                      "type": "integer"
                    },
                    "usedLicenses": {
                      "type": "integer"
                    },
                    "totalAgents": {
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "agentId": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "hostname": {
                            "type": "string"
                          },
                          "ipAddress": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "isLicensed": {
                            "type": "boolean"
                          },
                          "registeredAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "operatingSystem": {
                            "type": "string"
                          },
                          "platform": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string",
                            "format": "uuid",
                            "description": "The Organization (or your main account) the endpoint lives in. Send as X-Tenant-Id to act on it."
                          },
                          "organizationName": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "License usage for your account. Licensing covers your main account and every Organization, so the totals do too. With `withAgents=true`, each endpoint row names the Organization it lives in; to read or remove that endpoint through the Agents endpoints, send its `organizationId` in the `X-Tenant-Id` header. Rows are limited to the Organizations this key can reach.",
        "parameters": [
          {
            "name": "withAgents",
            "in": "query",
            "description": "Set to `true` to include the per-endpoint `agents` rows. Without it the response may carry only the totals.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/licensing/assign": {
      "post": {
        "tags": [
          "Licensing"
        ],
        "summary": "Assign license",
        "operationId": "post_licensing_assign",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Assign a license to an agent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "agentId"
                ]
              }
            }
          },
          "description": "Agent to license"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/licensing/unassign": {
      "post": {
        "tags": [
          "Licensing"
        ],
        "summary": "Unassign license",
        "operationId": "post_licensing_unassign",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Unassign a license from an agent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "agentId"
                ]
              }
            }
          },
          "description": "Agent to unlicense"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/enrollment-tokens": {
      "get": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Get enrollment token",
        "operationId": "get_enrollment_tokens",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get enrollment token. GET endpoint that returns enrollment tokens from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Create enrollment token",
        "operationId": "post_enrollment_tokens",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Token created"
          },
          "409": {
            "description": "Token already exists"
          }
        },
        "description": "Create enrollment token. POST endpoint that creates or triggers enrollment tokens. Part of the TridentStack Control API.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "maxUses": {
                    "type": "integer"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          },
          "description": "Token details"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/enrollment-tokens/{id}": {
      "get": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Get enrollment token details",
        "operationId": "get_enrollment_tokens_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get enrollment token details. GET endpoint that returns enrollment tokens from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Token ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "put": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Update enrollment token",
        "operationId": "put_enrollment_tokens_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update enrollment token. PUT endpoint that replaces the enrollment tokens. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Token ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "maxUses": {
                    "type": "integer",
                    "nullable": true
                  },
                  "isActive": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "description": "Token fields to update"
        }
      },
      "delete": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Deactivate enrollment token",
        "operationId": "delete_enrollment_tokens_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Deactivate enrollment token. DELETE endpoint that removes the enrollment tokens. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Token ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/enrollment-tokens/{id}/agents": {
      "get": {
        "tags": [
          "Enrollment"
        ],
        "summary": "List agents enrolled via token",
        "operationId": "get_enrollment_tokens_id_agents",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List agents enrolled via token. GET endpoint that returns agents from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Token ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/enrollment-tokens/{id}/regenerate": {
      "post": {
        "tags": [
          "Enrollment"
        ],
        "summary": "Regenerate enrollment token",
        "operationId": "post_enrollment_tokens_id_regenerate",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Regenerate enrollment token. POST endpoint that creates or triggers regenerate. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Token ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/settings": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get all settings",
        "operationId": "get_settings",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get all settings. GET endpoint that returns settings from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "keys",
            "in": "query",
            "description": "Comma-separated list of specific keys to retrieve",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "put": {
        "tags": [
          "Settings"
        ],
        "summary": "Update settings",
        "operationId": "put_settings",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update settings. PUT endpoint that replaces the settings. Part of the TridentStack Control API.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "Key-value pairs to update"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/settings/client-config": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get client configuration",
        "operationId": "get_settings_client_config",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get client configuration as a structured object. Used by agents and external integrations.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/settings/agent-update-rollout": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get agent update rollout settings",
        "operationId": "get_settings_agent_update_rollout",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get agent update rollout settings. GET endpoint that returns agent update rollout from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "put": {
        "tags": [
          "Settings"
        ],
        "summary": "Update agent update rollout settings",
        "operationId": "put_settings_agent_update_rollout",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update agent update rollout settings. PUT endpoint that replaces the agent update rollout. Part of the TridentStack Control API.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pilotDevices": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "autoAdvanceAfterPilot": {
                    "type": "boolean",
                    "default": true
                  },
                  "rolloutSpeed": {
                    "type": "string",
                    "enum": [
                      "conservative",
                      "moderate",
                      "aggressive"
                    ],
                    "default": "moderate"
                  },
                  "pilotTimeoutHours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 168,
                    "default": 48
                  }
                }
              }
            }
          },
          "description": "Rollout settings"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/settings/agent-update-rollout/status": {
      "get": {
        "tags": [
          "Settings"
        ],
        "summary": "Get active rollout status",
        "operationId": "get_settings_agent_update_rollout_status",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get active rollout status. GET endpoint that returns status from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/reports/templates": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get report templates",
        "operationId": "get_reports_templates",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get report templates. GET endpoint that returns templates from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/reports/saved": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "List saved reports",
        "operationId": "get_reports_saved",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List saved reports. GET endpoint that returns saved from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Save a new report",
        "operationId": "post_reports_saved",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Report saved"
          }
        },
        "description": "Save a new report. POST endpoint that creates or triggers saved. Part of the TridentStack Control API.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "queryType": {
                    "type": "string",
                    "enum": [
                      "visual",
                      "sql"
                    ]
                  },
                  "queryConfig": {
                    "type": "object"
                  },
                  "category": {
                    "type": "string"
                  },
                  "isPublic": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "name",
                  "queryType",
                  "queryConfig"
                ]
              }
            }
          },
          "description": "Report to save"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/reports/saved/{id}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get saved report",
        "operationId": "get_reports_saved_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get saved report. GET endpoint that returns saved from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Report ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "put": {
        "tags": [
          "Reports"
        ],
        "summary": "Update saved report",
        "operationId": "put_reports_saved_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update saved report. PUT endpoint that replaces the saved. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Report ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "queryType": {
                    "type": "string",
                    "enum": [
                      "visual",
                      "sql"
                    ]
                  },
                  "queryConfig": {
                    "type": "object"
                  },
                  "category": {
                    "type": "string"
                  },
                  "isPublic": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "queryType",
                  "queryConfig"
                ]
              }
            }
          },
          "description": "Report fields to update"
        }
      },
      "delete": {
        "tags": [
          "Reports"
        ],
        "summary": "Delete saved report",
        "operationId": "delete_reports_saved_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Delete saved report. DELETE endpoint that removes the saved. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Report ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/reports/saved/{id}/run": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Run saved report",
        "operationId": "post_reports_saved_id_run",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Run saved report. POST endpoint that creates or triggers run. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Report ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "description": "Query timeout in ms",
            "schema": {
              "type": "integer",
              "default": 30000
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max rows",
            "schema": {
              "type": "integer",
              "default": 1000
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/reports/saved/{id}/clone": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Clone saved report",
        "operationId": "post_reports_saved_id_clone",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Report cloned"
          }
        },
        "description": "Clone saved report. POST endpoint that creates or triggers clone. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Report ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/reports/templates/{id}/clone": {
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Clone report template",
        "operationId": "post_reports_templates_id_clone",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Template cloned"
          }
        },
        "description": "Clone report template. POST endpoint that creates or triggers clone. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/dashboards": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "List dashboards",
        "operationId": "get_dashboards",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List dashboards. GET endpoint that returns dashboards from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Create dashboard",
        "operationId": "post_dashboards",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Dashboard created"
          }
        },
        "description": "Create dashboard. POST endpoint that creates or triggers dashboards. Part of the TridentStack Control API.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "widgets": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "layoutConfig": {
                    "type": "object"
                  },
                  "isGlobal": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          },
          "description": "Dashboard details"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/dashboards/default": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get default dashboard",
        "operationId": "get_dashboards_default",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get default dashboard. GET endpoint that returns default from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/dashboards/{id}": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get dashboard",
        "operationId": "get_dashboards_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get dashboard. GET endpoint that returns dashboards from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dashboard ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "put": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Update dashboard",
        "operationId": "put_dashboards_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update dashboard. PUT endpoint that replaces the dashboards. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dashboard ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "widgets": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "layoutConfig": {
                    "type": "object"
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "description": "Dashboard fields to update"
        }
      },
      "delete": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Delete dashboard",
        "operationId": "delete_dashboards_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Delete dashboard. DELETE endpoint that removes the dashboards. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dashboard ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/dashboards/{id}/clone": {
      "post": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Clone dashboard",
        "operationId": "post_dashboards_id_clone",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Dashboard cloned"
          }
        },
        "description": "Clone dashboard. POST endpoint that creates or triggers clone. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dashboard ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "description": "Clone options"
        }
      }
    },
    "/dashboards/{id}/set-default": {
      "put": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Set default dashboard",
        "operationId": "put_dashboards_id_set_default",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Set default dashboard. PUT endpoint that replaces the set default. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dashboard ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/dashboards/{id}/widgets": {
      "put": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Update dashboard widgets",
        "operationId": "put_dashboards_id_widgets",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update dashboard widgets. PUT endpoint that replaces the widgets. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Dashboard ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "widgets": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                },
                "required": [
                  "widgets"
                ]
              }
            }
          },
          "description": "Widgets array"
        }
      }
    },
    "/correlation/{correlationId}": {
      "get": {
        "tags": [
          "Correlation"
        ],
        "summary": "Get correlated events",
        "operationId": "get_correlation_correlationId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get all events sharing a correlation ID in chronological order.",
        "parameters": [
          {
            "name": "correlationId",
            "in": "path",
            "required": true,
            "description": "Correlation UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/correlation/{correlationId}/tree": {
      "get": {
        "tags": [
          "Correlation"
        ],
        "summary": "Get correlation tree",
        "operationId": "get_correlation_correlationId_tree",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get hierarchical tree view of correlated events.",
        "parameters": [
          {
            "name": "correlationId",
            "in": "path",
            "required": true,
            "description": "Correlation UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agents/{agentId}/applicable-applications": {
      "get": {
        "tags": [
          "Application Updates"
        ],
        "summary": "Get applicable application updates",
        "operationId": "get_agents_agentId_applicable_applications",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get application updates applicable to an agent.",
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "description": "Agent UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/security-policies/definitions": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List security policy definitions",
        "operationId": "get_security_policies_definitions",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List security policy definitions. GET endpoint that returns definitions from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/security-policies/definitions/{id}": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get security policy definition",
        "operationId": "get_security_policies_definitions_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get security policy definition. GET endpoint that returns definitions from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Definition ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/security-policies/categories": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get security policy categories",
        "operationId": "get_security_policies_categories",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get security policy categories. GET endpoint that returns categories from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/security-policies/status": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get security policy sync status",
        "operationId": "get_security_policies_status",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get security policy sync status. GET endpoint that returns status from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/security-policies/policy-objects/{policyObjectId}/security-settings": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get security settings for policy object",
        "operationId": "get_security_policies_policy_objects_policyObjectId_security_settings",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get security settings for policy object. GET endpoint that returns security settings from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Configure security setting",
        "operationId": "post_security_policies_policy_objects_policyObjectId_security_settings",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Setting configured"
          }
        },
        "description": "Configure security setting. POST endpoint that creates or triggers security settings. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "securityPolicyDefinitionId": {
                    "type": "integer"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "Enabled",
                      "Disabled",
                      "NotConfigured"
                    ],
                    "default": "Enabled"
                  },
                  "configuredValue": {
                    "type": "object"
                  },
                  "configuredTrustees": {
                    "type": "array"
                  },
                  "configuredAuditFlags": {
                    "type": "object"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "isOverride": {
                    "type": "boolean"
                  },
                  "overrideReason": {
                    "type": "string"
                  }
                },
                "required": [
                  "securityPolicyDefinitionId"
                ]
              }
            }
          },
          "description": "Security setting configuration"
        }
      }
    },
    "/security-policies/policy-objects/{policyObjectId}/security-settings/{configId}": {
      "put": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update security setting",
        "operationId": "put_security_policies_policy_objects_policyObjectId_security_settings_configId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update security setting. PUT endpoint that replaces the security settings. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "description": "Config ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "Security setting fields to update"
        }
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Remove security setting",
        "operationId": "delete_security_policies_policy_objects_policyObjectId_security_settings_configId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Remove security setting. DELETE endpoint that removes the security settings. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "description": "Config ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/security-policies/policy-objects/{policyObjectId}/security-settings/summary": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get security settings summary",
        "operationId": "get_security_policies_policy_objects_policyObjectId_security_settings_summary",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get security settings summary. GET endpoint that returns summary from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/service-policies/definitions": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "List service policy definitions",
        "operationId": "get_service_policies_definitions",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get all Windows service policy definitions with filtering and pagination.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or display name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Filter by category",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "description": "Filter by enabled status",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Results limit",
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Results offset",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/service-policies/definitions/{id}": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get service policy definition",
        "operationId": "get_service_policies_definitions_id",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get a single service policy definition.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Definition ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/service-policies/policy-objects/{policyObjectId}/service-settings": {
      "get": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Get service settings for policy object",
        "operationId": "get_service_policies_policy_objects_policyObjectId_service_settings",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get all configured service settings for a policy object.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Configure service setting",
        "operationId": "post_service_policies_policy_objects_policyObjectId_service_settings",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "201": {
            "description": "Setting configured"
          }
        },
        "description": "Add or upsert a service setting configuration.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "servicePolicyDefinitionId": {
                    "type": "integer"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "Enabled",
                      "Disabled"
                    ],
                    "default": "Enabled"
                  },
                  "configuredStartupType": {
                    "type": "string"
                  },
                  "stopIfRunning": {
                    "type": "boolean",
                    "default": false
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "servicePolicyDefinitionId"
                ]
              }
            }
          },
          "description": "Service setting configuration"
        }
      }
    },
    "/service-policies/policy-objects/{policyObjectId}/service-settings/{configId}": {
      "put": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Update service setting",
        "operationId": "put_service_policies_policy_objects_policyObjectId_service_settings_configId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Update a specific service setting configuration.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "description": "Config ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "description": "Service setting fields to update"
        }
      },
      "delete": {
        "tags": [
          "Configuration Policies"
        ],
        "summary": "Remove service setting",
        "operationId": "delete_service_policies_policy_objects_policyObjectId_service_settings_configId",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Remove a service setting configuration.",
        "parameters": [
          {
            "name": "policyObjectId",
            "in": "path",
            "required": true,
            "description": "Policy Object ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "configId",
            "in": "path",
            "required": true,
            "description": "Config ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/upgrade-packages/active": {
      "get": {
        "tags": [
          "Windows Updates"
        ],
        "summary": "List active upgrade packages",
        "operationId": "get_upgrade_packages_active",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "List active Windows feature upgrade packages available for deployment.",
        "parameters": [
          {
            "name": "architecture",
            "in": "query",
            "description": "Filter by architecture",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/metrics/agents/timeline": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get agent metrics timeline",
        "operationId": "get_metrics_agents_timeline",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get agent metrics timeline. GET endpoint that returns timeline from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "timeRange",
            "in": "query",
            "description": "Time range",
            "schema": {
              "type": "string",
              "default": "24h",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d",
                "90d"
              ]
            }
          },
          {
            "name": "metricType",
            "in": "query",
            "description": "Metric to query",
            "schema": {
              "type": "string",
              "default": "online_count",
              "enum": [
                "online_count",
                "offline_count",
                "health_score",
                "total_count"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/metrics/agents/multi-series": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get agent metrics multi-series",
        "operationId": "get_metrics_agents_multi_series",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get agent metrics multi-series. GET endpoint that returns multi series from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "timeRange",
            "in": "query",
            "description": "Time range",
            "schema": {
              "type": "string",
              "default": "24h",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d",
                "90d"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/metrics/deployments/timeline": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get deployment metrics timeline",
        "operationId": "get_metrics_deployments_timeline",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get deployment metrics timeline. GET endpoint that returns timeline from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "timeRange",
            "in": "query",
            "description": "Time range",
            "schema": {
              "type": "string",
              "default": "7d",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d",
                "90d"
              ]
            }
          },
          {
            "name": "ringId",
            "in": "query",
            "description": "Deployment ring ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "metricType",
            "in": "query",
            "description": "Metric type",
            "schema": {
              "type": "string",
              "default": "success_rate"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/metrics/security/timeline": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get security metrics timeline",
        "operationId": "get_metrics_security_timeline",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get security metrics timeline. GET endpoint that returns timeline from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "timeRange",
            "in": "query",
            "description": "Time range",
            "schema": {
              "type": "string",
              "default": "7d",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d",
                "90d"
              ]
            }
          },
          {
            "name": "metricType",
            "in": "query",
            "description": "Metric type",
            "schema": {
              "type": "string",
              "default": "vulnerability_count",
              "enum": [
                "vulnerability_count",
                "compliance_score",
                "patch_coverage"
              ]
            }
          },
          {
            "name": "severity",
            "in": "query",
            "description": "Filter by severity",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "frameworkId",
            "in": "query",
            "description": "Filter by compliance framework ID",
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/metrics/infrastructure/timeline": {
      "get": {
        "tags": [
          "Dashboards"
        ],
        "summary": "Get infrastructure metrics timeline",
        "operationId": "get_metrics_infrastructure_timeline",
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "Get infrastructure metrics timeline. GET endpoint that returns timeline from your tenant. Part of the TridentStack Control API.",
        "parameters": [
          {
            "name": "timeRange",
            "in": "query",
            "description": "Time range",
            "schema": {
              "type": "string",
              "default": "1h",
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d",
                "30d",
                "90d"
              ]
            }
          },
          {
            "name": "metricType",
            "in": "query",
            "description": "Metric type",
            "schema": {
              "type": "string",
              "default": "api.latency_ms"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "Filter by service name",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ]
      }
    },
    "/agent-tags/{id}/sensitive": {
      "put": {
        "tags": [
          "Agent Tags"
        ],
        "summary": "Mark or unmark an agent tag as sensitive",
        "description": "Change whether an agent tag is sensitive. This action requires a signed-in browser session, the x-csrf-token header, and an identity check. API keys receive a 400 response with the error: 'This action requires a signed-in user.'",
        "operationId": "setAgentTagSensitive",
        "security": [
          {
            "SessionCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/OrganizationHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "isSensitive"
                ],
                "properties": {
                  "isSensitive": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tag sensitivity updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "isSensitive"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "name": {
                      "type": "string"
                    },
                    "isSensitive": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error, or API key authentication was used. API keys receive the error: This action requires a signed-in user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "apiKeyRequiresSignedInUser": {
                    "summary": "API keys cannot change tag sensitivity",
                    "value": {
                      "error": "This action requires a signed-in user."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Identity verification required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "sudoRequired": {
                    "summary": "Identity verification required",
                    "value": {
                      "error": "sudo_required"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "List Organizations",
        "operationId": "listOrganizations",
        "description": "Lists the Organizations this key can work in, for accounts that manage Organizations. Send an Organization's `id` in the `X-Tenant-Id` header to list, read or remove that Organization's endpoints, and to use any other endpoint inside it. Returns `mspEnabled: false` and an empty list for an account that does not manage Organizations.",
        "parameters": [
          {
            "name": "includeArchived",
            "in": "query",
            "description": "Include archived Organizations (each carries `archived: true`).",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organizations the key can reach",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mspEnabled": {
                      "type": "boolean"
                    },
                    "clients": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Send as X-Tenant-Id."
                          },
                          "tenantKey": {
                            "type": "string"
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "New endpoints enroll here by default."
                          },
                          "archived": {
                            "type": "boolean"
                          },
                          "endpointCount": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  }
}
