{
  "openapi": "3.0.3",
  "info": {
    "title": "API Publica Portal",
    "version": "2.0.0",
    "description": "Public REST API for portal"
  },
  "servers": [
    {
      "url": "https://api.flexxible.net",
      "description": "Portal API (production)"
    }
  ],
  "tags": [
    {
      "name": "Digital activity",
      "description": "Creation of core process groups by organization"
    },
    {
      "name": "Roles",
      "description": "Endpoint de creacion de roles de organizacion"
    },
    {
      "name": "Usuarios",
      "description": "Endpoint de creacion de usuarios de organizacion"
    },
    {
      "name": "Grupos de workspaces",
      "description": "Endpoints de gestión de grupos de workspaces"
    },
    {
      "name": "Workspaces",
      "description": "Endpoint de eliminacion de workspaces de la organizacion"
    },
    {
      "name": "Aplicaciones instaladas",
      "description": "Endpoint de detalle de aplicación instalada de la organización"
    },
    {
      "name": "Autenticación",
      "description": "Endpoints de autenticación y contexto de sesión"
    },
    {
      "name": "Microservicios",
      "description": "Detalle de microservicios por organizacion"
    },
    {
      "name": "Operaciones",
      "description": "Consulta de detalle de operaciones por organización"
    },
    {
      "name": "Organización",
      "description": "Operaciones de organización"
    },
    {
      "name": "Objetivos de política de parches",
      "description": "Endpoints de gestión de objetivos de política de parches"
    },
    {
      "name": "Configuraciones de producto",
      "description": "Endpoints de gestión de configuraciones de producto"
    },
    {
      "name": "Grupos de reporte",
      "description": "Operaciones sobre grupos de reporte"
    },
    {
      "name": "Sesiones",
      "description": "Endpoint de detalle de sesion de la organizacion"
    },
    {
      "name": "Tenants",
      "description": "Endpoints de gestión de tenants"
    }
  ],
  "paths": {
    "/v2/organizations/{organization_id}/digital-activity/core-process-groups": {
      "post": {
        "tags": [
          "Digital activity"
        ],
        "summary": "Create Core Process Group",
        "operationId": "createDigitalActivityCoreProcessGroup",
        "description": "Create a core process group in the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDigitalActivityCoreProcessGroupRequestV2"
              },
              "examples": {
                "create_with_description": {
                  "summary": "Create group with description",
                  "value": {
                    "name": "Grupo base de productividad",
                    "description": "Grupo principal para procesos de productividad",
                    "workspace_group_id": "64f0c2a1b2d3e4f506070822"
                  }
                },
                "create_without_description": {
                  "summary": "Create group without description",
                  "value": {
                    "name": "Grupo de edición",
                    "workspace_group_id": "64f0c2a1b2d3e4f506070823"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Core process group created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDigitalActivityCoreProcessGroupResponseV2"
                },
                "examples": {
                  "created": {
                    "summary": "Resource created",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070811",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Grupo base de productividad",
                      "description": "Grupo principal para procesos de productividad",
                      "workspace_group_id": "64f0c2a1b2d3e4f506070822"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_body": {
                    "summary": "Invalid request body",
                    "value": {
                      "error": {
                        "message": "Cuerpo de solicitud inválido",
                        "code": "bad_request",
                        "details": "name y workspace_group_id son obligatorios y deben cumplir el formato esperado."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Related resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Business conflict for resource creation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "duplicate_name": {
                    "summary": "Name already registered",
                    "value": {
                      "error": {
                        "message": "Ya existe un grupo de procesos core con ese nombre",
                        "code": "core_process_group_name_already_exists"
                      }
                    }
                  },
                  "workspace_group_already_assigned": {
                    "summary": "Workspace group already assigned",
                    "value": {
                      "error": {
                        "message": "El grupo de workspaces ya está asignado a otro grupo de procesos core",
                        "code": "core_process_group_workspace_group_already_assigned"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "List Core Process Groups",
        "operationId": "listDigitalActivityCoreProcessGroups",
        "description": "Returns a paginated list of core process groups of the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields separated by commas for each element.",
            "example": "id,name,workspace_group_id"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Filter by name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"core\"}"
              },
              "complex-and": {
                "summary": "Filter by organization and group",
                "value": "{\"and\":[{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439011\"},{\"field\":\"workspace_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070822\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND",
                "value": "{\"and\":[{\"or\":[{\"field\":\"id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070811\"},{\"field\":\"workspace_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070823\"}]},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"group\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`).",
            "example": "organization_id:asc"
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "JSON aggregation expression with `group_by` and `aggregates`.",
            "examples": {
              "group-by-workspace-group-count": {
                "summary": "Group by workspace group and count",
                "value": "{\"group_by\":[\"workspace_group_id\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group-by-organization-avg": {
                "summary": "Group by organization and calculate average",
                "value": "{\"group_by\":[\"organization_id\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"},{\"field\":\"id\",\"function\":\"min\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Core process groups retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDigitalActivityCoreProcessGroupsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with results",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070811",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "name": "Grupo de procesos core A",
                          "description": "Grupo principal de procesos de productividad",
                          "workspace_group_id": "64f0c2a1b2d3e4f506070822"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/flows": {
      "post": {
        "tags": [
          "Flows"
        ],
        "summary": "Create a flow",
        "operationId": "createFlow",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en-EN",
                "es-ES",
                "pt-BR",
                "ca-ES",
                "eu-ES"
              ],
              "default": "es-ES"
            },
            "description": "Language code for text fields supporting multiple languages. When creating or updating resources, this specifies the language for the provided text values. When retrieving resources, this determines which language variant the multilingual text fields return. Accepted values: 'en-EN' (English), 'es-ES' (Spanish), 'pt-BR' (Portuguese), 'ca-ES' (Catalan), 'eu-ES' (Basque). The default is 'es-ES' if not provided."
          }
        ],
        "responses": {
          "201": {
            "description": "Flow successfully created. The response contains the created resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowV2"
                },
                "example": {
                  "id": "507f1f77bcf86cd799439011"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Mandatory fields are missing - Invalid field values - Invalid condition configuration - Invalid microservice identifier"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity. Common causes: - Referenced microservice not found - Target referenced entities (workspaces, Workspace groups, report groups) not found or do not belong - Invalid condition type - Flow cannot be enabled"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFlowV2Request"
              },
              "examples": {
                "create-workspace-flow": {
                  "summary": "Create a flow targeting specific workspaces",
                  "value": {
                    "name": {
                      "en-EN": "Daily Backup Flow",
                      "es-ES": "Proceso de copia diaria"
                    },
                    "description": {
                      "en-EN": "Automated daily backup process",
                      "es-ES": "Proceso automatizado de copia de seguridad diaria"
                    },
                    "type": "workspace",
                    "detection_only": false,
                    "cooldown_minutes": 60,
                    "enabled": false,
                    "init_text": {
                      "en-EN": "Starting backup process...",
                      "es-ES": "Iniciando proceso de copia..."
                    },
                    "ok_text": {
                      "en-EN": "Backup completed successfully",
                      "es-ES": "Copia completada correctamente"
                    },
                    "ko_text": {
                      "en-EN": "Backup failed. Please check logs.",
                      "es-ES": "Copia fallida. Revise los registros."
                    },
                    "target": {
                      "type": "workspaces",
                      "ids": [
                        "507f1f77bcf86cd799439012",
                        "507f1f77bcf86cd799439013"
                      ]
                    },
                    "microservice_id": "507f1f77bcf86cd799439014",
                    "conditions": [
                      {
                        "condition_type_id": "507f1f77bcf86cd799439015",
                        "operator": "gt",
                        "compare_to": "80",
                        "check_every": 300
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "description": "Creates a new automation flow for the specified organization. The flow defines execution logic, conditions, and target workspaces. Returns data of the created flow upon successful creation."
      },
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "List flows",
        "operationId": "listFlows",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sort field with optional order suffix (:asc or :desc), e.g., \"name\", \"name:asc\", \"cooldown_minutes:desc\". Ascending order is default if no suffix provided. Valid sort fields: id, name, description, type, detection_only, cooldown_minutes, enabled, init_text, ok_text, ko_text."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each flow item. Selectable fields: id, name, description, type, detection_only, cooldown_minutes, enabled. The id field is always included.",
            "example": "name,description,enabled"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120,
              "pattern": "^.*$"
            },
            "description": "Filter flows by one or more criteria. Provide a JSON object with filter conditions. You can filter by: id, name, description, type, detection_only, cooldown_minutes, enabled, init_text, ok_text, ko_text. Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by enabled flows",
                "description": "Returns only enabled flows.",
                "value": "{\"field\": \"enabled\", \"op\": \"eq\", \"value\": true}"
              },
              "complex-and": {
                "summary": "Filter by type and detection mode",
                "description": "Returns SESSION flows that are not merely detection.",
                "value": "{\"and\": [{\"field\": \"type\", \"op\": \"eq\", \"value\": \"SESSION\"}, {\"field\": \"detection_only\", \"op\": \"eq\", \"value\": false}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match multiple text fields and require enabled flows.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"name\", \"op\": \"contains\", \"value\": \"backup\"}, {\"field\": \"description\", \"op\": \"contains\", \"value\": \"backup\"}]}, {\"field\": \"enabled\", \"op\": \"eq\", \"value\": true}]}"
              }
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Number of items per page"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en-EN",
                "es-ES",
                "pt-BR",
                "ca-ES",
                "eu-ES"
              ],
              "default": "es-ES"
            },
            "description": "Language code for text fields that support multiple languages. When creating or updating resources, this specifies the language of the provided text values. Upon retrieving resources, it determines which language variant of the multilingual text fields is returned. Accepted values: 'en-EN' (English), 'es-ES' (Spanish), 'pt-BR' (Portuguese), 'ca-ES' (Catalan), 'eu-ES' (Basque). Default is 'es-ES' if not provided."
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of flows successfully retrieved. The response includes pagination metadata and the flow data array.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowListItemV2ListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Invalid pagination parameters - Invalid sorting parameter - Invalid filter parameters"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of flows belonging to the specified organization. Supports filtering, sorting, and searching across flow properties. Results are returned in pages with pagination metadata."
      }
    },
    "/v2/organizations/{organization_id}/operations": {
      "post": {
        "tags": [
          "Operations"
        ],
        "summary": "Create operations",
        "operationId": "createOperations",
        "description": "Create one or more operations based on the scope and objectives provided.\n\nCurrently available operation types: `execute_microservice`, `delete_workspaces`, `shutdown_workspaces`, and `restart_workspaces`.\n\nReturns the created operation resources with the same canonical query contract by id.\n\n**Parameter compatibility for `execute_microservice`**\n\n`payload.parameters` only applies to PowerShell microservices executions in Windows and is only supported on devices with the new agent installed.\n\nThe values sent in `payload.parameters` are transmitted as text (`string`). The interpretation of types depends on the parameter definition and the parsing implemented in the microservice script.\n\nFor that context, recommended data types for parameters:\n\n- `string`, `integer`, `double`, `decimal`, and `datetime`.\n- For `double` and `decimal`, use decimal point notation (`.`).\n- For `datetime`, use ISO 8601 format (e.g., `2026-07-09T10:30:00Z`).\n- When executed at the destination, `datetime` values may be represented in local time.\n- Correct execution also depends on the quality and validations of the script.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOperationV2Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Operations created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateOperationV2Response"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "get": {
        "tags": [
          "Operations"
        ],
        "summary": "List operations",
        "operationId": "get_operations",
        "description": "Returns a paginated list of operations from the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields separated by commas for each element.",
            "example": "id,organization_id,name,description,status,created_at"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Filter by name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"remote\"}"
              },
              "complex-and": {
                "summary": "Filter by status and description",
                "value": "{\"and\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"finished\"},{\"field\":\"description\",\"op\":\"contains\",\"value\":\"remote\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"microservice_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070833\"},{\"field\":\"flow_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070844\"}]},{\"field\":\"status\",\"op\":\"eq\",\"value\":\"pending\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`).",
            "example": "created_at:desc"
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "JSON expression for aggregation. Structure: {\"group_by\":[\"field\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}. Cannot be combined with `fields`.",
            "examples": {
              "group-by-status-count": {
                "summary": "Group by status and count",
                "value": "{\"group_by\":[\"status\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group-by-organization-count": {
                "summary": "Group by organization and count",
                "value": "{\"group_by\":[\"organization_id\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operations successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOperationsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with results",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070811",
                          "organization_id": "507f1f77bcf86cd799439022",
                          "name": "remote_assistance",
                          "description": "Remote assistance operation",
                          "status": "finished",
                          "created_at": "2026-03-10T09:11:45Z",
                          "started_at": "2026-03-10T09:12:00Z",
                          "ended_at": "2026-03-10T09:15:17Z",
                          "microservice_id": "64f0c2a1b2d3e4f506070833",
                          "flow_id": "64f0c2a1b2d3e4f506070844",
                          "remote_support": {
                            "start_date": "2026-03-10T09:12:00Z",
                            "end_date": "2026-03-10T09:15:17Z",
                            "type": "unattended"
                          }
                        }
                      ]
                    }
                  },
                  "aggregated_by_status": {
                    "summary": "Aggregated result by status",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "status": "finished",
                          "count": 12
                        },
                        {
                          "status": "pending",
                          "count": 5
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/reporting-groups/{reporting_group_id}/magic-links": {
      "post": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Create a magic link for agent download",
        "operationId": "createReportingGroupMagicLink",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the reporting group",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportingGroupMagicLinkRequestV2"
              },
              "examples": {
                "default-installer": {
                  "summary": "Create a magic link using strict installer values",
                  "value": {
                    "expires_at": "2026-03-15T12:00:00.000Z",
                    "installer": {
                      "version": "latest",
                      "platform": "windows",
                      "arch": "x64",
                      "type": "fxxone"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Magic link created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateReportingGroupMagicLinkResponseV2"
                },
                "examples": {
                  "created-magic-link": {
                    "summary": "Magic link created response",
                    "value": {
                      "id": "507f1f77bcf86cd799439099",
                      "token": "2ab46558-3c40-4b72-8fce-08b7b596f624",
                      "link": "https://portal.example.com/magic-link?key=2ab46558-3c40-4b72-8fce-08b7b596f624"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request: path parameters, request body or date-time format are invalid."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Report group not found"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity: business validation failed (e.g., expiration outside the allowed range)."
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Create a magic link to download the agent installer in a report group. This feature is only available for the FXXOne product. Contact the Flexxible team for more information."
      }
    },
    "/v2/organizations/{organization_id}/reporting-groups": {
      "post": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Create a reporting group",
        "operationId": "createReportingGroup",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "responses": {
          "201": {
            "description": "Reporting group created successfully. The response contains the created resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingGroupByIdV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Mandatory fields are missing (name, product_config_id) - Invalid field values - Invalid ID format for fields product_config_id, patch_policy_target_id, or intermediate_device_*_id - Invalid fishing_pattern_field value (must be one of: full_name, description, ou, current_subnet) - Fishing_pattern value too long (exceeds maxLength: 250) - Intermediate devices not defined sequentially (intermediate_device_2_id requires intermediate_device_1_id, intermediate_device_3_id requires intermediate_device_2_id)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity. Common causes: - Product configuration not found or does not belong to the organization - Intermediate device Workspace IDs do not exist or do not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportingGroupRequestV2"
              },
              "examples": {
                "create-reporting-group-with-minimal-fields": {
                  "summary": "Create a reporting group with only required fields",
                  "value": {
                    "name": "Grupo de reporte de Producción",
                    "product_config_id": "507f1f77bcf86cd799439030"
                  }
                },
                "create-reporting-group-with-all-fields": {
                  "summary": "Create a reporting group with all available fields, including intermediate devices",
                  "value": {
                    "name": "Grupo de reporte de Desarrollo",
                    "product_config_id": "507f1f77bcf86cd799439030",
                    "patch_policy_target_id": "507f1f77bcf86cd799439040",
                    "fishing_pattern": "Estaciones de trabajo Windows",
                    "fishing_pattern_field": "full_name",
                    "intermediate_device_1_id": "507f1f77bcf86cd799439050",
                    "intermediate_device_2_id": "507f1f77bcf86cd799439051",
                    "intermediate_device_3_id": "507f1f77bcf86cd799439052"
                  }
                },
                "create-reporting-group-with-single-intermediate-device": {
                  "summary": "Create a reporting group with only the first intermediate device",
                  "value": {
                    "name": "Grupo de reporte de dispositivo único",
                    "product_config_id": "507f1f77bcf86cd799439030",
                    "intermediate_device_1_id": "507f1f77bcf86cd799439050"
                  }
                }
              }
            }
          }
        },
        "description": "Creates a new reporting group for the specified organization. Reporting groups are used for organizing and managing device configurations, product settings, and patch policies. You can optionally configure intermediate devices (up to 3) by providing workspace identifiers. Intermediate devices are used for actions like Wake-on-LAN in secure networks, allowing remote powering on of devices through intermediate gateways. Intermediate devices must be defined sequentially: you cannot define intermediate_device_2_id without intermediate_device_1_id, nor intermediate_device_3_id without intermediate_device_2_id. All intermediate device Workspace IDs must exist and belong to the organization. Returns the ID of the successfully created reporting group."
      },
      "get": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "List reporting groups",
        "operationId": "listReportingGroups",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting field with optional order suffix (:asc or :desc). Valid sorting fields: name, organization_id, product_config_id, fishing_pattern, fishing_pattern_field, patch_policy_target_id, policy_reporting_group, overridden_agent_settings.*, effective_agent_settings.*, execute_flexx_analyzer_agent, can_manage_agent_versions, intermediate_device_1_id, intermediate_device_2_id, intermediate_device_3_id. It defaults to ascending order if suffix is not provided."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each report group element. Selectable fields: id, name, organization_id, product_config_id, fishing_pattern, fishing_pattern_field, patch_policy_target_id, policy_reporting_group, overridden_agent_settings, effective_agent_settings, execute_flexx_analyzer_agent, can_manage_agent_versions, flexx_agent_portal_download, intermediate_device_1_id, intermediate_device_2_id, intermediate_device_3_id. The id field is always included.",
            "example": "name,effective_agent_settings,execute_flexx_analyzer_agent"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120,
              "description": "Filter report groups using a JSON object. Specify the field to filter, comparison operator, and value. Example: {\"field\": \"name\", \"op\": \"eq\", \"value\": \"Report Group 1\"}",
              "example": "{\"field\": \"name\", \"op\": \"eq\", \"value\": \"Grupo de reporte 1\"}"
            },
            "description": "Filter report groups by one or more criteria. Provide a JSON string with AST of filters. Filter by any field returned in the response. Use dot notation for nested fields: overridden_agent_settings.remote_support, effective_agent_settings.remote_support, effective_agent_settings.uninstall_protection, etc. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between. Combine with and/or. Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by report group name",
                "description": "Returns reporting groups whose name contains the provided text.",
                "value": "{\"field\": \"name\", \"op\": \"contains\", \"value\": \"producción\"}"
              },
              "complex-and": {
                "summary": "Filter by nested configuration and execution flag",
                "description": "Returns groups where uninstallation protection is disabled and analyzer execution is enabled.",
                "value": "{\"and\": [{\"field\": \"effective_agent_settings.uninstall_protection\", \"op\": \"eq\", \"value\": \"off\"}, {\"field\": \"execute_flexx_analyzer_agent\", \"op\": \"eq\", \"value\": true}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match multiple name patterns and require interactive remote support.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"name\", \"op\": \"contains\", \"value\": \"prod\"}, {\"field\": \"name\", \"op\": \"contains\", \"value\": \"stage\"}]}, {\"field\": \"effective_agent_settings.remote_support\", \"op\": \"eq\", \"value\": \"INTERACTIVE\"}]}"
              }
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Number of items per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of report groups successfully retrieved. The response includes pagination metadata and the report group data array.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingGroupListItemV2ListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Invalid pagination parameters - Invalid sorting parameter - Invalid filter parameters"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of report groups belonging to the specified organization. Supports filtering and sorting on report group properties. Filters are provided as a JSON string following the AST structure of FilterNode. Results are returned in pages with pagination metadata."
      }
    },
    "/v2/organizations/{organization_id}/roles": {
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Create a role",
        "operationId": "create_role",
        "description": "Create a role and its permission entries in a single request.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequestV2"
              },
              "examples": {
                "organization_scoped_role": {
                  "summary": "Create role with organization scope permission",
                  "value": {
                    "name": "Operador de organizacion",
                    "permissions": [
                      {
                        "portal_permission": "organization_admin",
                        "workspaces_permission": "admin_read_only",
                        "analyzer_permission": "access",
                        "target_organization": "507f1f77bcf86cd799439011",
                        "target_reporting_groups": [
                          "64f0c2a1b2d3e4f5060708c1",
                          "64f0c2a1b2d3e4f5060708c2"
                        ]
                      }
                    ]
                  }
                },
                "mixed_permissions_role": {
                  "summary": "Create role with mixed permission scopes",
                  "value": {
                    "name": "Soporte de nivel 1",
                    "permissions": [
                      {
                        "portal_permission": "l1_support_team",
                        "workspaces_permission": "l1_support_team",
                        "analyzer_permission": "no_access",
                        "target_organization": "all",
                        "target_reporting_groups": "all"
                      },
                      {
                        "portal_permission": "l1_support_team_read_only",
                        "workspaces_permission": "l1_support_team_read_only",
                        "analyzer_permission": "access",
                        "target_organization": "507f1f77bcf86cd799439011",
                        "target_reporting_groups": [
                          "64f0c2a1b2d3e4f5060708d1"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User role created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleV2"
                },
                "examples": {
                  "created": {
                    "summary": "Role created",
                    "value": {
                      "id": "64f0c2a1b2d3e4f5060708aa",
                      "name": "Operador de organizacion",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "created_at": "2026-03-12T10:30:00Z",
                      "created_by": "64f0c2a1b2d3e4f5060708bb",
                      "permissions": [
                        {
                          "portal_permission": "organization_admin",
                          "workspaces_permission": "admin_read_only",
                          "analyzer_permission": "access",
                          "target_organization": "507f1f77bcf86cd799439011",
                          "target_reporting_groups": [
                            "64f0c2a1b2d3e4f5060708c1",
                            "64f0c2a1b2d3e4f5060708c2"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_permission_payload": {
                    "summary": "Invalid permission payload",
                    "value": {
                      "error": {
                        "message": "Cuerpo de solicitud no valido",
                        "code": "bad_request",
                        "details": "permissions[0].target_organization debe ser `all` o una cadena hexadecimal en minusculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Referenced resource not found within authorized organization scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "reporting_group_not_found": {
                    "summary": "Referenced Reporting Group not found",
                    "value": {
                      "error": {
                        "message": "Grupo de reporte no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "role_name_already_exists": {
                    "summary": "Role name already exists",
                    "value": {
                      "error": {
                        "message": "El nombre del rol ya existe",
                        "code": "conflict",
                        "details": "name ya esta en uso dentro de esta organizacion"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request cannot be completed due to organization entity limit restrictions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_entity_limit_exceeded": {
                    "summary": "Role limit exceeded",
                    "value": {
                      "error": {
                        "message": "Entity ownership limit exceeded.",
                        "code": "unprocessable_entity"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "List roles",
        "operationId": "get_roles",
        "description": "Returns a paginated list of roles available within the organization's scope.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response fields to be included."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on filterable field paths in the response.",
            "examples": {
              "simple": {
                "summary": "Filter by role name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"administrador\"}"
              },
              "complex-and": {
                "summary": "Filter by combined tokens of the role name",
                "value": "{\"and\":[{\"field\":\"name\",\"op\":\"contains\",\"value\":\"organización\"},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"administrador\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"name\",\"op\":\"contains\",\"value\":\"administrador\"},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"operador\"}]},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"rol\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(id|organization_id|name|created_at|created_by):(asc|desc)$"
            },
            "description": "Order expression in the format <field>:asc|desc."
          }
        ],
        "responses": {
          "200": {
            "description": "Roles retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRolesResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with roles",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f5060708aa",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "name": "Administrador de la organización",
                          "created_at": "2026-03-12T10:30:00Z",
                          "created_by": "64f0c2a1b2d3e4f5060708bb",
                          "permissions": [
                            {
                              "portal_permission": "organization_admin",
                              "workspaces_permission": "admin",
                              "analyzer_permission": "access",
                              "target_organization": "all",
                              "target_reporting_groups": [
                                "64f0c2a1b2d3e4f5060708c1"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No roles found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros inválido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON válida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource was not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "resource_not_found": {
                    "summary": "Requested resource not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/tenants": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "Create a tenant",
        "operationId": "createTenant",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the owning organization that will create the tenant",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "responses": {
          "201": {
            "description": "Tenant and associated organization successfully created. Returns the created tenant resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantByIdV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common causes: - Invalid request body or path parameters - Mixed exclusive configurations (`tenant_config` and `organization_config`) - Missing mandatory fields for selected type - Invalid ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Owner organization not found"
          },
          "422": {
            "description": "Unprocessable entity - Business logic validation error. Common causes: - Product config not found - Organization not eligible to create tenants - Organization does not exist in build - Organization has no eligible products - Invalid partner relationship - Organization and parent organization are end customers - Referenced entity not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequestV2"
              },
              "examples": {
                "create-tenant-end-customer": {
                  "summary": "Create tenant for END CUSTOMER organization",
                  "value": {
                    "type": "tenant",
                    "name": "Tenant de producción",
                    "tenant_config": {
                      "product_config_id": "507f1f77bcf86cd799439030",
                      "analyzer": "existing"
                    },
                    "policy_id": "507f1f77bcf86cd799439050",
                    "organization_email": "tenant@example.com",
                    "organization_language": "en",
                    "organization_country": "US",
                    "organization_industry": "Tecnología"
                  }
                },
                "create-tenant-partner-or-wholesaler": {
                  "summary": "Create tenant for PARTNER or WHOLESALER organization",
                  "value": {
                    "type": "organization",
                    "name": "Tenant empresarial",
                    "organization_config": {
                      "product_id": "507f1f77bcf86cd799439030",
                      "region": "west-eu-01_one"
                    },
                    "policy_id": "507f1f77bcf86cd799439050",
                    "organization_email": "enterprise@example.com",
                    "organization_language": "es",
                    "organization_country": "ES",
                    "organization_industry": "Finanzas"
                  }
                }
              }
            }
          }
        },
        "description": "Create a new tenant and an associated organization for the specified owner organization. The request body uses a `type` discriminator with exclusive routes: `tenant` (END CUSTOMER) and `organization` (PARTNER/WHOLESALER)."
      },
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "List tenants",
        "operationId": "listTenants",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Number of items per page"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting field with optional order suffix (:asc or :desc), e.g., \"name\", \"name:asc\", \"created_at:desc\". Uses ascending order by default if no suffix is provided. Valid fields: id, created_at, name, region, product_id, policy_id"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each tenant element. Selectable fields: id, organization_id, created_at, name, region, product_id, policy_id. The id field is always included.",
            "example": "name,region,product_id"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120,
              "description": "Filter tenants using a JSON object. Specify the field to filter, comparison operator, and value. Example: {\"field\": \"name\", \"op\": \"eq\", \"value\": \"Tenant 1\"}",
              "example": "{\"field\": \"name\", \"op\": \"eq\", \"value\": \"Tenant 1\"}"
            },
            "description": "Filter tenants by one or more criteria. Provide a JSON object with filter conditions. You can filter by any field returned in the response. Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Simple filter",
                "description": "Filter tenants by name containing a text.",
                "value": "{\"field\": \"name\", \"op\": \"contains\", \"value\": \"production\"}"
              },
              "complex-and": {
                "summary": "Complex filter using AND",
                "description": "Filter tenants by region and product at the same time.",
                "value": "{\"and\": [{\"field\": \"region\", \"op\": \"eq\", \"value\": \"us-east\"}, {\"field\": \"product_id\", \"op\": \"eq\", \"value\": \"507f1f77bcf86cd799439030\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match multiple regions and apply a name restriction.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"region\", \"op\": \"eq\", \"value\": \"us-east\"}, {\"field\": \"region\", \"op\": \"eq\", \"value\": \"eu-west\"}]}, {\"field\": \"name\", \"op\": \"contains\", \"value\": \"tenant\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of tenants successfully retrieved. The response includes pagination flag and tenant data array.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantListItemV2ListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Invalid pagination parameters - Invalid sorting parameter - Invalid filter parameters"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of tenants who belong to the specified organization. Supports filtering and sorting over tenant properties. Filters are provided as a JSON string following the FilterNode AST structure. Results are returned in pages with pagination metadata."
      }
    },
    "/v2/organizations/{organization_id}/users": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create a user",
        "operationId": "create_user",
        "description": "Create a new user within the organization's scope.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequestV2"
              },
              "examples": {
                "standard_user": {
                  "summary": "Create a standard user",
                  "value": {
                    "name": "Ana",
                    "surname": "Lopez",
                    "email": "ana.lopez@example.com",
                    "language": "en-EN",
                    "role_id": "64f0c2a1b2d3e4f5060708aa",
                    "department": "Support",
                    "email_login_enabled": false
                  }
                },
                "email_login_user": {
                  "summary": "Create a user with email login enabled",
                  "value": {
                    "name": "Diego",
                    "surname": "Santos",
                    "email": "diego.santos@example.com",
                    "language": "es-ES",
                    "role_id": "64f0c2a1b2d3e4f5060708ab",
                    "email_login_enabled": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserByIdV2"
                },
                "examples": {
                  "created": {
                    "summary": "User created",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070801",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Ana",
                      "surname": "Lopez",
                      "email": "ana.lopez@example.com",
                      "language": "en-EN",
                      "created_at": "2026-06-22T16:00:00.000Z",
                      "department": "Support",
                      "role_id": "64f0c2a1b2d3e4f5060708aa",
                      "created_by": "64f0c2a1b2d3e4f5060708bb",
                      "email_login_enabled": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_email": {
                    "summary": "The email format is not valid",
                    "value": {
                      "error": {
                        "message": "Cuerpo de solicitud no valido",
                        "code": "bad_request",
                        "details": "email debe ser una direccion valida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Referenced resource not found within the authorized organization scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "user_role_not_found": {
                    "summary": "User role not found",
                    "value": {
                      "error": {
                        "message": "Rol de usuario no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "email_already_exists": {
                    "summary": "Email already exists",
                    "value": {
                      "error": {
                        "message": "El correo electronico ya existe",
                        "code": "conflict",
                        "details": "email ya esta registrado"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List users",
        "operationId": "get_users",
        "description": "Returns a paginated list of users available within the scope of the organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on filterable response field paths. All contract fields are filterable.",
            "examples": {
              "simple": {
                "summary": "Filter by username",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"ana\"}"
              },
              "complex-and": {
                "summary": "Filter by department and login method",
                "value": "{\"and\":[{\"field\":\"department\",\"op\":\"eq\",\"value\":\"support\"},{\"field\":\"email_login_enabled\",\"op\":\"eq\",\"value\":true}]}"
              },
              "complex-or-and": {
                "summary": "Combine filtering by organization and email",
                "value": "{\"and\":[{\"or\":[{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439011\"},{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439012\"}]},{\"field\":\"email\",\"op\":\"contains\",\"value\":\"@example.com\"}]}"
              },
              "created-at-and-role": {
                "summary": "Filter by creation date and role",
                "value": "{\"and\":[{\"field\":\"created_at\",\"op\":\"gte\",\"value\":\"2025-01-01T00:00:00.000Z\"},{\"field\":\"role_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f5060708aa\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(id|name|surname|email|language|department|role_id|organization_id|created_at|created_by|email_login_enabled):(asc|desc)$"
            },
            "description": "Order expression in the format <field>:asc|desc. All contract fields are orderable."
          }
        ],
        "responses": {
          "200": {
            "description": "Users retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetUsersResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with users",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070801",
                          "name": "Ana",
                          "surname": "Lopez",
                          "email": "ana.lopez@example.com",
                          "language": "en-EN",
                          "department": "Support",
                          "role_id": "64f0c2a1b2d3e4f5060708aa",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "created_at": "2025-12-01T10:30:00.000Z",
                          "created_by": "64f0c2a1b2d3e4f5060708bb",
                          "email_login_enabled": true
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No users found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no valido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON valida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested resource not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "resource_not_found": {
                    "summary": "The requested resource was not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspace-groups/{workspace_group_id}/schedules": {
      "post": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Create a cron schedule",
        "operationId": "createWorkspaceGroupSchedule",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "201": {
            "description": "Schedule successfully created. The response contains the created schedule resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupScheduleV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Mandatory fields are missing (cron_expression, time_zone, type) - Invalid cron expression format - Invalid time zone value - Invalid scheduling type (must be START, STOP, or RESTART) - Invalid intermediate_device Workspace ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: user does not have access to the organization or the organization does not exist"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or workspace group belongs to a different organization (after authorization)"
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "Conflict: scheduling with the same type, time, and day already exists (after time zone conversion)"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity. Common causes: - Intermediate_device Workspace ID does not exist or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceGroupScheduleRequestV2"
              },
              "examples": {
                "create-start-schedule": {
                  "summary": "Create a START schedule for weekdays at 8 AM",
                  "value": {
                    "cron_expression": "0 8 * * 1-5",
                    "time_zone": "Eastern Standard Time",
                    "type": "start"
                  }
                },
                "create-start-schedule-with-intermediate-device": {
                  "summary": "Create a START schedule with an intermediate device for Wake-on-LAN",
                  "value": {
                    "cron_expression": "0 8 * * 1-5",
                    "time_zone": "Eastern Standard Time",
                    "type": "start",
                    "intermediate_device": "507f1f77bcf86cd799439050"
                  }
                },
                "create-stop-schedule": {
                  "summary": "Create a STOP schedule for weekdays at 6 PM",
                  "value": {
                    "cron_expression": "0 18 * * 1-5",
                    "time_zone": "UTC",
                    "type": "stop"
                  }
                },
                "create-restart-schedule": {
                  "summary": "Create a RESTART schedule for weekends at midnight",
                  "value": {
                    "cron_expression": "0 0 * * 0,6",
                    "time_zone": "Pacific Standard Time",
                    "type": "restart"
                  }
                }
              }
            }
          }
        },
        "description": "Creates a new cron schedule for a group of workspaces. Schedules define automated power operations (START, STOP, RESTART) executed at specified schedules according to cron expressions and time zone. START schedules may optionally include an intermediate device Workspace ID for Wake on LAN operations in secure networks. If intermediate_device is provided, it indicates an intermediate device must be used. The system validates no conflicting schedule exists (same type, time, and day after time zone conversion)."
      },
      "get": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "List cron schedules",
        "operationId": "listWorkspaceGroupSchedules",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule list successfully retrieved. Returns an array of schedule objects. Empty array if no schedules exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupScheduleV2ListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request: Invalid workspace group ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: user does not have access to the organization or the organization does not exist"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or workspace group belongs to a different organization (after authorization is checked)"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve all configured cron schedules for a group of workspaces. Returns an array of schedule objects containing cron expression, timezone, type, intermediate device information, and audit metadata. If the workspace group has no schedules, an empty array is returned."
      }
    },
    "/v2/organizations/{organization_id}/workspace-groups": {
      "post": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Create a workspace group",
        "operationId": "createWorkspaceGroup",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "responses": {
          "201": {
            "description": "Workspace group successfully created. The response contains the created resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupDetailResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Missing required fields - Invalid field values - Invalid type value (only STATIC allowed) - Invalid location structure"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "Conflict: a workspace group with the same name already exists"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspacegroupsCreateRequestV2"
              },
              "examples": {
                "create-static-workspace-group": {
                  "summary": "Create a workspace group with minimal required fields",
                  "value": {
                    "name": "Grupo de Workspaces de producción"
                  }
                },
                "create-workspace-group-with-description": {
                  "summary": "Create a workspace group with description",
                  "value": {
                    "name": "Grupo de Workspaces de desarrollo",
                    "description": "Grupo de workspaces para entornos de desarrollo",
                    "type": "static"
                  }
                },
                "create-workspace-group-with-location": {
                  "summary": "Create a workspace group with location information",
                  "value": {
                    "name": "Grupo de Workspaces de la oficina de Madrid",
                    "description": "Grupo de workspaces para la oficina de Madrid",
                    "type": "static",
                    "location": {
                      "latitude": 40.4168,
                      "longitude": -3.7038,
                      "address": "Madrid, España",
                      "description": "Ubicación de la oficina principal"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Create a new workspace group for the specified organization. Only STATIC type workspace groups are currently supported. Returns the created workspace group ID upon successful creation."
      },
      "get": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "List workspace groups",
        "operationId": "listWorkspaceGroups",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting field with optional order suffix (:asc or :desc). Valid sorting fields: id, name, description, created_by, created_at, type, location. Ascending order is used by default if no suffix is provided."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each workspace group element. Selectable fields: id, name, description, organization_id, created_by, created_at, type, filter, location, entra_id_source. The id field is always included.",
            "example": "name,type,created_at"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120,
              "description": "Filter workspace groups using a JSON object. Specify the field to filter, comparison operator, and value. Example: {\"field\": \"name\", \"op\": \"eq\", \"value\": \"workspace groups 1\"}",
              "example": "{\"field\": \"name\", \"op\": \"eq\", \"value\": \"Grupo de Workspace 1\"}"
            },
            "description": "Filter workspace groups by one or more criteria. Provide a JSON object with filter conditions. You can filter by: id, name, description, created_by, created_at, type, location, entra_id_source.resource_id, entra_id_source.resource_type, entra_id_source.resource_name. For nested fields like location or entra_id_source, use dot notation (e.g., location.latitude, entra_id_source.resource_type). Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by workspace groups' name",
                "description": "Return workspace groups whose name contains the provided text.",
                "value": "{\"field\": \"name\", \"op\": \"contains\", \"value\": \"finanzas\"}"
              },
              "complex-and": {
                "summary": "Filter by type and location",
                "description": "Return STATIC workspace groups above a latitude threshold.",
                "value": "{\"and\": [{\"field\": \"type\", \"op\": \"eq\", \"value\": \"STATIC\"}, {\"field\": \"location.latitude\", \"op\": \"gt\", \"value\": 40}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match multiple name patterns and require a specific Entra resource type.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"name\", \"op\": \"contains\", \"value\": \"Finanzas\"}, {\"field\": \"name\", \"op\": \"contains\", \"value\": \"RRHH\"}]}, {\"field\": \"entra_id_source.resource_type\", \"op\": \"eq\", \"value\": \"GROUP\"}]}"
              }
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Number of items per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of workspace groups successfully retrieved. The response includes pagination metadata and an array of workspace group data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupListItemV2ListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Invalid pagination parameters - Invalid sorting parameter - Invalid filtering parameters"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of workspace groups belonging to the specified organization. Supports filtering and sorting on workspace group properties. Filters are provided as a JSON string following the AST structure of FilterNode. Results are returned in pages with pagination metadata."
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/core-process-groups/{id}": {
      "delete": {
        "tags": [
          "Digital activity"
        ],
        "summary": "Delete Core Process Group",
        "operationId": "deleteDigitalActivityCoreProcessGroup",
        "description": "Delete a core process group within the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the core process group.",
            "example": "64f0c2a1b2d3e4f506070811"
          }
        ],
        "responses": {
          "204": {
            "description": "Core process group deleted successfully. No content is returned."
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_path_params": {
                    "summary": "Invalid identifier format",
                    "value": {
                      "error": {
                        "message": "Parámetros de ruta no válidos",
                        "code": "bad_request",
                        "details": "organization_id e id deben tener 24 caracteres hexadecimales."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/flows/{flow_id}": {
      "delete": {
        "tags": [
          "Flows"
        ],
        "summary": "Delete a flow",
        "operationId": "deleteFlow",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "flow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the flow to be deleted",
            "example": "507f1f77bcf86cd799439012"
          }
        ],
        "responses": {
          "204": {
            "description": "Flow deleted successfully. No content is returned."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request - Invalid flow ID"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Flow not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Permanently delete a flow from the organization. This action cannot be undone. Returns no content (204) upon successful deletion."
      },
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "Retrieve a flow",
        "operationId": "getFlowById",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "flow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "Unique identifier for the flow",
            "example": "507f1f77bcf86cd799439012"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en-EN",
                "es-ES",
                "pt-BR",
                "ca-ES",
                "eu-ES"
              ],
              "default": "es-ES"
            },
            "description": "Language code for text fields supporting multiple languages. When creating or updating resources, this specifies the language for the provided text values. When retrieving resources, this determines which language variant the multilingual text fields return. Accepted values: 'en-EN' (English), 'es-ES' (Spanish), 'pt-BR' (Portuguese), 'ca-ES' (Catalan), 'eu-ES' (Basque). The default is 'es-ES' if not provided."
          }
        ],
        "responses": {
          "200": {
            "description": "Flow details successfully retrieved. The response includes complete flow configuration, conditions, destinations, and execution metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request - Invalid flow ID"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Flow not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve detailed information about a specific flow, including its configuration, execution logic, conditions, destinations, and execution metrics. Returns complete flow data in the requested language."
      },
      "put": {
        "tags": [
          "Flows"
        ],
        "summary": "Update a flow",
        "operationId": "updateFlow",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "flow_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "Unique identifier for the flow to update",
            "example": "507f1f77bcf86cd799439012"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en-EN",
                "es-ES",
                "pt-BR",
                "ca-ES",
                "eu-ES"
              ],
              "default": "es-ES"
            },
            "description": "Language code for text fields supporting multiple languages. When creating or updating resources, this specifies the language for the provided text values. When retrieving resources, this determines which language variant the multilingual text fields return. Accepted values: 'en-EN' (English), 'es-ES' (Spanish), 'pt-BR' (Portuguese), 'ca-ES' (Catalan), 'eu-ES' (Basque). The default is 'es-ES' if not provided."
          }
        ],
        "responses": {
          "200": {
            "description": "Flow updated successfully. The response contains the updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Mandatory fields are missing - Invalid field values - Invalid condition configuration - Invalid microservice identifier"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Flow or organization not found"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity. Common causes: - Referenced microservice not found - Target referenced entities (Workspaces, Workspace groups, report groups) not found or do not belong - Invalid condition type - Flow cannot be enabled"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFlowV2Request"
              },
              "examples": {
                "update-flow-configuration": {
                  "summary": "Update flow with new configuration",
                  "value": {
                    "name": {
                      "en-EN": "Flujo diario de copia actualizado",
                      "es-ES": "Proceso de copia diaria actualizado"
                    },
                    "description": {
                      "en-EN": "Proceso automatizado de copia diaria actualizado",
                      "es-ES": "Proceso automatizado de copia actualizado"
                    },
                    "detection_only": false,
                    "cooldown_minutes": 120,
                    "enabled": true,
                    "init_text": {
                      "en-EN": "Iniciando proceso de copia actualizado...",
                      "es-ES": "Iniciando proceso de copia actualizado..."
                    },
                    "ok_text": {
                      "en-EN": "Copia completada correctamente"
                    },
                    "ko_text": {
                      "en-EN": "La copia fallo. Por favor, revisa los registros."
                    },
                    "target": {
                      "type": "workspaces",
                      "ids": [
                        "507f1f77bcf86cd799439012",
                        "507f1f77bcf86cd799439013"
                      ]
                    },
                    "microservice_id": "507f1f77bcf86cd799439014",
                    "conditions": [
                      {
                        "condition_type_id": "507f1f77bcf86cd799439015",
                        "operator": "gte",
                        "compare_to": "90",
                        "period": null,
                        "check_every": 600
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "description": "Updates the configuration of an existing flow, including name, description, execution logic, conditions, and target settings. Returns the updated resource (200) after a successful update."
      }
    },
    "/v2/organizations/{organization_id}/reporting-groups/{reporting_group_id}": {
      "delete": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Delete a reporting group",
        "operationId": "deleteReportingGroup",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the reporting group to be deleted",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "204": {
            "description": "Reporting group deleted successfully. No content is returned."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Invalid path parameters - Invalid ID format for organization_id or reporting_group_id"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Report group not found or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Delete an existing reporting group from the organization. The reporting group must not have assigned Workspaces and must be directly editable. Returns no content (204) upon successful deletion."
      },
      "get": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Retrieve a reporting group",
        "operationId": "getReportingGroupById",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the reporting group",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Reporting group details retrieved successfully. The response includes the reporting group configuration and agent settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingGroupByIdV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request - Invalid report group ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Report group not found or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieves detailed information about a specific reporting group, including its configuration and agent settings. Returns reporting group data matching the listing endpoint structure."
      },
      "put": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Update a reporting group",
        "operationId": "updateReportingGroup",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the reporting group to be updated",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Reporting group updated successfully. The response contains the updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportingGroupByIdV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Mandatory fields are missing (name) - Invalid field values - Invalid fishing_pattern_field value (must be one of: full_name, description, ou, current_subnet) - Fishing_pattern value too long (exceeds maxLength: 250) - Invalid ID format for patch_policy_target_id or intermediate_device_*_id fields - Intermediate devices not defined sequentially (intermediate_device_2_id requires intermediate_device_1_id, intermediate_device_3_id requires intermediate_device_2_id)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Not found. Common causes: - Report group not found or does not belong to the organization - Patch policy target not found"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity. Common causes: - Intermediate device Workspace IDs do not exist or do not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReportingGroupRequestV2"
              },
              "examples": {
                "update-reporting-group-full-replacement": {
                  "summary": "Update reporting group with all updatable fields, including intermediate devices",
                  "value": {
                    "name": "Grupo de reporte de producción actualizado",
                    "description": "Grupo de reporte actualizado para entornos de producción",
                    "patch_policy_target_id": "507f1f77bcf86cd799439040",
                    "fishing_pattern": "Estaciones de trabajo Windows",
                    "fishing_pattern_field": "full_name",
                    "intermediate_device_1_id": "507f1f77bcf86cd799439050",
                    "intermediate_device_2_id": "507f1f77bcf86cd799439051",
                    "intermediate_device_3_id": "507f1f77bcf86cd799439052"
                  }
                },
                "update-reporting-group-minimal-fields": {
                  "summary": "Update reporting group with only mandatory fields (clears all optional fields)",
                  "value": {
                    "name": "Nombre actualizado del grupo de reporte"
                  },
                  "description": "This example shows the update of name only. All optional fields (description, patch_policy_target_id, fishing_pattern, fishing_pattern_field, and intermediate devices) will be cleared."
                },
                "update-reporting-group-with-single-intermediate-device": {
                  "summary": "Update reporting group with just the first intermediate device",
                  "value": {
                    "name": "Nombre actualizado del grupo de reporte",
                    "description": "Configuración de un solo dispositivo intermedio",
                    "intermediate_device_1_id": "507f1f77bcf86cd799439050"
                  },
                  "description": "This example sets only intermediate_device_1_id. intermediate_device_2_id and intermediate_device_3_id will be cleared if they were previously set."
                },
                "update-reporting-group-clear-intermediate-devices": {
                  "summary": "Update reporting group and clear all intermediate devices",
                  "value": {
                    "name": "Nombre actualizado del grupo de reporte",
                    "description": "Sin dispositivos intermedios"
                  },
                  "description": "By omitting all fields intermediate_device_*_id, all will be cleared (idempotent behavior)."
                }
              }
            }
          }
        },
        "description": "Updates the configuration of an existing reporting group, including name, description, patch policy target, search pattern, and intermediate devices. This endpoint implements full replacement semantics: all updateable fields must be included in the request. Omitting optional fields will clear them (idempotent behavior). Optionally configure intermediate devices (up to 3) by providing Workspace identifiers. Intermediate devices are used for actions like Wake-on-LAN in secure networks, allowing remote powering on of devices through intermediate gateways. Intermediate devices must be defined sequentially: you cannot define intermediate_device_2_id without intermediate_device_1_id, nor intermediate_device_3_id without intermediate_device_2_id. All intermediate device Workspace IDs must exist and belong to the organization. Returns the updated resource (200) after a successful update."
      }
    },
    "/v2/organizations/{organization_id}/roles/{role_id}": {
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Delete a role",
        "operationId": "delete_role",
        "description": "Delete the specified role within the scope of an organization. Returns no content when deletion is successful.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Role identifier.",
            "example": "64f0c2a1b2d3e4f5060708aa"
          }
        ],
        "responses": {
          "204": {
            "description": "User role successfully deleted."
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_role_id": {
                    "summary": "Invalid role identifier format",
                    "value": {
                      "error": {
                        "message": "Formato de role_id no válido",
                        "code": "bad_request",
                        "details": "role_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Role not found within the authorized organization scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "role_not_found": {
                    "summary": "Requested role not found",
                    "value": {
                      "error": {
                        "message": "Rol no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request cannot be processed because the role still has assigned users.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "role_has_assigned_users": {
                    "summary": "Role still has assigned users",
                    "value": {
                      "error": {
                        "message": "El rol tiene usuarios asignados",
                        "code": "unprocessable_entity",
                        "details": "Elimina las asignaciones del rol de los usuarios antes de eliminar este rol"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Retrieve a role",
        "operationId": "get_role_by_id",
        "description": "Returns details of the requested role within the scope of an organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Role identifier.",
            "example": "64f0c2a1b2d3e4f5060708aa"
          }
        ],
        "responses": {
          "200": {
            "description": "User role details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleV2"
                },
                "examples": {
                  "role_details": {
                    "summary": "Role detail response",
                    "value": {
                      "id": "64f0c2a1b2d3e4f5060708aa",
                      "name": "Administrador de la organización",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "created_at": "2026-03-12T10:30:00Z",
                      "created_by": "64f0c2a1b2d3e4f5060708bb",
                      "permissions": [
                        {
                          "portal_permission": "organization_admin",
                          "workspaces_permission": "admin",
                          "analyzer_permission": "access",
                          "target_organization": "all",
                          "target_reporting_groups": [
                            "64f0c2a1b2d3e4f5060708c1",
                            "64f0c2a1b2d3e4f5060708c2"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_role_id": {
                    "summary": "Invalid role identifier format",
                    "value": {
                      "error": {
                        "message": "Formato de role_id no válido",
                        "code": "bad_request",
                        "details": "role_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Role not found within the authorized organization scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "role_not_found": {
                    "summary": "Requested role not found",
                    "value": {
                      "error": {
                        "message": "Rol no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Roles"
        ],
        "summary": "Update a role",
        "operationId": "update_role_by_id",
        "description": "Perform a full replacement update of the mutable fields of the role in a single request, including the complete set of permissions.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "role_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Role identifier.",
            "example": "64f0c2a1b2d3e4f5060708aa"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequestV2"
              },
              "examples": {
                "full_update_organization_scoped": {
                  "summary": "Update role with organization scoped permissions",
                  "value": {
                    "name": "Operador de organizacion",
                    "permissions": [
                      {
                        "target_organization": "507f1f77bcf86cd799439011",
                        "portal_permission": "organization_admin",
                        "workspaces_permission": "admin_read_only",
                        "analyzer_permission": "access",
                        "target_reporting_groups": [
                          "64f0c2a1b2d3e4f5060708c1",
                          "64f0c2a1b2d3e4f5060708c2"
                        ]
                      }
                    ]
                  }
                },
                "full_update_mixed_scopes": {
                  "summary": "Update role with mixed scope permissions",
                  "value": {
                    "name": "Soporte de plataforma",
                    "permissions": [
                      {
                        "target_organization": "all",
                        "portal_permission": "platform",
                        "workspaces_permission": "admin",
                        "analyzer_permission": "admin",
                        "target_reporting_groups": "all"
                      },
                      {
                        "target_organization": "507f1f77bcf86cd799439011",
                        "portal_permission": "l2_support_team",
                        "workspaces_permission": "l2_support_team",
                        "analyzer_permission": "access",
                        "target_reporting_groups": [
                          "64f0c2a1b2d3e4f5060708d1"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Role updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleV2"
                }
              }
            }
          },
          "400": {
            "description": "Invalid path parameter or invalid request body contract.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_request_body": {
                    "summary": "Malformed update payload",
                    "value": {
                      "error": {
                        "message": "Cuerpo de solicitud invalido",
                        "code": "bad_request",
                        "details": "permissions[0].target_organization debe ser una cadena hexadecimal en minusculas de 24 caracteres o el valor all"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Role not found within the authorized scope of the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "role_not_found": {
                    "summary": "Requested role not found",
                    "value": {
                      "error": {
                        "message": "Rol no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the existing role state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "role_name_conflict": {
                    "summary": "Role name already exists",
                    "value": {
                      "error": {
                        "message": "El nombre del rol ya existe",
                        "code": "conflict",
                        "details": "name ya esta en uso dentro de esta organizacion"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/tenants/{tenant_id}": {
      "delete": {
        "tags": [
          "Tenants"
        ],
        "summary": "Delete a tenant",
        "operationId": "deleteTenant",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the tenant's owning organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the tenant to be deleted",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "204": {
            "description": "Tenant deleted successfully. The related organization has been deactivated. No content is returned in the response body."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Invalid path parameters - Invalid tenant ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: authentication required or user does not have permissions to delete the tenant. Also returned when attempting to delete a tenant from the user's own organization."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Tenant not found"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity: business logic validation error. Common causes: - Cannot delete a tenant with sub-tenants (organization has more than one tenant) - Cannot delete a tenant from its own organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Delete an existing tenant and deactivate the related organization. A tenant from the user's own organization cannot be deleted. A tenant cannot be deleted if the organization has more than one tenant."
      },
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Retrieve a tenant",
        "operationId": "getTenantById",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the tenant",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant details retrieved successfully. The response includes the full tenant information, including product and policy assignments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantByIdV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request - invalid tenant ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Tenant not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieves detailed information about a specific tenant, including its configuration, product assignment, policy assignment, and metadata. Returns complete tenant data for the specified organization."
      },
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Update a tenant",
        "operationId": "updateTenant",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the tenant's owning organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "tenant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "Unique identifier for the tenant to update",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Tenant name successfully updated. The related organization's name has also been updated. The response contains the updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantByIdV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Invalid request body or path parameters - Missing required field (name) - Invalid field types"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: authentication required or user lacks permission to update tenant"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Tenant not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantRequestV2"
              },
              "examples": {
                "update-tenant-name": {
                  "summary": "Update the name of an existing tenant",
                  "value": {
                    "name": "Tenant de Produccion Actualizado"
                  }
                }
              }
            }
          }
        },
        "description": "Update the name of an existing tenant. Updating the tenant name also updates the related organization's name."
      }
    },
    "/v2/organizations/{organization_id}/users/{user_id}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete a user",
        "operationId": "delete_user_by_id",
        "description": "Delete the specified user within the scope of an organization ",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "User identifier.",
            "example": "64f0c2a1b2d3e4f506070801"
          }
        ],
        "responses": {
          "204": {
            "description": "User successfully deleted."
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_user_id": {
                    "summary": "Invalid user ID format ",
                    "value": {
                      "error": {
                        "message": "Formato de user_id no válido",
                        "code": "bad_request",
                        "details": "user_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found within the authorized scope of the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "user_not_found": {
                    "summary": "The requested user was not found",
                    "value": {
                      "error": {
                        "message": "Usuario no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Retrieve a user",
        "operationId": "get_user_by_id",
        "description": "Returns details of the requested user within the scope of an organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "User identifier.",
            "example": "64f0c2a1b2d3e4f506070801"
          }
        ],
        "responses": {
          "200": {
            "description": "User details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserByIdV2"
                },
                "examples": {
                  "user_details": {
                    "summary": "User detail response",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070801",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Ana",
                      "surname": "Lopez",
                      "email": "ana.lopez@example.com",
                      "language": "en-EN",
                      "created_at": "2025-12-01T10:30:00.000Z",
                      "department": "Soporte",
                      "role_id": "64f0c2a1b2d3e4f5060708aa",
                      "created_by": "64f0c2a1b2d3e4f5060708bb",
                      "email_login_enabled": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_user_id": {
                    "summary": "Invalid user ID format ",
                    "value": {
                      "error": {
                        "message": "Formato de user_id no valido",
                        "code": "bad_request",
                        "details": "user_id debe ser una cadena hexadecimal en minusculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "User not found within the authorized scope of the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "user_not_found": {
                    "summary": "The requested user was not found",
                    "value": {
                      "error": {
                        "message": "Usuario no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update a user",
        "operationId": "update_user",
        "description": "Fully updates the user's editable data in the organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "User ID to update ",
            "example": "64f0c2a1b2d3e4f506070801"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRequestV2"
              },
              "examples": {
                "full_update": {
                  "summary": "Complete user update payload",
                  "value": {
                    "name": "Ana",
                    "surname": "Lopez",
                    "email": "ana.lopez@example.com",
                    "department": "Support",
                    "role_id": "64f0c2a1b2d3e4f5060708aa"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserByIdV2"
                },
                "examples": {
                  "updated": {
                    "summary": "User updated",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070801",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Ana",
                      "surname": "Lopez",
                      "email": "ana.lopez@example.com",
                      "language": "en-EN",
                      "created_at": "2026-06-22T16:00:00.000Z",
                      "department": "Support",
                      "role_id": "64f0c2a1b2d3e4f5060708aa",
                      "created_by": "64f0c2a1b2d3e4f5060708bb",
                      "email_login_enabled": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid path parameter or invalid request body contract.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_request_body": {
                    "summary": "Malformed update payload",
                    "value": {
                      "error": {
                        "message": "Cuerpo de solicitud inválido",
                        "code": "bad_request",
                        "details": "el parámetro de ruta user_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The target resource was not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "user_not_found": {
                    "summary": "The target user was not found",
                    "value": {
                      "error": {
                        "message": "Usuario no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with an existing resource state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "email_conflict": {
                    "summary": "The email already exists",
                    "value": {
                      "error": {
                        "message": "El correo electrónico ya existe",
                        "code": "conflict",
                        "details": "el correo electrónico ya está registrado para otro usuario"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}": {
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete a workspace",
        "operationId": "delete_workspace_by_id",
        "description": "Accept the request for workspace deletion within the scope of an authorized organization and initiate an asynchronous flow. The response returns the created operation, which can be checked later in the operations endpoints.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace identifier.",
            "example": "64f0c2a1b2d3e4f506070801"
          }
        ],
        "responses": {
          "202": {
            "description": "Request accepted. Operation is returned for tracking in operations endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOperationByIdResponseV2"
                },
                "examples": {
                  "operation_created": {
                    "summary": "Operation created for asynchronous deletion",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070811",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "delete_workspace",
                      "description": "Operacion de eliminacion de workspace",
                      "status": "pending",
                      "created_at": "2026-06-05T14:12:00Z",
                      "started_at": null,
                      "ended_at": null,
                      "microservice_id": null,
                      "flow_id": null,
                      "remote_support": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_workspace_id": {
                    "summary": "Invalid workspace_id format",
                    "value": {
                      "error": {
                        "message": "Formato de workspace_id no valido",
                        "code": "bad_request",
                        "details": "workspace_id debe ser una cadena hexadecimal en minusculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "The requested workspace was not found",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Retrieve a workspace",
        "operationId": "getWorkspaceById",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "Unique identifier for the Workspace",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspacePublicV2"
                },
                "examples": {
                  "workspace-details": {
                    "summary": "Detailed Workspace information",
                    "value": {
                      "id": "22f5381aa25e89b73785ca34",
                      "organization_id": "155f78b81155f8ab327ef274",
                      "name": "SDI04-001.org.terravex.net",
                      "related_environment": "1437d381972ce53252aabe72f053af7c",
                      "operating_system": "Microsoft Windows Server 2022 Standard 21H2",
                      "serial_number": "40a70e53327456131ae3321135531ae87f655cbeab27f01134c7ef366a7f2402",
                      "ip_address": "172.30.113.115",
                      "os_update_num_pending": 5,
                      "reporting_group_id": "65f83219942714fc24f01435",
                      "flxmid": "50a70e53327456131ae5921135531ae87f639cbe5b27f09034c7ef366a7f2402",
                      "os_update_num_days_since_last": 183,
                      "total_ram": 8191,
                      "altitude": 0,
                      "antivirus": "Windows Defender",
                      "antivirus_status": "installed_working",
                      "bios_manufacturer": "VMware, Inc.",
                      "bios_mode": "UEFI",
                      "bios_version": "P79 Ver. 6.00",
                      "bios_smbversion": "2.7",
                      "bios_serialnumber": "VMware-42 06 fd 7c 3a f4 af 1c-97 07 56 e2 07 67 d7 23",
                      "base_board_manufacturer": "Intel Corporation",
                      "base_board_product": "440BX Desktop Reference Platform",
                      "base_board_version": "A30",
                      "broker": "citrix_on-premises",
                      "public_ip_city": "Barcelona",
                      "flexxagent_version": "25.9.1.0",
                      "compliance_result": "not_evaluated",
                      "compliance_last_execution": "2025-06-12T06:13:17.17Z",
                      "domain_name": "org.terravex.net",
                      "public_ip_country": "ES",
                      "cores_count": "4",
                      "edr_active_detections": false,
                      "edr_host_id": "11bbcc1e6e2c440aa8b7522a78a292ad",
                      "edr_status": "installed_working",
                      "edr_version": "7.05.17706.0",
                      "current_subnet": "172.30.213.0/24",
                      "default_gateway": "172.30.213.1",
                      "device_kind": "virtual",
                      "edr": "CrowdStrike",
                      "ema_agent_version": "",
                      "ema_endpoint_id": "",
                      "embedded_controller_version": "255.255",
                      "os_fast_startup": false,
                      "flexxanalyzer_config": "configured",
                      "flexxanalyzer_version": "3.0.2",
                      "hypervisor": "vmware_vsphere",
                      "ip_version": "IPv4",
                      "public_ip_isp": "Cloudflare, Inc.",
                      "iot_hub_config_sync_status": "synced",
                      "is_amt_supported": false,
                      "is_laptop": false,
                      "is_physical": false,
                      "last_boot_duration": 20,
                      "last_restart_time": null,
                      "last_time": "2025-06-12T06:13:17.17Z",
                      "last_windows_update": "2025-09-18T00:00:00.00Z",
                      "last_autorepair": "2025-06-10T10:00:00.00Z",
                      "latitude": 0,
                      "locale": "English (United States)",
                      "longitude": 0,
                      "mac_address": "10-52-56-36-21-42",
                      "network_interface_type": "unknown",
                      "os_build_number": "6.3.20348.4171",
                      "os_manufacturer": "Microsoft Corporation",
                      "os_version": "10.0.20348.20348",
                      "ou": "OU=NonPersistent,OU=Workstations,OU=OPS914,DC=ops914,DC=terravex,DC=net",
                      "os_page_file": "C:\\pagefile.sys",
                      "os_page_file_space": 512,
                      "platform_role": "Desktop",
                      "platform_type": "windows",
                      "processor": "Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz, 4 Core(s), 4 Logical Processors",
                      "public_ip": "19.27.129.141",
                      "os_reboot_pending": false,
                      "secure_boot_state": "On",
                      "system_model": "VMware7,1",
                      "system_type": "x64-based PC",
                      "os_time_zone": "Romance Standard Time",
                      "user_name": "Domain\\user001",
                      "vm_type": "workspace",
                      "windows_type": "server",
                      "created_at": "2023-12-18T11:26:11.11Z",
                      "last_deregistration_time": "2026-01-19T12:26:25.25Z",
                      "delete_scheduled_at": "2026-07-15T00:00:00.000Z",
                      "encrypted_harddisks": "partial",
                      "custom_field_01": "testVal1",
                      "custom_field_02": "testVal2",
                      "custom_field_03": "4",
                      "custom_field_04": "",
                      "custom_field_05": "",
                      "custom_field_06": "",
                      "custom_field_07": "",
                      "custom_field_08": "",
                      "custom_field_09": "",
                      "custom_field_10": "",
                      "flexxagent_type": "unified",
                      "antivirus_version_number": "4.18.2104.5",
                      "related_location": "C08D2228-E80A-4ADA-A75F-03E33E71D119",
                      "area": "Development",
                      "custom_field_11": "",
                      "custom_field_12": "",
                      "custom_field_13": "",
                      "custom_field_14": "",
                      "custom_field_15": "",
                      "custom_field_16": "",
                      "custom_field_17": "",
                      "custom_field_18": "",
                      "custom_field_19": "",
                      "custom_field_20": "",
                      "department": "Department",
                      "office": "Office",
                      "last_custom_fields_update": "2025-12-24T11:24:51.51Z",
                      "workspace_id": "6676aa0c1e9c850250a70e53327456131ae59211aa531ae87f639cbe5b27f09034c7e3366a7f2402",
                      "flexxanalyzer_proxy_uri": "",
                      "iot_hub_name": "idIot0e33d84fe5761e",
                      "flexxagent_status": "stopped",
                      "boot_hard_disk_used_percentage": 34,
                      "last_connection_time": "2025-06-12T06:13:17.17Z",
                      "network_signal": 0,
                      "num_alerts": 0,
                      "percent_cpu": 17,
                      "percent_ram": 0,
                      "power_state": "off",
                      "sessions_count": 0,
                      "used_system_disk_c": 34,
                      "wake_on_lan_mac": "10-50-56-56-51-12",
                      "wake_on_lan_subnet": "172.30.213.0/24",
                      "broker_status": "disconnected",
                      "status": "online"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request: Workspace ID format not valid"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve detailed information about a specific Workspace."
      }
    },
    "/v2/organizations/{organization_id}/workspace-groups/{workspace_group_id}/schedules/{schedule_id}": {
      "delete": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Delete a cron schedule",
        "operationId": "deleteWorkspaceGroupSchedule",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          },
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the schedule to delete",
            "example": "507f1f77bcf86cd799439060"
          }
        ],
        "responses": {
          "204": {
            "description": "Schedule deleted successfully. No content is returned."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request - Invalid schedule ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - user does not have access to the organization, or the organization does not exist"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group or schedule not found, or workspace group belongs to a different organization (after authorization is checked)"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Delete a cron schedule from a workspace group. Once deleted, the automated energy operation defined by this schedule will no longer execute. The schedule must belong to the specified workspace group and organization."
      },
      "get": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Retrieve a cron schedule",
        "operationId": "getWorkspaceGroupScheduleById",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          },
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the schedule",
            "example": "507f1f77bcf86cd799439060"
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule details successfully retrieved. The response includes cron expression, timezone, type, intermediate device information, and audit metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupScheduleV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request - Invalid schedule ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - user does not have access to the organization, or the organization does not exist"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group or schedule not found, or workspace group belongs to a different organization (after authorization is checked)"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve detailed information about specific cron scheduling for a group of workspaces. Returns schedule configuration, including cron expression, timezone, operation type, intermediate device configuration, and audit metadata (created by, updated by, updated on)."
      },
      "put": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Update a cron schedule",
        "operationId": "updateWorkspaceGroupSchedule",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          },
          {
            "name": "schedule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique ID of the schedule to be updated.",
            "example": "507f1f77bcf86cd799439060"
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule updated successfully. The response contains the updated schedule resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupScheduleV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Common causes: - Mandatory fields are missing (cron_expression, time_zone, type) - Invalid cron expression format - Invalid time zone value - Invalid scheduling type (must be START, STOP, or RESTART) - Invalid intermediate_device Workspace ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group or schedule not found, or does not belong to the organization"
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "Conflict - Scheduling with the same type, time, and day already exists (after time zone conversion), excluding the current schedule being updated"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable entity. Common causes: - Intermediate_device Workspace ID does not exist or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspaceGroupScheduleRequestV2"
              },
              "examples": {
                "update-schedule-time": {
                  "summary": "Update schedule to run at a different time",
                  "value": {
                    "cron_expression": "0 9 * * 1-5",
                    "time_zone": "Eastern Standard Time",
                    "type": "start"
                  }
                },
                "add-intermediate-device": {
                  "summary": "Add intermediate device to an existing START schedule",
                  "value": {
                    "cron_expression": "0 8 * * 1-5",
                    "time_zone": "Eastern Standard Time",
                    "type": "start",
                    "intermediate_device": "507f1f77bcf86cd799439050"
                  }
                },
                "remove-intermediate-device": {
                  "summary": "Remove intermediate device from START schedule",
                  "value": {
                    "cron_expression": "0 8 * * 1-5",
                    "time_zone": "Eastern Standard Time",
                    "type": "start"
                  }
                },
                "change-schedule-type": {
                  "summary": "Change schedule type from START to STOP",
                  "value": {
                    "cron_expression": "0 18 * * 1-5",
                    "time_zone": "UTC",
                    "type": "stop"
                  }
                }
              }
            }
          }
        },
        "description": "Update an existing cron schedule for a workspace group. All schedule fields must be provided, as this endpoint implements full replacement semantics. System validates no conflicting schedule exists (same type, time, and day after timezone conversion), excluding the schedule being updated. To remove an intermediate device from a START schedule, omit the intermediate_device field."
      }
    },
    "/v2/organizations/{organization_id}/workspace-groups/{workspace_group_id}": {
      "delete": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Delete a workspace group",
        "operationId": "deleteWorkspaceGroup",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group to be deleted",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "204": {
            "description": "Workspace group deleted successfully. No content is returned."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request - invalid workspace group ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Permanently delete a workspace group from the organization. This action cannot be undone. Returns no content (204) after a successful deletion."
      },
      "get": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Retrieve a workspace group",
        "operationId": "getWorkspaceGroupById",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace group details retrieved successfully. The response includes the workspace group configuration, type, and location.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupDetailResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request - invalid workspace group ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve detailed information about a specific workspace group, including its configuration, type, and location. Returns workspace group data matching the listing endpoint structure."
      },
      "put": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Update a workspace group",
        "operationId": "updateWorkspaceGroup",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "Unique identifier for the workspace group to update",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace group successfully updated. The response contains the updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupDetailResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Missing required fields (name, description, location) - Invalid field values - Invalid location structure - Missing required location fields (latitude, longitude, address)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or does not belong to the organization"
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "Conflict - a workspace group with the same name already exists"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity",
            "description": "Unprocessable Entity - business rule violation (e.g., cannot set filter on Entra ID workspace group)"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceGroupUpdateRequestV2"
              },
              "examples": {
                "update-workspace-group-(full-replacement)": {
                  "summary": "Update workspace group with all required fields",
                  "value": {
                    "name": "Grupo de Workspace de Produccion Actualizado",
                    "description": "Grupo de workspaces actualizado para entornos de producción",
                    "location": {
                      "latitude": 40.4168,
                      "longitude": -3.7038,
                      "address": "Madrid, Espana",
                      "description": "Ubicación de oficina actualizada"
                    }
                  }
                },
                "update-workspace-group-without-location-description": {
                  "summary": "Update workspace group with required fields; location description is optional",
                  "value": {
                    "name": "Grupo de Workspace de Produccion Actualizado",
                    "description": "Grupo de workspaces actualizado para entornos de producción",
                    "location": {
                      "latitude": 40.4168,
                      "longitude": -3.7038,
                      "address": "Madrid, Espana"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Updates the configuration of an existing workspace group, including name, description, and location. This is a PUT request that implements full replacement: all updatable fields are mandatory. Returns the updated resource (200) after a successful update."
      }
    },
    "/v2/organizations/{organization_id}/audits": {
      "get": {
        "tags": [
          "Audit"
        ],
        "operationId": "get_audits",
        "summary": "List audits",
        "description": "Returns audit events of the specified organization to check what action was taken, on which entity, when it occurred, and who triggered it. When `trigger_type` is `user`, `trigger_id` corresponds to the user ID and can be queried via the user endpoint. When `trigger_type` is `api`, `trigger_id` corresponds to the API key ID; currently API keys are not queryable from this public API.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "description": "Organization identifier.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to query.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated list of response fields to include.",
            "schema": {
              "type": "string",
              "example": "id,audited_at,action,entity_type,entity_id,trigger_type,trigger_id,trigger_name"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`).",
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "Filtering JSON expression on filterable fields in the response.",
            "schema": {
              "type": "string"
            },
            "examples": {
              "simple": {
                "summary": "Simple filter by entity type",
                "value": "{\"field\":\"entity_type\",\"op\":\"eq\",\"value\":\"workspace\"}"
              },
              "complex-and": {
                "summary": "AND combination by action and entity type",
                "value": "{\"and\":[{\"field\":\"action\",\"op\":\"eq\",\"value\":\"update\"},{\"field\":\"entity_type\",\"op\":\"eq\",\"value\":\"workspace\"}]}"
              },
              "complex-or-and": {
                "summary": "OR combination within AND with actor and action",
                "value": "{\"and\":[{\"or\":[{\"field\":\"trigger_id\",\"op\":\"eq\",\"value\":\"8c1a7e2b9f4d3c6e0a5b1d2f\"},{\"field\":\"trigger_id\",\"op\":\"eq\",\"value\":\"f0b9c3d7a1e5f8b2c4d6e9a0\"}]},{\"field\":\"action\",\"op\":\"eq\",\"value\":\"delete\"}]}"
              }
            }
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "description": "JSON expression for aggregation. Structure: {\"group_by\":[\"field\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}. Cannot be combined with `fields`.",
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "examples": {
              "group-by-action-count": {
                "summary": "Group by action and count",
                "value": "{\"group_by\":[\"action\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group-by-entity-type-count": {
                "summary": "Group by entity type and count",
                "value": "{\"group_by\":[\"entity_type\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit list retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAuditsResponseV2"
                },
                "examples": {
                  "list-mode": {
                    "summary": "List mode response",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "b7e4c2a9d1f6038e5a2c9b4d",
                          "audited_at": "2026-06-30T11:45:12.000Z",
                          "organization_id": "a9d3f1b7c4e8026d5f0a3c8e",
                          "action": "update",
                          "entity_type": "workspace",
                          "entity_id": "c2f8a1d4b9e3067f5c0d2a8e",
                          "trigger_type": "api",
                          "trigger_id": "8c1a7e2b9f4d3c6e0a5b1d2f",
                          "trigger_name": "Api Key"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "BAD_REQUEST",
                    "message": "Invalid request data",
                    "details": "fields and aggregate cannot be combined."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized to access the requested organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "No autorizado para acceder a la organización solicitada."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "El recurso solicitado no existe en la organización indicada."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Se ha producido un error interno."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/flows/condition-types": {
      "get": {
        "tags": [
          "Flows"
        ],
        "summary": "List condition types",
        "operationId": "listConditionTypes",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Items per page (default: 100, max: 100)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sort field with optional order suffix (:asc or :desc). Use response property names. Valid fields: id, name, description, type, value_type, value_placeholder, period. Example: \"name:asc\" or \"type:desc\""
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each condition type item. Selectable fields: id, name, description, type, frequency_values, value_type, value_placeholder, op_values, period. The id field is always included.",
            "example": "name,type,op_values"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "Filter condition types by one or more criteria. Provide a JSON object with filter conditions. You can filter by any field returned in the response. Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by condition type",
                "description": "Returns condition types matching a specific type identifier.",
                "value": "{\"field\": \"type\", \"op\": \"eq\", \"value\": \"osVersion\"}"
              },
              "complex-and": {
                "summary": "Filter by value type and periodic support",
                "description": "Returns non-periodic string-based condition types.",
                "value": "{\"and\": [{\"field\": \"value_type\", \"op\": \"eq\", \"value\": \"string\"}, {\"field\": \"period\", \"op\": \"eq\", \"value\": false}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match by name or description text and restrict by condition type.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"name\", \"op\": \"contains\", \"value\": \"os\"}, {\"field\": \"description\", \"op\": \"contains\", \"value\": \"version\"}]}, {\"field\": \"type\", \"op\": \"eq\", \"value\": \"osVersion\"}]}"
              }
            }
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "en-EN",
                "es-ES",
                "pt-BR",
                "ca-ES",
                "eu-ES"
              ],
              "default": "es-ES"
            },
            "description": "Language code for text fields that support multiple languages. When creating or updating resources, this specifies the language of the provided text values. Upon retrieving resources, it determines which language variant of the multilingual text fields is returned. Accepted values: 'en-EN' (English), 'es-ES' (Spanish), 'pt-BR' (Portuguese), 'ca-ES' (Catalan), 'eu-ES' (Basque). If not provided, default is 'es-ES'."
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of condition types successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionTypeV2ListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request - Invalid organization ID"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of available condition types that can be used in flow conditions. Supports pagination, sorting, filtering, and field selection."
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/core-process-groups/{core_process_group_id}/core-processes": {
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "List Core Processes of Group",
        "operationId": "listDigitalActivityCoreProcessGroupCoreProcesses",
        "description": "Returns the complete current list of the group's core processes within the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "core_process_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the core process group.",
            "example": "64f0c2a1b2d3e4f506070811"
          }
        ],
        "responses": {
          "200": {
            "description": "Core processes retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDigitalActivityCoreProcessGroupCoreProcessesResponseV2"
                },
                "examples": {
                  "core_processes_list": {
                    "summary": "Complete list of the group's core processes",
                    "value": {
                      "data": [
                        {
                          "name": "Microsoft Word",
                          "process_name": "WINWORD.EXE"
                        },
                        {
                          "name": "Microsoft Excel",
                          "process_name": "EXCEL.EXE"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_path_params": {
                    "summary": "Invalid identifier format",
                    "value": {
                      "error": {
                        "message": "Parámetros de ruta no válidos",
                        "code": "bad_request",
                        "details": "organization_id y core_process_group_id deben tener 24 caracteres hexadecimales."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Core process group not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Digital activity"
        ],
        "summary": "Replace Core Processes of Group",
        "operationId": "replaceDigitalActivityCoreProcessGroupCoreProcesses",
        "description": "Replaces the complete set of a group's core processes within the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "core_process_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the core process group.",
            "example": "64f0c2a1b2d3e4f506070811"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceDigitalActivityCoreProcessGroupCoreProcessesRequestV2"
              },
              "examples": {
                "full_replace_two_items": {
                  "summary": "Full replacement with two processes",
                  "value": {
                    "core_processes": [
                      {
                        "name": "Excel",
                        "process_name": "excel.exe"
                      },
                      {
                        "name": "Adobe Acrobat",
                        "process_name": "acrobat.exe"
                      }
                    ]
                  }
                },
                "full_replace_empty_list": {
                  "summary": "Full replacement to empty the list",
                  "value": {
                    "core_processes": []
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Core processes replaced successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCoreProcessGroupCoreProcessesResponseV2"
                },
                "examples": {
                  "full_replace_response": {
                    "summary": "Final state of core processes after replacement",
                    "value": {
                      "data": [
                        {
                          "name": "Microsoft Word",
                          "process_name": "WINWORD.EXE"
                        },
                        {
                          "name": "Microsoft Excel",
                          "process_name": "EXCEL.EXE"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_request": {
                    "summary": "Invalid request",
                    "value": {
                      "error": {
                        "message": "Parámetros o cuerpo de solicitud no válidos",
                        "code": "bad_request",
                        "details": "organization_id y core_process_group_id deben tener 24 caracteres hexadecimales y cada elemento de core_processes debe incluir name y process_name."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Core process group not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Business conflict for resource replacement.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "duplicate_process_name": {
                    "summary": "Duplicate process in the collection",
                    "value": {
                      "error": {
                        "message": "La colección incluye procesos duplicados",
                        "code": "core_process_already_exists",
                        "details": "Cada process_name debe ser único dentro de core_processes."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/core-process-groups/{core_process_group_id}": {
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "Retrieve Core Process Group",
        "operationId": "getDigitalActivityCoreProcessGroup",
        "description": "Returns the detail of a core process group in the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "core_process_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the core process group.",
            "example": "64f0c2a1b2d3e4f506070811"
          }
        ],
        "responses": {
          "200": {
            "description": "Core process group retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDigitalActivityCoreProcessGroupResponseV2"
                },
                "examples": {
                  "core_process_group_detail": {
                    "summary": "Core process group detail",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070811",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Grupo de procesos core A",
                      "description": "Grupo principal de procesos de productividad",
                      "workspace_group_id": "64f0c2a1b2d3e4f506070822"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_path_params": {
                    "summary": "Invalid identifier format",
                    "value": {
                      "error": {
                        "message": "Parámetros de ruta no válidos",
                        "code": "bad_request",
                        "details": "organization_id y core_process_group_id deben tener 24 caracteres hexadecimales."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Digital activity"
        ],
        "summary": "Update Core Process Group",
        "operationId": "updateDigitalActivityCoreProcessGroup",
        "description": "Completely updates a core process group in the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "core_process_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the core process group.",
            "example": "64f0c2a1b2d3e4f506070811"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDigitalActivityCoreProcessGroupRequestV2"
              },
              "examples": {
                "full_update_with_description": {
                  "summary": "Full update with description",
                  "value": {
                    "name": "Grupo base de productividad",
                    "description": "Grupo principal para procesos de productividad",
                    "workspace_group_id": "64f0c2a1b2d3e4f506070822"
                  }
                },
                "full_update_without_description": {
                  "summary": "Full update without description",
                  "value": {
                    "name": "Grupo base de productividad",
                    "description": null,
                    "workspace_group_id": "64f0c2a1b2d3e4f506070823"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Core process group updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetDigitalActivityCoreProcessGroupResponseV2"
                },
                "examples": {
                  "updated": {
                    "summary": "Resource updated",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070811",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Grupo base de productividad",
                      "description": "Grupo principal para procesos de productividad",
                      "workspace_group_id": "64f0c2a1b2d3e4f506070822"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_body": {
                    "summary": "Invalid request body",
                    "value": {
                      "error": {
                        "message": "Cuerpo de solicitud inválido",
                        "code": "bad_request",
                        "details": "name, description y workspace_group_id son obligatorios y deben cumplir el formato esperado."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Business conflict for resource update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "duplicate_name": {
                    "summary": "Name already registered",
                    "value": {
                      "error": {
                        "message": "Ya existe un grupo de procesos core con ese nombre",
                        "code": "core_process_group_name_already_exists"
                      }
                    }
                  },
                  "workspace_group_already_assigned": {
                    "summary": "Workspace group already assigned",
                    "value": {
                      "error": {
                        "message": "El grupo de workspaces ya está asignado a otro grupo de procesos core",
                        "code": "core_process_group_workspace_group_already_assigned"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/core-process-metrics": {
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "List Core Process Metrics",
        "operationId": "listDigitalActivityCoreProcessMetrics",
        "description": "Returns a paginated list of digital activity metrics by core process of the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields separated by commas for each element.",
            "example": "workspace_id,core_process_group_id,reporting_time_hours,month,year"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Filter by workspace identifier",
                "value": "{\"field\":\"workspace_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070811\"}"
              },
              "complex-and": {
                "summary": "Filter by year and activity threshold",
                "value": "{\"and\":[{\"field\":\"year\",\"op\":\"eq\",\"value\":2025},{\"field\":\"core_activity_time_hours\",\"op\":\"lte\",\"value\":120}]}"
              },
              "complex-or-and": {
                "summary": "Combine process groups with target month",
                "value": "{\"and\":[{\"or\":[{\"field\":\"core_process_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070822\"},{\"field\":\"reporting_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070823\"}]},{\"field\":\"month\",\"op\":\"eq\",\"value\":3}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc on sortable scalar fields of the response.",
            "example": "reporting_time_hours:desc"
          }
        ],
        "responses": {
          "200": {
            "description": "Digital activity metrics by core processes retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDigitalActivityCoreProcessMetricsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with results",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "workspace_id": "64f0c2a1b2d3e4f506070811",
                          "core_process_group_id": "64f0c2a1b2d3e4f506070822",
                          "reporting_group_id": "64f0c2a1b2d3e4f506070823",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "core_activity_time_hours": 42.5,
                          "reporting_time_hours": 120.5,
                          "opened_session_time_hours": 150.75,
                          "user_active_time_hours": 98.2,
                          "month": 3,
                          "year": 2025,
                          "deleted_date": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/hybrid-work-metrics": {
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "List Hybrid Work Metrics",
        "operationId": "listDigitalActivityHybridWorkMetrics",
        "description": "Returns a paginated list of hybrid digital activity metrics of the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "include_deleted_workspaces",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Controls the inclusion of deleted workspaces. If false, they are excluded; if omitted or true, they are included."
          },
          {
            "name": "include_virtual_workspaces",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Controls the inclusion of virtual workspaces. If false, they are excluded; if omitted or true, they are included."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields separated by commas for each element.",
            "example": "user_name,total_active_time_hours,month,year,organization_id"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Filter by user",
                "value": "{\"field\":\"user_name\",\"op\":\"contains\",\"value\":\"ana\"}"
              },
              "complex-and": {
                "summary": "Filter by year and total minimum activity",
                "value": "{\"and\":[{\"field\":\"year\",\"op\":\"eq\",\"value\":2025},{\"field\":\"total_active_time_hours\",\"op\":\"gte\",\"value\":40}]}"
              },
              "complex-or-and": {
                "summary": "Combine organization and remote activity",
                "value": "{\"and\":[{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439011\"},{\"field\":\"remote_active_time_hours\",\"op\":\"gte\",\"value\":10}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc on sortable scalar fields of the response.",
            "example": "total_active_time_hours:desc"
          }
        ],
        "responses": {
          "200": {
            "description": "Hybrid digital activity metrics retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDigitalActivityHybridWorkMetricsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with results",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "user_name": "ana.lopez",
                          "office_active_time_hours": 18.25,
                          "remote_active_time_hours": 22.5,
                          "ambiguous_active_time_hours": 1,
                          "total_active_time_hours": 41.75,
                          "month": 3,
                          "year": 2025,
                          "organization_id": "507f1f77bcf86cd799439011"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/user-metrics": {
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "List User Metrics",
        "operationId": "listDigitalActivityUserMetrics",
        "description": "Returns a paginated list of digital activity metrics by user of the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields separated by commas for each element.",
            "example": "workspace_id,user_name,user_active_time_hours,month,year"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Filter by user",
                "value": "{\"field\":\"user_name\",\"op\":\"contains\",\"value\":\"ana\"}"
              },
              "complex-and": {
                "summary": "Filter by year and maximum activity",
                "value": "{\"and\":[{\"field\":\"year\",\"op\":\"eq\",\"value\":2025},{\"field\":\"user_active_time_hours\",\"op\":\"lte\",\"value\":120}]}"
              },
              "complex-or-and": {
                "summary": "Combine organization and reporting group",
                "value": "{\"and\":[{\"or\":[{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439011\"},{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439012\"}]},{\"field\":\"reporting_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070822\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc on sortable scalar fields of the response.",
            "example": "user_active_time_hours:desc"
          }
        ],
        "responses": {
          "200": {
            "description": "Digital activity metrics by user retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDigitalActivityUserMetricsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with results",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "workspace_id": "64f0c2a1b2d3e4f506070811",
                          "user_name": "ana.lopez",
                          "reporting_group_id": "64f0c2a1b2d3e4f506070822",
                          "reporting_time_hours": 120.5,
                          "opened_session_time_hours": 150.75,
                          "user_active_time_hours": 98.2,
                          "month": 3,
                          "year": 2025,
                          "deleted_date": null,
                          "organization_id": "507f1f77bcf86cd799439011"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/digital-activity/workspace-metrics": {
      "get": {
        "tags": [
          "Digital activity"
        ],
        "summary": "List Workspace Metrics",
        "operationId": "listDigitalActivityWorkspaceMetrics",
        "description": "Returns a paginated list of digital activity metrics by workspace of the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields separated by commas for each element.",
            "example": "workspace_id,reporting_time_hours,month,year"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Filter by workspace identifier",
                "value": "{\"field\":\"workspace_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070811\"}"
              },
              "complex-and": {
                "summary": "Filter by year and open session threshold",
                "value": "{\"and\":[{\"field\":\"year\",\"op\":\"eq\",\"value\":2025},{\"field\":\"opened_session_time_hours\",\"op\":\"lte\",\"value\":150.75}]}"
              },
              "complex-or-and": {
                "summary": "Combine reporting group with user activity",
                "value": "{\"and\":[{\"or\":[{\"field\":\"reporting_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070822\"},{\"field\":\"reporting_group_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f506070823\"}]},{\"field\":\"user_active_time_hours\",\"op\":\"gte\",\"value\":80}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc on sortable scalar fields of the response.",
            "example": "reporting_time_hours:desc"
          }
        ],
        "responses": {
          "200": {
            "description": "Digital activity metrics by workspace retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDigitalActivityWorkspaceMetricsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with results",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "workspace_id": "64f0c2a1b2d3e4f506070811",
                          "reporting_group_id": "64f0c2a1b2d3e4f506070822",
                          "reporting_time_hours": 120.5,
                          "opened_session_time_hours": 150.75,
                          "user_active_time_hours": 98.2,
                          "core_activity_time_hours": 45,
                          "month": 3,
                          "year": 2025,
                          "deleted_date": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Digital activity is not enabled for the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "digital_activity_not_enabled": {
                    "summary": "Digital activity not enabled",
                    "value": {
                      "error": {
                        "message": "Digital Activity is not enabled for organization",
                        "code": "forbidden"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent resource",
                    "value": {
                      "error": {
                        "message": "Recurso no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "too_many_requests": {
                    "summary": "Too Many Requests",
                    "value": {
                      "error": {
                        "message": "Demasiadas solicitudes",
                        "code": "too_many_requests"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/installed-apps/{installed_app_id}": {
      "get": {
        "tags": [
          "Installed apps"
        ],
        "summary": "Retrieve an installed application",
        "operationId": "get_installed_app_by_id",
        "description": "Returns details of the requested installed application within the scope of an organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "installed_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the installed application.",
            "example": "64f0c2a1b2d3e4f5060709aa"
          }
        ],
        "responses": {
          "200": {
            "description": "Installed application details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInstalledAppByIdResponseV2"
                },
                "examples": {
                  "installed_app_details": {
                    "summary": "Installed application detail response",
                    "value": {
                      "id": "64f0c2a1b2d3e4f5060709aa",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "Google Chrome",
                      "publisher": "Google LLC",
                      "operating_system": "windows",
                      "notes": "Administrada mediante catálogo de software",
                      "discovered_at": "2026-02-15T09:30:00.000Z",
                      "reported_at": "2026-04-01T07:45:00.000Z",
                      "installations": 4
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_installed_app_id": {
                    "summary": "Invalid installed application identifier format",
                    "value": {
                      "error": {
                        "message": "Formato de installed_app_id no válido",
                        "code": "bad_request",
                        "details": "installed_app_id debe ser una cadena hexadecimal en minúsculas de 24 caracteres"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Installed application not found within the scope of the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "installed_app_not_found": {
                    "summary": "Requested installed application not found",
                    "value": {
                      "error": {
                        "message": "Aplicación instalada no encontrada",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/installed-apps/{installed_app_id}/versions": {
      "get": {
        "tags": [
          "Installed apps"
        ],
        "summary": "List observed versions for an installed application",
        "description": "Returns a paginated list of observed versions for the installed application within the scope of the organization.",
        "operationId": "get_installed_app_versions",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "installed_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Installed application identifier.",
            "example": "64f0c2a1b2d3e4f5060708c1"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Names of response element fields, comma-separated, to be included."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on filterable field paths of the response.",
            "examples": {
              "simple": {
                "summary": "Filter by exact version",
                "value": "{\"field\":\"version\",\"op\":\"eq\",\"value\":\"117.0.5938.149\"}"
              },
              "complex-and": {
                "summary": "Filter by an exact version within an expression and",
                "value": "{\"and\":[{\"field\":\"version\",\"op\":\"eq\",\"value\":\"117.0.5938.149\"},{\"field\":\"version\",\"op\":\"eq\",\"value\":\"117.0.5938.149\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine version alternatives in nested logic",
                "value": "{\"and\":[{\"or\":[{\"field\":\"version\",\"op\":\"eq\",\"value\":\"117.0.5938.149\"},{\"field\":\"version\",\"op\":\"eq\",\"value\":\"118.0.5993.70\"}]},{\"field\":\"version\",\"op\":\"eq\",\"value\":\"118.0.5993.70\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(version|discovered_at|reported_at):(asc|desc)$"
            },
            "description": "Sort expression in the format <field>:asc|desc."
          }
        ],
        "responses": {
          "200": {
            "description": "Installed application versions retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInstalledAppVersionsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with version rows",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "version": "118.0.5993.90",
                          "reported_at": "2026-04-05T10:12:00Z",
                          "discovered_at": "2026-02-01T08:30:00Z"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No versions found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no valido",
                        "code": "bad_request",
                        "details": "filters debe ser un JSON valido"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access error",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Requested resource not found within the scope of the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "installed_app_not_found": {
                    "summary": "Installed application not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/installed-apps/{installed_app_id}/workspaces": {
      "get": {
        "tags": [
          "Installed apps"
        ],
        "summary": "List workspaces for an installed app",
        "description": "Returns a paginated list of Workspace-level observations for the selected installed app within the scope of the organization.",
        "operationId": "get_installed_app_workspaces",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "installed_app_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Installed app identifier.",
            "example": "64f0c2a1b2d3e4f5060709aa"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on response filterable field paths.",
            "examples": {
              "simple": {
                "summary": "Filter by workspace_id",
                "value": "{\"field\":\"workspace_id\",\"op\":\"eq\",\"value\":\"64f0c2a1b2d3e4f5060708f1\"}"
              },
              "complex-and": {
                "summary": "Filter by install_location and version",
                "value": "{\"and\":[{\"field\":\"install_location\",\"op\":\"contains\",\"value\":\"Program Files\"},{\"field\":\"version\",\"op\":\"contains\",\"value\":\"124\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine installed_at alternatives with an organization condition",
                "value": "{\"and\":[{\"or\":[{\"field\":\"installed_at\",\"op\":\"eq\",\"value\":\"2025-12-01T08:00:00.000Z\"},{\"field\":\"installed_at\",\"op\":\"eq\",\"value\":\"2025-11-15T09:30:00.000Z\"}]},{\"field\":\"organization_id\",\"op\":\"eq\",\"value\":\"507f1f77bcf86cd799439011\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(workspace_id|organization_id|version|reported_at|install_location|installed_at):(asc|desc)$"
            },
            "description": "Sorting expression with the format <field>:asc|desc."
          }
        ],
        "responses": {
          "200": {
            "description": "Installed app Workspace observations obtained successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInstalledAppWorkspacesResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated Workspace observations",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "workspace_id": "64f0c2a1b2d3e4f5060708f1",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "version": "124.0.2478.97",
                          "reported_at": "2026-01-15T10:20:30.000Z",
                          "install_location": "C:\\Program Files\\ExampleApp",
                          "installed_at": "2025-12-01T08:00:00.000Z"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No Workspace observations found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filters invalido",
                        "code": "bad_request",
                        "details": "filters debe ser una expresion de filtro JSON valida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Installed app not found within the scope of the authorized organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "installed_app_not_found": {
                    "summary": "Requested installed app not found",
                    "value": {
                      "error": {
                        "message": "No se encontro la app instalada",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/installed-apps": {
      "get": {
        "tags": [
          "Installed apps"
        ],
        "summary": "List installed apps",
        "description": "Returns a paginated list of installed applications available within the scope of the organization.",
        "operationId": "get_installed_apps",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response element fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on supported filter fields.",
            "examples": {
              "simple": {
                "summary": "Filter by application name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"chrome\"}"
              },
              "complex-and": {
                "summary": "Filter by operating system and installation presence",
                "value": "{\"and\":[{\"field\":\"operating_system\",\"op\":\"eq\",\"value\":\"Windows\"},{\"field\":\"has_installations\",\"op\":\"eq\",\"value\":true}]}"
              },
              "complex-or-and": {
                "summary": "Combine publisher alternatives with installation presence",
                "value": "{\"and\":[{\"or\":[{\"field\":\"publisher\",\"op\":\"contains\",\"value\":\"microsoft\"},{\"field\":\"publisher\",\"op\":\"contains\",\"value\":\"google\"}]},{\"field\":\"has_installations\",\"op\":\"eq\",\"value\":true}]}"
              }
            }
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "JSON aggregation expression with `group_by` and `aggregates`. Cannot be combined with `fields`.",
            "examples": {
              "group_by_operating_system": {
                "summary": "Group by operating system and count",
                "value": "{\"group_by\":[\"operating_system\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group_by_publisher_avg_installations": {
                "summary": "Group by publisher and calculate average installations",
                "value": "{\"group_by\":[\"publisher\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"},{\"field\":\"installations\",\"function\":\"avg\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`)."
          }
        ],
        "responses": {
          "200": {
            "description": "Installed applications retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetInstalledAppsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list of installed applications",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f5060708c1",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "name": "Microsoft Edge",
                          "discovered_at": "2026-03-10T09:00:00Z",
                          "reported_at": "2026-03-15T09:45:11Z",
                          "operating_system": "windows",
                          "publisher": "Microsoft Corporation",
                          "installations": 4
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No installed applications found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "filters debe ser un JSON válido"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource was not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "resource_not_found": {
                    "summary": "Requested resource not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/me": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "summary": "Validate token and get current context",
        "description": "Validates the token and returns the authenticated context.",
        "operationId": "get_me",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Authenticated context successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMeResponseV2"
                },
                "examples": {
                  "authenticated_context": {
                    "summary": "Organization context and token",
                    "value": {
                      "organization_id": "507f1f77bcf86cd799439011",
                      "token_id": "507f1f77bcf86cd799439022",
                      "token_name": "api-key-admin",
                      "token_created_at": "2026-03-01T10:15:00Z",
                      "token_expires_at": "2027-03-01T10:15:00Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired, or missing token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_token": {
                    "summary": "Authentication error",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/microservices/{microservice_id}": {
      "get": {
        "tags": [
          "Microservices"
        ],
        "summary": "Get microservice by identifier",
        "operationId": "get_microservice_by_id",
        "description": "Returns a microservice visible to the target organization (designer or marketplace), with enablement status and enabled configuration when present.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the organization querying the microservice.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "microservice_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the microservice to be retrieved.",
            "example": "65f0d9f2b3c4d5e6f7080911"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "default": "es-ES",
              "maxLength": 10
            },
            "description": "Language to resolve multilingual fields to a single value per field.",
            "example": "es-ES"
          }
        ],
        "responses": {
          "200": {
            "description": "Microservice successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMicroserviceByIdResponseV2"
                },
                "examples": {
                  "microservicio_habilitado": {
                    "summary": "Microservice found with enabled configuration",
                    "value": {
                      "data": {
                        "id": "65f0d9f2b3c4d5e6f7080911",
                        "organization_id": "507f1f77bcf86cd799439011",
                        "name": "Antivirus Scan",
                        "description": "Escaneo programado de antivirus",
                        "category": "security",
                        "created_at": "2026-05-15T10:00:00Z",
                        "archived_at": null,
                        "type": "standard",
                        "context": "organization",
                        "is_ai_enhanced": false,
                        "enabled": true,
                        "enabled_configuration": {
                          "enabled_at": "2026-05-15T10:30:00Z",
                          "efficiency": 95,
                          "workspace_group_execution": "l1",
                          "individual_execution": "l3",
                          "end_user_execution_workspace_group_ids": [
                            "65f0d9f2b3c4d5e6f7080931",
                            "65f0d9f2b3c4d5e6f7080932"
                          ]
                        }
                      }
                    }
                  },
                  "microservicio_no_habilitado": {
                    "summary": "Microservice found without enabled configuration",
                    "value": {
                      "data": {
                        "id": "65f0d9f2b3c4d5e6f7080912",
                        "organization_id": "507f1f77bcf86cd799439011",
                        "name": "Patch Baseline",
                        "description": "Control de parches pendientes",
                        "category": "maintenance",
                        "created_at": "2026-05-16T12:00:00Z",
                        "archived_at": null,
                        "type": "standard",
                        "context": "organization",
                        "is_ai_enhanced": true,
                        "enabled": false,
                        "enabled_configuration": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "id_invalido": {
                    "summary": "Invalid microservice identifier",
                    "value": {
                      "error": {
                        "message": "Parametro microservice_id invalido",
                        "code": "bad_request"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Access to organization not authorized",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Microservice not found in the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "microservice_not_found": {
                    "summary": "Microservice not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/microservices": {
      "get": {
        "tags": [
          "Microservices"
        ],
        "summary": "List organization microservices",
        "operationId": "get_microservices",
        "description": "Returns a paginated list of microservices visible to the target organization (own or delegated according to caller's permissions), enriched with its enablement status and associated configuration when present. Enablement resolution is strictly performed with the organization_id sent in the path.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target organization querying the catalog; enablement is verified against this same identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "Accept-Language",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "default": "es-ES",
              "maxLength": 10
            },
            "description": "Language to resolve the multilingual fields of the response to a single value per field.",
            "example": "es-ES"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields to be included, separated by commas."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON expression of filters on filterable resource fields.",
            "examples": {
              "simple": {
                "summary": "Simple filter by name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"backup\"}"
              },
              "complex-and": {
                "summary": "Combined filter with AND",
                "value": "{\"and\":[{\"field\":\"type\",\"op\":\"eq\",\"value\":\"standard\"},{\"field\":\"context\",\"op\":\"eq\",\"value\":\"organization\"}]}"
              },
              "complex-or-and": {
                "summary": "Combined filter with OR and AND",
                "value": "{\"and\":[{\"or\":[{\"field\":\"category\",\"op\":\"eq\",\"value\":\"security\"},{\"field\":\"category\",\"op\":\"eq\",\"value\":\"automation\"}]},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"agent\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Microservices successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMicroservicesResponseV2"
                },
                "examples": {
                  "resultado_con_datos": {
                    "summary": "List with results",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "id": "65f0d9f2b3c4d5e6f7080911",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "name": "Antivirus Scan",
                          "description": "Escaneo programado de antivirus",
                          "category": "security",
                          "created_at": "2026-05-15T10:00:00Z",
                          "archived_at": null,
                          "type": "standard",
                          "context": "organization",
                          "is_ai_enhanced": false,
                          "enabled": true,
                          "enabled_configuration": {
                            "enabled_at": "2026-05-15T10:30:00Z",
                            "efficiency": 95,
                            "workspace_group_execution": "l1",
                            "individual_execution": "l3",
                            "end_user_execution_workspace_group_ids": [
                              "65f0d9f2b3c4d5e6f7080931",
                              "65f0d9f2b3c4d5e6f7080932"
                            ]
                          }
                        },
                        {
                          "id": "65f0d9f2b3c4d5e6f7080912",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "name": "Patch Baseline",
                          "description": "Control de parches pendientes",
                          "category": "maintenance",
                          "created_at": "2026-05-16T12:00:00Z",
                          "archived_at": null,
                          "type": "standard",
                          "context": "organization",
                          "is_ai_enhanced": true,
                          "enabled": false,
                          "enabled_configuration": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "filters_invalido": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros inválido",
                        "code": "bad_request",
                        "details": "El parámetro filters debe ser una cadena JSON válida."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Access to organization not authorized",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource was not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "resource_not_found": {
                    "summary": "Resource not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/operations/{operation_id}": {
      "get": {
        "tags": [
          "Operations"
        ],
        "summary": "Get operation details",
        "operationId": "get_operation_by_id",
        "description": "Returns the public details of an existing operation in the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the operation.",
            "example": "64f0c2a1b2d3e4f506070811"
          }
        ],
        "responses": {
          "200": {
            "description": "Operation successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOperationByIdResponseV2"
                },
                "examples": {
                  "operation_detail": {
                    "summary": "Operation details",
                    "value": {
                      "id": "64f0c2a1b2d3e4f506070811",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "name": "remote_assistance",
                      "description": "Operación de asistencia remota",
                      "status": "finished",
                      "created_at": "2026-03-10T09:11:45Z",
                      "started_at": "2026-03-10T09:12:00Z",
                      "ended_at": "2026-03-10T09:15:17Z",
                      "microservice_id": "64f0c2a1b2d3e4f506070833",
                      "flow_id": "64f0c2a1b2d3e4f506070844",
                      "remote_support": {
                        "start_date": "2026-03-10T09:12:00Z",
                        "end_date": "2026-03-10T09:15:17Z",
                        "type": "unattended"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid route parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_identifier": {
                    "summary": "Invalid identifier format",
                    "value": {
                      "error": {
                        "message": "El identificador de operación no es válido",
                        "code": "bad_request",
                        "details": "operation_id debe tener 24 caracteres hexadecimales en minúscula."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Operation not found in the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent operation",
                    "value": {
                      "error": {
                        "message": "Operación no encontrada",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/operations/{operation_id}/results": {
      "get": {
        "tags": [
          "Operations"
        ],
        "summary": "Get operation results",
        "operationId": "get_operation_results",
        "description": "Returns paginated execution results for an operation within the authorized organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the operation.",
            "example": "64f0c2a1b2d3e4f506070811"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page to query."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of response fields to be included.",
            "example": "id,workspace_id,status,name,start_date,end_date"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`).",
            "example": "start_date:desc"
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "JSON expression for aggregation. Structure: {\"group_by\":[\"field\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}. Cannot be combined with `fields`.",
            "examples": {
              "group-by-status-count": {
                "summary": "Group by status and count",
                "value": "{\"group_by\":[\"status\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group-by-status-avg-script-duration": {
                "summary": "Group by status and calculate average",
                "value": "{\"group_by\":[\"status\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"},{\"field\":\"script_duration\",\"function\":\"avg\"}]}"
              }
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "JSON expression of filters on allowed fields.",
            "examples": {
              "simple": {
                "summary": "Simple filter by machine name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"srv\"}"
              },
              "complex-and": {
                "summary": "Combined filter with AND conditions",
                "value": "{\"and\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"completed\"},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"win\"}]}"
              },
              "complex-or-and": {
                "summary": "Nested OR and AND filter",
                "value": "{\"and\":[{\"or\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"error\"},{\"field\":\"status\",\"op\":\"eq\",\"value\":\"timeout\"}]},{\"field\":\"name\",\"op\":\"contains\",\"value\":\"desk\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOperationResultsResponseV2"
                },
                "examples": {
                  "results_page": {
                    "summary": "Operation results page",
                    "value": {
                      "data": [
                        {
                          "id": "66b5f6d2f8d5a4d8a7f1c101",
                          "operation_id": "64f0c2a1b2d3e4f506070811",
                          "workspace_id": "66b5f6d2f8d5a4d8a7f1c301",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "status": "completed",
                          "name": "ws-001",
                          "start_date": "2026-05-10T10:15:30Z",
                          "end_date": "2026-05-10T10:16:41Z",
                          "script_detail": "Script ejecutado correctamente",
                          "script_duration": 71,
                          "script_response": [
                            {
                              "timestamp": "2026-05-10T10:15:35.100Z",
                              "line": "Linea inicial\nDetalle multilinea"
                            },
                            {
                              "timestamp": "2026-05-10T10:15:37.100Z",
                              "line": "Segundo bloque OUT"
                            }
                          ]
                        }
                      ],
                      "has_next": true
                    }
                  },
                  "aggregated_by_status": {
                    "summary": "Aggregated result by status",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "status": "completed",
                          "count": 120,
                          "avg_script_duration": 17.4
                        },
                        {
                          "status": "error",
                          "count": 45,
                          "avg_script_duration": 3.1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_parameters": {
                    "summary": "Parameter validation error",
                    "value": {
                      "error": {
                        "message": "Parámetros de consulta inválidos",
                        "code": "BAD_REQUEST"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Authorization failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Operation not found in the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Non-existent operation",
                    "value": {
                      "error": {
                        "message": "Operación no encontrada",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unexpected error",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/entity-limits": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "View entity limits",
        "operationId": "get_organization_entity_limits",
        "description": "Returns the creation limits by entity type for the requested organization. These values indicate how many resources of each type can be created by the organization.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target organization.",
            "example": "507f1f77bcf86cd799439011"
          }
        ],
        "responses": {
          "200": {
            "description": "Entity limits successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganizationEntityLimitsResponseV2"
                },
                "examples": {
                  "ok_response": {
                    "summary": "Effective limits by entity type",
                    "value": {
                      "organization_id": "507f1f77bcf86cd799439011",
                      "limits": {
                        "tenants": 100,
                        "reporting_groups": 500,
                        "workspace_groups": 1000,
                        "workspace_group_schedules_per_group": 10,
                        "flows": 100,
                        "microservices": 500,
                        "reports": 500,
                        "webapps": 100,
                        "webhooks": 100,
                        "licenses": 500,
                        "alert_settings": 100,
                        "roles": 100,
                        "users": 1500,
                        "patching_policies": 50,
                        "patching_targets": 50,
                        "policies": 50,
                        "microservice_categories": 100,
                        "domains": 5,
                        "sso_integrations": 5,
                        "product_configs": 15,
                        "modules": 50,
                        "api_keys": 15
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or without access to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/patch-policy-targets": {
      "get": {
        "tags": [
          "Patch policy targets"
        ],
        "summary": "List patch policy targets",
        "operationId": "listPatchPolicyTargets",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Items per page (default: 100, max: 100)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting field with optional suffix order (:asc or :desc). Use response property names. Valid fields: id, name, created_at, timezone, should_restart, wake_on_lan, force_patching_configuration, is_in_maintenance, patch_policy_target_type. Example: \"name:asc\" or \"created_at:desc\""
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each patch policy target item. Selectable fields: id, name, created_by, created_at, timezone, should_restart, wake_on_lan, force_patching_configuration, is_in_maintenance, weeks, schedule, patch_policy_target_type, patch_policy_id. The field id is always included.",
            "example": "name,timezone,patch_policy_id"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "Filter patch policy targets by one or more criteria. Provide a JSON object with filter conditions. You can filter by any field returned in the response. Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by target name",
                "description": "Returns patch policy targets whose name contains the provided text.",
                "value": "{\"field\": \"name\", \"op\": \"contains\", \"value\": \"Base\"}"
              },
              "complex-and": {
                "summary": "Filter by target type and restart behavior",
                "description": "Returns Windows targets needing restart post-patching.",
                "value": "{\"and\": [{\"field\": \"patch_policy_target_type\", \"op\": \"eq\", \"value\": \"windows\"}, {\"field\": \"should_restart\", \"op\": \"eq\", \"value\": true}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match multiple time zones and exclude targets under maintenance.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"timezone\", \"op\": \"eq\", \"value\": \"UTC\"}, {\"field\": \"timezone\", \"op\": \"eq\", \"value\": \"America/New_York\"}]}, {\"field\": \"is_in_maintenance\", \"op\": \"eq\", \"value\": false}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of patch policy targets successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchPolicyTargetV2ListResponseV2"
                },
                "examples": {
                  "single-target": {
                    "summary": "Single patch policy target",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "id": "66ab6cf4d4d2e709bafd404c",
                          "name": "Base",
                          "created_by": "6439606652fc0c0051f1787b",
                          "created_at": "2024-08-01T11:09:40.719Z",
                          "timezone": "UTC",
                          "should_restart": true,
                          "wake_on_lan": true,
                          "force_patching_configuration": false,
                          "is_in_maintenance": false,
                          "weeks": [
                            1,
                            2
                          ],
                          "schedule": {
                            "MONDAY": {},
                            "TUESDAY": {},
                            "WEDNESDAY": {},
                            "THURSDAY": {
                              "9": [
                                15,
                                30,
                                45
                              ],
                              "10": [
                                0,
                                15,
                                30,
                                45
                              ],
                              "11": [
                                0,
                                15,
                                30,
                                45
                              ],
                              "12": [
                                0,
                                15,
                                30,
                                45
                              ],
                              "13": [
                                0,
                                15,
                                30,
                                45
                              ],
                              "14": [
                                0,
                                15,
                                30,
                                45
                              ],
                              "15": [
                                0
                              ]
                            },
                            "FRIDAY": {},
                            "SATURDAY": {},
                            "SUNDAY": {}
                          },
                          "patch_policy_target_type": "windows",
                          "patch_policy_id": "507f1f77bcf86cd799439011"
                        }
                      ]
                    }
                  },
                  "multiple-targets": {
                    "summary": "Multiple patch policy targets",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "66ab6cf4d4d2e709bafd404c",
                          "name": "Base",
                          "created_by": "6439606652fc0c0051f1787b",
                          "created_at": "2024-08-01T11:09:40.719Z",
                          "timezone": "UTC",
                          "should_restart": true,
                          "wake_on_lan": true,
                          "force_patching_configuration": false,
                          "is_in_maintenance": false,
                          "weeks": [
                            1,
                            2
                          ],
                          "schedule": {
                            "MONDAY": {},
                            "TUESDAY": {},
                            "WEDNESDAY": {},
                            "THURSDAY": {
                              "9": [
                                15,
                                30,
                                45
                              ],
                              "10": [
                                0,
                                15,
                                30,
                                45
                              ]
                            },
                            "FRIDAY": {},
                            "SATURDAY": {},
                            "SUNDAY": {}
                          },
                          "patch_policy_target_type": "windows",
                          "patch_policy_id": "507f1f77bcf86cd799439011"
                        },
                        {
                          "id": "66ab6cf4d4d2e709bafd404d",
                          "name": "Linux Base",
                          "created_by": "6439606652fc0c0051f1787b",
                          "created_at": "2024-08-02T10:00:00.000Z",
                          "timezone": "America/New_York",
                          "should_restart": false,
                          "wake_on_lan": false,
                          "force_patching_configuration": true,
                          "is_in_maintenance": false,
                          "weeks": [
                            1
                          ],
                          "schedule": {
                            "MONDAY": {
                              "8": [
                                0,
                                30
                              ]
                            },
                            "TUESDAY": {},
                            "WEDNESDAY": {},
                            "THURSDAY": {},
                            "FRIDAY": {},
                            "SATURDAY": {},
                            "SUNDAY": {}
                          },
                          "patch_policy_target_type": "linux",
                          "patch_policy_id": "507f1f77bcf86cd799439012"
                        }
                      ]
                    }
                  },
                  "empty-list": {
                    "summary": "Empty list when no targets exist",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  },
                  "no-patch-policy": {
                    "summary": "Target with no assigned patch policy",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "id": "66ab6cf4d4d2e709bafd404c",
                          "name": "Base",
                          "created_by": "6439606652fc0c0051f1787b",
                          "created_at": "2024-08-01T11:09:40.719Z",
                          "timezone": "UTC",
                          "should_restart": true,
                          "wake_on_lan": true,
                          "force_patching_configuration": false,
                          "is_in_maintenance": false,
                          "weeks": [
                            1,
                            2
                          ],
                          "schedule": {
                            "MONDAY": {},
                            "TUESDAY": {},
                            "WEDNESDAY": {},
                            "THURSDAY": {},
                            "FRIDAY": {},
                            "SATURDAY": {},
                            "SUNDAY": {}
                          },
                          "patch_policy_target_type": null,
                          "patch_policy_id": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Invalid pagination, sorting, or filters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: user does not have access to the organization, or the organization does not exist"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of patch policy targets for an organization. Supports pagination, sorting, and filtering via a JSON filter string. The patch policy targets define when and how patches are applied to Workspaces."
      }
    },
    "/v2/organizations/{organization_id}/product-configs": {
      "get": {
        "tags": [
          "Product configurations"
        ],
        "summary": "List product configurations",
        "operationId": "listProductConfigs",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Items per page (default: 100, max: 100)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting field with optional suffix order (:asc or :desc). Use response property names. Valid fields: id, environment, created_at, active, product_id, region. Example: \"product_id:asc\" or \"created_at:desc\""
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each product configuration item. Selectable fields: id, environment, created_at, active, product_id, region. The field id is always included.",
            "example": "environment,active,region"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "Filter product configurations by one or more criteria. Provide a JSON object with filter conditions. You can filter by any field returned in the response. Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by environment",
                "description": "Returns product configurations for a single environment.",
                "value": "{\"field\": \"environment\", \"op\": \"eq\", \"value\": \"PRODUCTION\"}"
              },
              "complex-and": {
                "summary": "Filter by status and region",
                "description": "Returns active product configurations in a specific region.",
                "value": "{\"and\": [{\"field\": \"active\", \"op\": \"eq\", \"value\": true}, {\"field\": \"region\", \"op\": \"eq\", \"value\": \"us-east\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match multiple environments and restrict by product.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"environment\", \"op\": \"eq\", \"value\": \"PRODUCTION\"}, {\"field\": \"environment\", \"op\": \"eq\", \"value\": \"STAGING\"}]}, {\"field\": \"product_id\", \"op\": \"eq\", \"value\": \"507f1f77bcf86cd799439001\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of product configurations successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductConfigV2ListResponseV2"
                },
                "examples": {
                  "single-config": {
                    "summary": "Single product configuration",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "id": "507f1f77bcf86cd799439011",
                          "environment": "PRODUCTION",
                          "created_at": "2024-01-15T10:30:00.000Z",
                          "active": true,
                          "product_id": "507f1f77bcf86cd799439001",
                          "region": "us-east"
                        }
                      ]
                    }
                  },
                  "multiple-configs": {
                    "summary": "Multiple product configurations",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "507f1f77bcf86cd799439011",
                          "environment": "PRODUCTION",
                          "created_at": "2024-01-15T10:30:00.000Z",
                          "active": true,
                          "product_id": "507f1f77bcf86cd799439001",
                          "region": "us-east"
                        },
                        {
                          "id": "507f1f77bcf86cd799439012",
                          "environment": "STAGING",
                          "created_at": "2024-01-20T14:45:00.000Z",
                          "active": false,
                          "product_id": "507f1f77bcf86cd799439001",
                          "region": null
                        }
                      ]
                    }
                  },
                  "empty-list": {
                    "summary": "Empty list when no configurations exist",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid request. Invalid pagination, sorting, or filters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: user does not have access to the organization or the organization does not exist"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of product configurations for the specified organization. Returns an array of product configuration objects containing configuration details, including environment, status, product information, and region. Supports pagination, sorting, and filtering via a JSON filter string."
      }
    },
    "/v2/organizations/{organization_id}/reporting-groups/{reporting_group_id}/agent-versions/catalog": {
      "get": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Get agent version catalog",
        "operationId": "get_reporting_group_agent_versions_catalog",
        "description": "Returns the catalog of allowed agent versions for the selected report group.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target organization.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target report group.",
            "example": "507f1f77bcf86cd799439022"
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetReportingGroupAgentVersionsCatalogResponseV2"
                },
                "examples": {
                  "ok_response": {
                    "summary": "Catalog by platforms",
                    "value": {
                      "windows_cp": [
                        "2.30.4"
                      ],
                      "windows": [
                        "2.31.1",
                        "2.30.4"
                      ],
                      "macos": [
                        "1.10.0"
                      ],
                      "linux": [
                        "1.12.0"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid parameters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Report group not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "The group does not allow self-management of agent versions."
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/reporting-groups/{reporting_group_id}/agent-versions": {
      "get": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Get agent versions configuration",
        "operationId": "get_reporting_group_agent_versions",
        "description": "Returns the effective configuration of agent versions for the requested report group. This endpoint is only available when the report group has an assigned product configuration with enabled self-management of versions; otherwise returns 409. Enablement of this capability is a platform configuration managed outside the API client. The list of reporting groups indicates this capability via the \"can_manage_agent_versions\" field. Reading with API key requires \"L3 Engineering Team\" permission or \"Organization Administrator\" role.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target organization.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target report group.",
            "example": "507f1f77bcf86cd799439022"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent versions successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetReportingGroupAgentVersionsResponseV2"
                },
                "examples": {
                  "ok_response": {
                    "summary": "Effective group versions",
                    "value": {
                      "agent_auto_update": true,
                      "versions": {
                        "windows_cp": {
                          "early": "latest",
                          "production": "latest"
                        },
                        "windows": {
                          "early": "2.20.0",
                          "production": "2.19.3"
                        },
                        "macos": {
                          "early": "latest",
                          "production": "1.9.2"
                        },
                        "linux": {
                          "early": "latest",
                          "production": "1.11.0"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid route parameters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Report group not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "The group does not allow self-management of agent versions."
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Update agent versions configuration",
        "operationId": "update_reporting_group_agent_versions",
        "description": "Updates the configuration of agent versions for the requested report group by full replacement. This endpoint is only available when the report group has an assigned product configuration with enabled self-management of versions; otherwise returns 409. Enablement of this capability is a platform configuration managed outside the API client. The list of reporting groups indicates this capability via the \"can_manage_agent_versions\" field. Updating with API key requires \"Organization Administrator\" role.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target organization.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Identifier of the target report group.",
            "example": "507f1f77bcf86cd799439022"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReportingGroupAgentVersionsRequestV2"
              },
              "examples": {
                "full_replacement": {
                  "summary": "Full update",
                  "value": {
                    "agent_auto_update": false,
                    "versions": {
                      "windows_cp": {
                        "early": "latest",
                        "production": "latest"
                      },
                      "windows": {
                        "early": "2.31.0",
                        "production": "2.30.4"
                      },
                      "macos": {
                        "early": "latest",
                        "production": "1.10.0"
                      },
                      "linux": {
                        "early": "latest",
                        "production": "1.12.0"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Agent versions successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetReportingGroupAgentVersionsResponseV2"
                },
                "examples": {
                  "ok_response": {
                    "summary": "Group versions updated",
                    "value": {
                      "agent_auto_update": false,
                      "versions": {
                        "windows_cp": {
                          "early": "latest",
                          "production": "latest"
                        },
                        "windows": {
                          "early": "2.31.0",
                          "production": "2.30.4"
                        },
                        "macos": {
                          "early": "latest",
                          "production": "1.10.0"
                        },
                        "linux": {
                          "early": "latest",
                          "production": "1.12.0"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Invalid route or body parameters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized."
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Report group not found."
          },
          "409": {
            "$ref": "#/components/responses/Conflict",
            "description": "The group does not allow self-management of agent versions."
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/reporting-groups/{reporting_group_id}/monthly-report/{period}": {
      "get": {
        "tags": [
          "Reporting Groups"
        ],
        "summary": "Get monthly report of a report group",
        "description": "Returns the monthly support report for the requested report group and period, along with the group's current metrics.",
        "operationId": "get_reportinggroup_monthly_report",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "reporting_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Report group identifier.",
            "example": "507f1f77bcf86cd799439020"
          },
          {
            "name": "period",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}(0[1-9]|1[0-2])$",
              "minLength": 6,
              "maxLength": 6
            },
            "description": "Requested monthly period in yyyymm format.",
            "example": "202606"
          }
        ],
        "responses": {
          "200": {
            "description": "Monthly report successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetReportingGroupMonthlyReportResponseV2"
                },
                "examples": {
                  "ok": {
                    "summary": "Correct response",
                    "value": {
                      "reporting_group_id": "507f1f77bcf86cd799439020",
                      "organization_id": "507f1f77bcf86cd799439011",
                      "period_year": 2026,
                      "period_month": 6,
                      "applied_patches": 58,
                      "critical_patches": 6,
                      "security_patches": 17,
                      "other_patches": 35,
                      "total_used_apps": 42,
                      "top_apps": [
                        {
                          "app_name": "Google Chrome",
                          "usage_days": 21
                        },
                        {
                          "app_name": "Microsoft Teams",
                          "usage_days": 19
                        }
                      ],
                      "automatic_remediations": {
                        "microservices": 4,
                        "flows": 11
                      },
                      "current_reporting_group_name": "Madrid - Finance",
                      "current_total_workspaces": 132,
                      "current_total_workspace_users": 247,
                      "current_workspace_antivirus_statistics": {
                        "workspaces_without_antivirus": 9,
                        "workspaces_with_antivirus": {
                          "total": 123,
                          "by_status": {
                            "unknown": 5,
                            "not_installed": 7,
                            "installed_stopped": 3,
                            "installed_working": 108
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "period_invalid": {
                    "summary": "Invalid period",
                    "value": {
                      "error": {
                        "message": "El parametro period debe tener formato yyyymm.",
                        "code": "invalid_request",
                        "details": "Use seis digitos con mes valido entre 01 y 12."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized for this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Unauthorized",
                    "value": {
                      "error": {
                        "message": "No autorizado.",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Monthly report not found for the indicated report group and period.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Not Found",
                    "value": {
                      "error": {
                        "message": "No se encontro el reporte mensual solicitado.",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "internal_error": {
                    "summary": "Internal error",
                    "value": {
                      "error": {
                        "message": "Se produjo un error interno.",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/sessions/{session_id}": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "Retrieve a session",
        "operationId": "get_session_by_id",
        "description": "Returns focused details on the requested session within an organization's scope.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$",
              "minLength": 36,
              "maxLength": 36
            },
            "description": "Session identifier.",
            "example": "550E8400-E29B-41D4-A716-446655440000"
          }
        ],
        "responses": {
          "200": {
            "description": "Session details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSessionByIdResponseV2"
                },
                "examples": {
                  "session_details": {
                    "summary": "Session detail response",
                    "value": {
                      "id": "550E8400-E29B-41D4-A716-446655440000",
                      "user_name": "contoso\\jdoe",
                      "session_type": "vdi_desktop",
                      "windows_session_id": 7,
                      "connection_state": "active",
                      "start_date": "2026-03-15T08:30:00Z",
                      "session_status": "active_notifications",
                      "platform_type": "windows",
                      "connected": true,
                      "current_session_id": 41,
                      "current_dc_name": "dc-eu-01",
                      "last_connection_time": "2026-03-15T09:45:11Z",
                      "log_on_duration": 35,
                      "session_key": "6BA7B810-9DAD-11D1-80B4-00C04FD430C8",
                      "flexx_analyzer_executed": true,
                      "cpu_usage": 34.2,
                      "ram_usage_gb": 3.8,
                      "rtt_usage": 18.1,
                      "current_uid_usage": 2.4,
                      "ram_usage": 3891,
                      "ram_percentage": 47,
                      "number_alerts_user": 0,
                      "number_alerts_vm": 1,
                      "workspace_id": "64f0c2a1b2d3e4f5060708aa"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_session_id": {
                    "summary": "Invalid session identifier format",
                    "value": {
                      "error": {
                        "message": "Formato de session_id no valido",
                        "code": "bad_request",
                        "details": "session_id debe ser un UUID en mayusculas con formato 8-4-4-4-12"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Session not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "session_not_found": {
                    "summary": "Requested session not found",
                    "value": {
                      "error": {
                        "message": "Sesion no encontrada",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/sessions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "List sessions",
        "operationId": "get_sessions",
        "description": "Returns a paginated list of organization's sessions.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Field names of response elements, comma-separated."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression over paths of filterable response fields.",
            "examples": {
              "simple": {
                "summary": "Filter by username",
                "value": "{\"field\":\"user_name\",\"op\":\"contains\",\"value\":\"jdoe\"}"
              },
              "complex-and": {
                "summary": "Filter by status and connection state",
                "value": "{\"and\":[{\"field\":\"session_status\",\"op\":\"eq\",\"value\":\"active\"},{\"field\":\"connection_state\",\"op\":\"eq\",\"value\":\"active\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"connection_state\",\"op\":\"eq\",\"value\":\"active\"},{\"field\":\"connection_state\",\"op\":\"eq\",\"value\":\"disconnected\"}]},{\"field\":\"current_dc_name\",\"op\":\"contains\",\"value\":\"dc-eu\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`)."
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "JSON expression for aggregation. Structure: {\"group_by\":[\"field\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}. Cannot be combined with `fields`.",
            "examples": {
              "group-by-connection-state-count": {
                "summary": "Group by connection state and count",
                "value": "{\"group_by\":[\"connection_state\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group-by-platform-avg-cpu": {
                "summary": "Group by platform and calculate average",
                "value": "{\"group_by\":[\"platform_type\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"},{\"field\":\"cpu_usage\",\"function\":\"avg\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSessionsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with sessions",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "550E8400-E29B-41D4-A716-446655440000",
                          "user_name": "contoso\\jdoe",
                          "session_type": "vdi_desktop",
                          "windows_session_id": 7,
                          "connection_state": "active",
                          "start_date": "2026-03-15T08:30:00Z",
                          "cpu_usage": 34.2,
                          "ram_usage_gb": 3.8,
                          "rtt_usage": 18.1,
                          "session_status": "active",
                          "platform_type": "windows",
                          "connected": true,
                          "current_session_id": 41,
                          "current_dc_name": "dc-eu-01",
                          "current_uid_usage": 2.4,
                          "flexx_analyzer_executed": false,
                          "last_connection_time": "2026-03-15T09:45:11Z",
                          "log_on_duration": 35,
                          "number_alerts_user": 0,
                          "number_alerts_vm": 1,
                          "ram_usage": 3891,
                          "ram_percentage": 47,
                          "session_key": "6BA7B810-9DAD-11D1-80B4-00C04FD430C8",
                          "workspace_id": "64f0c2a1b2d3e4f5060708aa",
                          "organization_id": "507f1f77bcf86cd799439011"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No sessions found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  },
                  "aggregated_by_connection_state": {
                    "summary": "Aggregated result by connection status",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "connection_state": "active",
                          "count": 120,
                          "avg_cpu_usage": 17.4
                        },
                        {
                          "connection_state": "disconnected",
                          "count": 45,
                          "avg_cpu_usage": 3.1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros inválido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON válida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested resource was not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "resource_not_found": {
                    "summary": "Requested resource not found",
                    "value": {
                      "error": {
                        "message": "No encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspace-groups/{workspace_group_id}/workspaces": {
      "get": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Assigned workspaces",
        "operationId": "listWorkspaceGroupsWorkspaces",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Items per page (default: 100, max: 100)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting field with optional order suffix (:asc or :desc). Use response property names: id, organization_id, name, related_environment, operating_system, ip_address, type, last_user, total_ram."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of fields to include in each Workspace element. Selectable fields: id, organization_id, name, related_environment, operating_system, ip_address, type, last_user, total_ram. The id field is always included.",
            "example": "name,operating_system,total_ram"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120,
              "description": "JSON string with filter conditions. Use response property names for fields. Operators: eq, ne, in, nin, gt, gte, lt, lte, contains, startsWith, endsWith, between. Combine with and/or."
            },
            "examples": {
              "simple": {
                "summary": "Filter by Workspace name",
                "description": "Return Workspaces whose name contains the provided text.",
                "value": "{\"field\": \"name\", \"op\": \"contains\", \"value\": \"desktop\"}"
              },
              "complex-and": {
                "summary": "Filter by operating system and RAM",
                "description": "Return Workspaces with Windows and at least 8 GB RAM.",
                "value": "{\"and\": [{\"field\": \"operating_system\", \"op\": \"contains\", \"value\": \"Windows\"}, {\"field\": \"total_ram\", \"op\": \"gte\", \"value\": 8192}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match two subnet prefixes and apply a memory threshold.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"ip_address\", \"op\": \"startsWith\", \"value\": \"172.\"}, {\"field\": \"ip_address\", \"op\": \"startsWith\", \"value\": \"10.\"}]}, {\"field\": \"total_ram\", \"op\": \"gt\", \"value\": 4096}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of Workspaces from the workspace group successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceGroupWorkspaceListResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Invalid pagination, sorting, or filters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or does not belong to the organization"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of Workspaces belonging to the specified workspace group. Supports pagination, sorting, and filtering via a JSON filter string. The response includes a reduced set of Workspace fields."
      },
      "put": {
        "tags": [
          "Workspace groups"
        ],
        "summary": "Set or update workspaces",
        "operationId": "updateWorkspaceGroupsWorkspace",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the workspace group",
            "example": "507f1f77bcf86cd799439020"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspaces successfully updated in the workspace group. Returns a summary of the result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateWorkspaceGroupWorkspacesResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Common Causes: - Invalid request body structure - Invalid Workspace ID format"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized: authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Workspace group not found or not belonging to the organization"
          },
          "422": {
            "description": "Unprocessable entity. Common causes: - Workspace IDs do not exist - Workspaces do not belong to the organization - Invalid Workspace IDs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspacesUpdateRequestV2"
              },
              "examples": {
                "set-workspaces-in-group": {
                  "summary": "Set multiple Workspaces in a workspace group",
                  "value": {
                    "workspace_ids": [
                      "507f1f77bcf86cd799439030",
                      "507f1f77bcf86cd799439031"
                    ]
                  }
                },
                "remove-all-workspaces": {
                  "summary": "Remove all Workspaces from workspace group by providing an empty array",
                  "value": {
                    "workspace_ids": []
                  }
                },
                "set-single-workspace": {
                  "summary": "Set a single Workspace in a workspace group",
                  "value": {
                    "workspace_ids": [
                      "507f1f77bcf86cd799439030"
                    ]
                  }
                }
              }
            }
          }
        },
        "description": "Sets or replaces all Workspaces in the specified workspace group with the provided list. This is a replacement operation, not incremental update: all existing Workspaces are replaced. Returns a summary with the total Workspaces in the group after the update."
      }
    },
    "/v2/organizations/{organization_id}/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspaces",
        "operationId": "listWorkspaces",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "The unique identifier of the organization",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "description": "Items per page (default: 100, max.: 100)"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc. In aggregate mode, only accepts `group_by` fields or aggregated aliases (`count`, `<function>_<field>`)."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated list of response fields to include.",
            "example": "name,user_name,operating_system"
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "Group and calculate aggregations over Workspaces. Must be sent as a JSON string with `group_by` (array of contract fields) and `aggregates` (array of objects `{ field, function }`). `field` can be `\"*\"` only when `function` is `\"count\"`. Allowed values for `function`: `count`, `sum`, `avg`, `min`, `max`. The `aggregate` parameter cannot be combined with `fields`. In aggregate mode, `sort` can only sort by `group_by` fields or aggregated outputs (`count`, `function_field`).",
            "examples": {
              "simple": {
                "summary": "Group by status and count",
                "value": "{\"group_by\":[\"status\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "with-average": {
                "summary": "Group by platform and calculate average",
                "value": "{\"group_by\":[\"platform_type\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"},{\"field\":\"percent_cpu\",\"function\":\"avg\"}]}"
              }
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "Filter Workspaces by one or more criteria. Provide a JSON object with filter conditions. You can filter by any field returned in the response; use the same field names and value forms as in the response. Use comparison operators (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) and combine multiple conditions with logical operators (and, or). Maximum length: 5120 characters.",
            "examples": {
              "simple": {
                "summary": "Filter by Workspace name",
                "description": "Return Workspaces whose name contains the provided text.",
                "value": "{\"field\": \"name\", \"op\": \"contains\", \"value\": \"sdi\"}"
              },
              "complex-and": {
                "summary": "Filter by platform and power state",
                "description": "Return only Workspaces matching both conditions.",
                "value": "{\"and\": [{\"field\": \"platform_type\", \"op\": \"eq\", \"value\": \"windows\"}, {\"field\": \"power_state\", \"op\": \"eq\", \"value\": \"on\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "description": "Match broker alternatives and require a healthy EDR state.",
                "value": "{\"and\": [{\"or\": [{\"field\": \"broker\", \"op\": \"eq\", \"value\": \"citrix_on-premises\"}, {\"field\": \"broker\", \"op\": \"eq\", \"value\": \"azure_virtual_desktop\"}]}, {\"field\": \"edr_status\", \"op\": \"eq\", \"value\": \"installed_working\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of Workspaces successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceListResponseV2"
                },
                "examples": {
                  "workspace-list": {
                    "summary": "Paginated list with one Workspace",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "id": "22f5381aa25e89b73785ca34",
                          "organization_id": "155f78b81155f8ab327ef274",
                          "name": "SDI04-001.org.terravex.net",
                          "related_environment": "1437d381972ce53252aabe72f053af7c",
                          "operating_system": "Microsoft Windows Server 2022 Standard 21H2",
                          "serial_number": "40a70e53327456131ae3321135531ae87f655cbeab27f01134c7ef366a7f2402",
                          "ip_address": "172.30.113.115",
                          "os_update_num_pending": 5,
                          "reporting_group_id": "65f83219942714fc24f01435",
                          "flxmid": "50a70e53327456131ae5921135531ae87f639cbe5b27f09034c7ef366a7f2402",
                          "os_update_num_days_since_last": 183,
                          "total_ram": 8191,
                          "altitude": 0,
                          "antivirus": "Windows Defender",
                          "antivirus_status": "installed_working",
                          "bios_manufacturer": "VMware, Inc.",
                          "bios_mode": "UEFI",
                          "bios_version": "P79 Ver. 6.00",
                          "bios_smbversion": "2.7",
                          "bios_serialnumber": "VMware-42 06 fd 7c 3a f4 af 1c-97 07 56 e2 07 67 d7 23",
                          "base_board_manufacturer": "Intel Corporation",
                          "base_board_product": "440BX Desktop Reference Platform",
                          "base_board_version": "A30",
                          "broker": "citrix_on-premises",
                          "public_ip_city": "Barcelona",
                          "flexxagent_version": "25.9.1.0",
                          "compliance_result": "not_evaluated",
                          "compliance_last_execution": "2025-06-12T06:13:17.17Z",
                          "domain_name": "org.terravex.net",
                          "public_ip_country": "ES",
                          "cores_count": "4",
                          "edr_active_detections": false,
                          "edr_host_id": "11bbcc1e6e2c440aa8b7522a78a292ad",
                          "edr_status": "installed_working",
                          "edr_version": "7.05.17706.0",
                          "current_subnet": "172.30.213.0/24",
                          "default_gateway": "172.30.213.1",
                          "device_kind": "virtual",
                          "edr": "CrowdStrike",
                          "ema_agent_version": "",
                          "ema_endpoint_id": "",
                          "embedded_controller_version": "255.255",
                          "os_fast_startup": false,
                          "flexxanalyzer_config": "configured",
                          "flexxanalyzer_version": "3.0.2",
                          "hypervisor": "vmware_vsphere",
                          "ip_version": "IPv4",
                          "public_ip_isp": "Cloudflare, Inc.",
                          "iot_hub_config_sync_status": "synced",
                          "is_amt_supported": false,
                          "is_laptop": false,
                          "is_physical": false,
                          "last_boot_duration": 20,
                          "last_restart_time": null,
                          "last_time": "2025-06-12T06:13:17.17Z",
                          "last_windows_update": "2025-09-18T00:00:00.00Z",
                          "last_autorepair": "2025-06-10T10:00:00.00Z",
                          "latitude": 0,
                          "locale": "English (United States)",
                          "longitude": 0,
                          "mac_address": "10-52-56-36-21-42",
                          "network_interface_type": "unknown",
                          "os_build_number": "6.3.20348.4171",
                          "os_manufacturer": "Microsoft Corporation",
                          "os_version": "10.0.20348.20348",
                          "ou": "OU=NonPersistent,OU=Workstations,OU=OPS914,DC=ops914,DC=terravex,DC=net",
                          "os_page_file": "C:\\pagefile.sys",
                          "os_page_file_space": 512,
                          "platform_role": "Desktop",
                          "platform_type": "windows",
                          "processor": "Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz, 4 Core(s), 4 Logical Processors",
                          "public_ip": "19.27.129.141",
                          "os_reboot_pending": false,
                          "secure_boot_state": "On",
                          "system_model": "VMware7,1",
                          "system_type": "x64-based PC",
                          "os_time_zone": "Romance Standard Time",
                          "user_name": "Domain\\user001",
                          "vm_type": "workspace",
                          "windows_type": "server",
                          "created_at": "2023-12-18T11:26:11.11Z",
                          "last_deregistration_time": "2026-01-19T12:26:25.25Z",
                          "delete_scheduled_at": "2026-07-15T00:00:00.000Z",
                          "encrypted_harddisks": "partial",
                          "custom_field_01": "testVal1",
                          "custom_field_02": "testVal2",
                          "custom_field_03": "4",
                          "custom_field_04": "",
                          "custom_field_05": "",
                          "custom_field_06": "",
                          "custom_field_07": "",
                          "custom_field_08": "",
                          "custom_field_09": "",
                          "custom_field_10": "",
                          "flexxagent_type": "unified",
                          "antivirus_version_number": "4.18.2104.5",
                          "related_location": "C08D2228-E80A-4ADA-A75F-03E33E71D119",
                          "area": "Development",
                          "custom_field_11": "",
                          "custom_field_12": "",
                          "custom_field_13": "",
                          "custom_field_14": "",
                          "custom_field_15": "",
                          "custom_field_16": "",
                          "custom_field_17": "",
                          "custom_field_18": "",
                          "custom_field_19": "",
                          "custom_field_20": "",
                          "department": "Department",
                          "office": "Office",
                          "last_custom_fields_update": "2025-12-24T11:24:51.51Z",
                          "workspace_id": "6676aa0c1e9c850250a70e53327456131ae59211aa531ae87f639cbe5b27f09034c7e3366a7f2402",
                          "flexxanalyzer_proxy_uri": "",
                          "iot_hub_name": "idIot0e33d84fe5761e",
                          "flexxagent_status": "stopped",
                          "boot_hard_disk_used_percentage": 34,
                          "last_connection_time": "2025-06-12T06:13:17.17Z",
                          "network_signal": 0,
                          "num_alerts": 0,
                          "percent_cpu": 17,
                          "percent_ram": 0,
                          "power_state": "off",
                          "sessions_count": 0,
                          "used_system_disk_c": 34,
                          "wake_on_lan_mac": "10-50-56-56-51-12",
                          "wake_on_lan_subnet": "172.30.213.0/24",
                          "broker_status": "disconnected",
                          "status": "offline"
                        }
                      ]
                    }
                  },
                  "workspace-aggregate": {
                    "summary": "Aggregated result by status",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "status": "online",
                          "count": 120,
                          "avg_percent_cpu": 17.4
                        },
                        {
                          "status": "offline",
                          "count": 45,
                          "avg_percent_cpu": 3.1
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": "Bad Request. Invalid pagination, sorting, or filters."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": "Unauthorized - authentication required"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": "Organization not found"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "description": "Retrieve a paginated list of Workspaces. Supports pagination, sorting, and filtering using a JSON filter string."
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/agent-versions": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspace agent versions",
        "description": "Returns the paginated version history of the agent for a workspace within an organization, exposing only discovered_at and version.",
        "operationId": "workspaces_agent_versions",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "description": "Organization identifier.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "example": "64b7f1a2c3d4e5f60718293a"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "description": "Workspace identifier.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "example": "64b7f1a2c3d4e5f60718293b"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number to query.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Response fields to be included, separated by commas.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort expression in the format <field>:asc|desc.",
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            }
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "JSON expression of filters on filterable fields of the response.",
            "schema": {
              "type": "string"
            },
            "examples": {
              "simple": {
                "summary": "Simple filter by version",
                "value": "{\"field\":\"version\",\"op\":\"contains\",\"value\":\"5.2\"}"
              },
              "complex_and": {
                "summary": "Compound filter with and",
                "value": "{\"and\":[{\"field\":\"version\",\"op\":\"contains\",\"value\":\"5.\"},{\"field\":\"discovered_at\",\"op\":\"contains\",\"value\":\"2026-06\"}]}"
              },
              "complex_or_and": {
                "summary": "Compound filter with or and and",
                "value": "{\"and\":[{\"or\":[{\"field\":\"version\",\"op\":\"eq\",\"value\":\"5.2.0\"},{\"field\":\"version\",\"op\":\"eq\",\"value\":\"5.2.1\"}]},{\"field\":\"discovered_at\",\"op\":\"contains\",\"value\":\"2026-06\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of agent versions for the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspaceAgentVersionsResponseV2"
                },
                "examples": {
                  "success": {
                    "summary": "Successful paginated response",
                    "value": {
                      "data": [
                        {
                          "discovered_at": "2026-06-18T10:20:30.000Z",
                          "version": "5.2.1"
                        },
                        {
                          "discovered_at": "2026-05-10T08:00:00.000Z",
                          "version": "5.1.9"
                        }
                      ],
                      "has_next": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Could not process filters",
                        "code": "BAD_REQUEST",
                        "details": "Operator \"contains\" is not allowed for field \"discovered_at\"."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized to access the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Invalid credentials or no access",
                    "value": {
                      "error": {
                        "code": "unauthorized",
                        "message": "No autorizado para acceder a este recurso."
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found within the authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "Workspace with no available history",
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "No se encontro el recurso solicitado."
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "internal_error": {
                    "summary": "Unexpected failure",
                    "value": {
                      "error": {
                        "code": "internal_error",
                        "message": "Se ha producido un error interno."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/alerts": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List active alerts",
        "operationId": "workspaces_alerts",
        "description": "Returns a paginated list of active alerts for the selected Workspace.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace ID ",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response element fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression over paths of filterable response fields.",
            "examples": {
              "simple": {
                "summary": "Filter by alert name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"disk\"}"
              },
              "complex-and": {
                "summary": "Filter by severity and information",
                "value": "{\"and\":[{\"field\":\"severity\",\"op\":\"eq\",\"value\":\"critical\"},{\"field\":\"information\",\"op\":\"contains\",\"value\":\"cpu\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"name\",\"op\":\"contains\",\"value\":\"memory\"},{\"field\":\"description\",\"op\":\"contains\",\"value\":\"memory\"}]},{\"field\":\"severity\",\"op\":\"eq\",\"value\":\"warning\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Ordering expression with the format <field>:asc|desc on route scalar fields orderable in the response."
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace alerts retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspaceAlertsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with alerts",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070811",
                          "name": "Uso alto de CPU",
                          "description": "El uso de CPU superó el umbral",
                          "severity": "critical",
                          "started_at": "2026-03-15T08:00:00Z",
                          "authorized_minutes": 30,
                          "notified_at": "2026-03-15T08:05:00Z",
                          "information": "El uso actual es 96%",
                          "threshold_unit_name": "percent",
                          "threshold_value": 90,
                          "element": "cpu",
                          "category": "performance"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No alerts found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros inválido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON válida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "Workspace does not exist within scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/disks": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List disks",
        "operationId": "workspaces_disks",
        "description": "Returns a paginated list of Workspace disks for the selected Workspace.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace ID ",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on filterable field paths of the response.",
            "examples": {
              "simple": {
                "summary": "Filter by disk name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"system\"}"
              },
              "complex-and": {
                "summary": "Filter by media type and encryption status",
                "value": "{\"and\":[{\"field\":\"media_type\",\"op\":\"eq\",\"value\":\"SSD\"},{\"field\":\"encrypted\",\"op\":\"eq\",\"value\":\"encrypted\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine location alternatives with OS unit condition",
                "value": "{\"and\":[{\"or\":[{\"field\":\"location\",\"op\":\"contains\",\"value\":\"C:\"},{\"field\":\"location\",\"op\":\"contains\",\"value\":\"D:\"}]},{\"field\":\"os_drive\",\"op\":\"eq\",\"value\":true}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sort expression in the format <field>:asc|desc over sortable scalar field paths of the response."
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace disks retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspaceDisksResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with disk records",
                    "value": {
                      "has_next": false,
                      "data": [
                        {
                          "id": "cd607b6eb7d74f3990e62f0f",
                          "name": "D:",
                          "device_id": "\\\\.\\PHYSICALDRIVE1",
                          "encrypted": "not_encrypted",
                          "encryption_method": "None",
                          "location": "Integrated : Bus 0 : Device 14 : Function 0 : Adapter 0 : Port 3 : Target 2 : LUN 0",
                          "media_type": "NTFS",
                          "os_drive": false,
                          "partition": "Disk #1, Partition #0",
                          "physical_disk_size": 953869,
                          "total_size": 953866,
                          "used_size": 953333,
                          "volume_label": "Data"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No disks found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filters no valido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON valida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the organization's authorized scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "The Workspace does not exist within the scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/installed-apps": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List installed apps",
        "description": "Returns a paginated list of installed applications for the selected Workspace.",
        "operationId": "workspaces_installed_apps",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace ID ",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on response filterable field paths.",
            "examples": {
              "simple": {
                "summary": "Filter by product name",
                "value": "{\"field\":\"product_name\",\"op\":\"contains\",\"value\":\"chrome\"}"
              },
              "complex-and": {
                "summary": "Filter by publisher and version",
                "value": "{\"and\":[{\"field\":\"publisher\",\"op\":\"contains\",\"value\":\"microsoft\"},{\"field\":\"version\",\"op\":\"contains\",\"value\":\"2026\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"product_name\",\"op\":\"contains\",\"value\":\"edge\"},{\"field\":\"product_name\",\"op\":\"contains\",\"value\":\"chrome\"}]},{\"field\":\"last_reported_at\",\"op\":\"eq\",\"value\":\"2026-03-15T09:45:11Z\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Order expression in the form <field>:asc|desc on response scalar field routes."
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace installed apps retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspaceInstalledAppsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list of installed applications",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070815",
                          "product_name": "Microsoft Edge",
                          "publisher": "Microsoft Corporation",
                          "version": "124.0.2478.97",
                          "installed_at": "2026-03-12T14:10:20Z",
                          "install_location": "C:\\Program Files (x86)\\Microsoft\\Edge\\Application",
                          "last_reported_at": "2026-03-15T09:45:11Z"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No installed applications found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros invalido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON valida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "The Workspace does not exist within the scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/operations": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List operations",
        "operationId": "workspaces_operations",
        "description": "Returns a paginated list of operations for the selected Workspace.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace identifier.",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on filterable field routes of the operation contract.",
            "examples": {
              "simple": {
                "summary": "Filter by operation name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"remote\"}"
              },
              "complex-and": {
                "summary": "Filter by status and start range",
                "value": "{\"and\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"finished\"},{\"field\":\"started_at\",\"op\":\"gte\",\"value\":\"2026-03-10T00:00:00.000Z\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"name\",\"op\":\"contains\",\"value\":\"remote\"},{\"field\":\"description\",\"op\":\"contains\",\"value\":\"remote\"}]},{\"field\":\"created_at\",\"op\":\"gte\",\"value\":\"2026-03-01T00:00:00.000Z\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Ordering expression in the form <field>:asc|desc on scalar response field routes."
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace operations retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspaceOperationsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with items",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070811",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "name": "remote_assistance",
                          "description": "Iniciar sesión de asistencia remota desatendida",
                          "status": "finished",
                          "started_at": "2026-03-10T09:12:00Z",
                          "ended_at": "2026-03-10T09:15:17Z",
                          "created_at": "2026-03-10T09:11:45Z",
                          "microservice_id": null,
                          "flow_id": null,
                          "remote_support": {
                            "start_date": "2026-03-10T09:12:00Z",
                            "end_date": "2026-03-10T09:15:17Z",
                            "type": "unattended"
                          }
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No operations found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON válida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "The Workspace does not exist within the scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/patches": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspace patches",
        "operationId": "workspaces_patches",
        "description": "Returns a paginated list of patches for the selected workspace. Only applies to workspaces with platform_type `windows`.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace ID ",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Response fields to be included, separated by commas."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on response item fields (includes `id`).",
            "examples": {
              "simple": {
                "summary": "Filter by title",
                "value": "{\"field\":\"title\",\"op\":\"contains\",\"value\":\"security update\"}"
              },
              "complex-and": {
                "summary": "Filter by status and severity",
                "value": "{\"and\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"pending\"},{\"field\":\"severity\",\"op\":\"contains\",\"value\":\"critical\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND",
                "value": "{\"and\":[{\"or\":[{\"field\":\"product\",\"op\":\"contains\",\"value\":\"windows 10\"},{\"field\":\"product\",\"op\":\"contains\",\"value\":\"windows 11\"}]},{\"field\":\"kb\",\"op\":\"contains\",\"value\":\"kb503\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression in the format <field>:asc|desc over scalar fields of the item (includes `id`). In aggregation mode, it only accepts fields from `group_by` or aggregate aliases (`count`, `<function>_<field>`)."
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 4096
            },
            "description": "JSON aggregation expression with `group_by` and `aggregates` over first-level scalar fields.",
            "examples": {
              "group_status_count": {
                "summary": "Group by status and count",
                "value": "{\"group_by\":[\"status\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"}]}"
              },
              "group_product_avg": {
                "summary": "Group by product and calculate average",
                "value": "{\"group_by\":[\"product\"],\"aggregates\":[{\"field\":\"*\",\"function\":\"count\"},{\"field\":\"installed_at\",\"function\":\"max\"}]}"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace patches retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspacePatchesResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated result with patch records",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070812",
                          "kb": "KB5034123",
                          "title": "Actualizacion acumulativa de seguridad",
                          "status": "pending",
                          "product": "windows 11",
                          "severity": "critical",
                          "arrived_at": "2026-03-15",
                          "category": "security_updates",
                          "installed_at": null,
                          "additional_information_url": "https://support.microsoft.com/help/kb5034123"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No patches found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no valido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON valida"
                      }
                    }
                  },
                  "invalid_platform_type": {
                    "summary": "Workspace with incompatible platform",
                    "value": {
                      "error": {
                        "message": "Workspace no compatible para consulta de parches",
                        "code": "bad_request",
                        "details": "Este endpoint solo admite workspaces con platform_type windows"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "Workspace does not exist within scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/pnp-errors": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List Plug and Play errors",
        "operationId": "workspaces_pnp_errors",
        "description": "Returns a paginated list of Plug and Play errors for the selected Workspace.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace identifier.",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated response element field names to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression over paths of filterable response fields.",
            "examples": {
              "simple": {
                "summary": "Filter by error name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"usb\"}"
              },
              "complex-and": {
                "summary": "Filter by status and class",
                "value": "{\"and\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"error\"},{\"field\":\"class\",\"op\":\"contains\",\"value\":\"usb\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"error_code\",\"op\":\"eq\",\"value\":\"CM_PROB_FAILED_START\"},{\"field\":\"error_code\",\"op\":\"eq\",\"value\":\"CM_PROB_DISABLED\"}]},{\"field\":\"device_id\",\"op\":\"contains\",\"value\":\"ven_8086\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting expression in the format <field>:asc|desc on sortable response scalar field paths."
          }
        ],
        "responses": {
          "200": {
            "description": "Plug and Play Workspace errors successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspacePnpErrorsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated result with Plug and Play errors",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070811",
                          "name": "Dispositivo compuesto USB",
                          "status": "Error",
                          "class": "USB",
                          "device_id": "USB\\VID_046D&PID_C534",
                          "error_description": "El controlador no pudo iniciarse",
                          "error_code": "CM_PROB_FAILED_START",
                          "properties": "driver_version=10.0.22621.1",
                          "last_updated_at": "2026-03-31T20:05:57Z"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No Plug and Play errors found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no válido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON válida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "The Workspace does not exist within the scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/pnp-events": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List Plug and Play events",
        "operationId": "workspaces_pnp_events",
        "description": "Returns a paginated list of Plug and Play events for the selected Workspace.",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace ID ",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression on response filterable field paths.",
            "examples": {
              "simple": {
                "summary": "Filter by action",
                "value": "{\"field\":\"action\",\"op\":\"contains\",\"value\":\"install\"}"
              },
              "complex-and": {
                "summary": "Filter by date and user",
                "value": "{\"and\":[{\"field\":\"created_at\",\"op\":\"contains\",\"value\":\"2026-03-31\"},{\"field\":\"user_name\",\"op\":\"contains\",\"value\":\"system\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"caption\",\"op\":\"contains\",\"value\":\"usb\"},{\"field\":\"caption\",\"op\":\"contains\",\"value\":\"driver\"}]},{\"field\":\"device_id\",\"op\":\"contains\",\"value\":\"ven_8086\"}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sorting expression in the format <field>:asc|desc on sortable response scalar field paths."
          }
        ],
        "responses": {
          "200": {
            "description": "Plug and Play Workspace events successfully retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspacePnpEventsResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated result with event logs",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070810",
                          "action": "Install",
                          "created_at": "2026-03-31T20:05:57Z",
                          "user_name": "SYSTEM",
                          "caption": "USB device installed",
                          "device_id": "PCI\\VEN_8086&DEV_9A13"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No events found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filter format",
                    "value": {
                      "error": {
                        "message": "Formato de filtros no valido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON valida"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "Workspace does not exist within scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/organizations/{organization_id}/workspaces/{workspace_id}/services": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List services",
        "operationId": "workspaces_services",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Organization identifier.",
            "example": "507f1f77bcf86cd799439011"
          },
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{24}$",
              "minLength": 24,
              "maxLength": 24
            },
            "description": "Workspace identifier.",
            "example": "507f1f77bcf86cd799439099"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "description": "Page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 100
            },
            "description": "Number of items per page."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "description": "Comma-separated names of response item fields to include."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 5120
            },
            "description": "JSON filter expression over paths of filterable response fields.",
            "examples": {
              "simple": {
                "summary": "Filter by service name",
                "value": "{\"field\":\"name\",\"op\":\"contains\",\"value\":\"print\"}"
              },
              "complex-and": {
                "summary": "Filter by status and startup type",
                "value": "{\"and\":[{\"field\":\"status\",\"op\":\"eq\",\"value\":\"Running\"},{\"field\":\"startup_type\",\"op\":\"eq\",\"value\":\"Manual\"}]}"
              },
              "complex-or-and": {
                "summary": "Combine OR and AND conditions",
                "value": "{\"and\":[{\"or\":[{\"field\":\"display_name\",\"op\":\"contains\",\"value\":\"agent\"},{\"field\":\"description\",\"op\":\"contains\",\"value\":\"agent\"}]},{\"field\":\"accept_stop\",\"op\":\"eq\",\"value\":true}]}"
              }
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^([a-z_]+):(asc|desc)$"
            },
            "description": "Sorting expression format <field>:asc|desc over orderable scalar field paths in the response."
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace services retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetWorkspaceServicesResponseV2"
                },
                "examples": {
                  "paginated_result": {
                    "summary": "Paginated list with services",
                    "value": {
                      "has_next": true,
                      "data": [
                        {
                          "id": "64f0c2a1b2d3e4f506070810",
                          "name": "Spooler",
                          "description": "Carga archivos en memoria para el procesamiento de impresión.",
                          "status": "Running",
                          "accept_stop": true,
                          "display_name": "Print Spooler",
                          "log_on_as": "LocalSystem",
                          "path": "C:\\Windows\\System32\\spoolsv.exe",
                          "organization_id": "507f1f77bcf86cd799439011",
                          "reporting_group_id": "507f1f77bcf86cd799439077",
                          "startup_type": "Automatic",
                          "last_updated_at": "2026-03-15T09:45:11Z",
                          "workspace_id": "507f1f77bcf86cd799439099"
                        }
                      ]
                    }
                  },
                  "empty_result": {
                    "summary": "No services found",
                    "value": {
                      "has_next": false,
                      "data": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters, including invalid filters/sort or non-Windows Workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_filters": {
                    "summary": "Invalid filters format",
                    "value": {
                      "error": {
                        "message": "Formato de filters no válido",
                        "code": "bad_request",
                        "details": "filters debe ser una cadena JSON válida"
                      }
                    }
                  },
                  "workspace_platform_not_supported": {
                    "summary": "Workspace not supported by platform",
                    "value": {
                      "error": {
                        "message": "This endpoint supports only windows workspaces (platform_type=windows)",
                        "code": "bad_request"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not authorized or organization not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "organization_not_authorized": {
                    "summary": "Organization access failure",
                    "value": {
                      "error": {
                        "message": "No autorizado",
                        "code": "unauthorized"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found within the authorized organization's scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "workspace_not_found": {
                    "summary": "Workspace does not exist within scope",
                    "value": {
                      "error": {
                        "message": "Workspace no encontrado",
                        "code": "not_found"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "unexpected_error": {
                    "summary": "Unhandled failure",
                    "value": {
                      "error": {
                        "message": "Error interno del servidor",
                        "code": "internal_error"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Returns a paginated list of services for the selected Workspace. Only applies for Windows Workspaces (platform_type=windows)."
      }
    }
  },
  "components": {
    "schemas": {
      "CreateDigitalActivityCoreProcessGroupRequestV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the core process group."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Optional description for the core process group."
          },
          "workspace_group_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated workspace group."
          }
        },
        "required": [
          "name",
          "workspace_group_id"
        ],
        "description": "Body for creating the core process group."
      },
      "GetDigitalActivityCoreProcessGroupResponseV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the core process group."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier."
          },
          "name": {
            "type": "string",
            "description": "Name of the core process group."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description of the core process group."
          },
          "workspace_group_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated workspace group."
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "workspace_group_id"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "details": {
                "type": "string"
              }
            },
            "required": [
              "message",
              "code"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "FlowV2": {
        "type": "object",
        "description": "Flow details as returned by GET flow by id. The organization is implied by the path `/v2/organizations/{organization_id}/flows/{flow_id}`. Target workspaces/groups are normalized in target.ids (MongoDB ObjectId hexadecimal strings).",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "description": "Resolved to Accept-Language when multilingual"
          },
          "description": {
            "type": "string",
            "description": "Resolved to Accept-Language when multilingual"
          },
          "type": {
            "type": "string",
            "enum": [
              "session",
              "workspace"
            ]
          },
          "version": {
            "type": "number"
          },
          "detection_only": {
            "type": "boolean"
          },
          "cooldown_minutes": {
            "type": "number",
            "description": "Waiting time in minutes"
          },
          "enabled": {
            "type": "boolean"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowConditionV2"
            },
            "description": "Omitted or empty when the flow has no conditions"
          },
          "trigger": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "$ref": "#/components/schemas/FlowTargetSelectorV2",
            "description": "Execution destination: type selects the scope; ids list Workspace _id values, Workspace group _id values, or Reporting Group _id (empty when type is ALL_WORKSPACES)"
          },
          "microservice_id": {
            "type": "string",
            "nullable": true,
            "description": "Linked microservice ID when present"
          },
          "init_text": {
            "type": "string",
            "nullable": true,
            "description": "Resolved to Accept-Language when multilingual"
          },
          "ok_text": {
            "type": "string",
            "nullable": true,
            "description": "Resolved to Accept-Language when multilingual"
          },
          "ko_text": {
            "type": "string",
            "nullable": true,
            "description": "Resolved to Accept-Language when multilingual"
          },
          "execution_metrics": {
            "$ref": "#/components/schemas/FlowExecutionMetricsV2",
            "nullable": true,
            "description": "Present when metrics are calculated for this flow"
          }
        },
        "required": [
          "id",
          "created_at",
          "name",
          "description",
          "type",
          "version",
          "detection_only",
          "cooldown_minutes",
          "enabled",
          "target"
        ]
      },
      "FlowConditionV2": {
        "type": "object",
        "properties": {
          "condition_type_id": {
            "type": "string"
          },
          "metric": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "compare_to": {
            "type": "string"
          },
          "period": {
            "type": "number",
            "nullable": true
          },
          "check_every": {
            "type": "number"
          }
        },
        "required": [
          "condition_type_id",
          "metric",
          "operator",
          "compare_to",
          "check_every"
        ]
      },
      "FlowTargetSelectorV2": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "all_workspaces",
              "workspaces",
              "workspace_groups",
              "reporting_groups"
            ],
            "description": "ALL_WORKSPACES: ids are always []. WORKSPACES: ids are Workspace document _id (24 hex). WORKSPACE_GROUPS / REPORTING_GROUPS: ids are group _id values."
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            }
          }
        },
        "required": [
          "type",
          "ids"
        ]
      },
      "FlowExecutionMetricsV2": {
        "type": "object",
        "properties": {
          "targeted_workspaces": {
            "type": "number"
          },
          "evaluations_per_day": {
            "type": "number"
          },
          "possible_executions_per_day": {
            "type": "number"
          },
          "total_possible_executions_per_day": {
            "type": "number"
          }
        },
        "required": [
          "targeted_workspaces",
          "evaluations_per_day",
          "possible_executions_per_day",
          "total_possible_executions_per_day"
        ]
      },
      "MultilangField": {
        "type": "object",
        "description": "Multilanguage field. Keys are language codes (en-EN, es-ES, pt-BR, eu-ES, ca-ES). At least one key must be present. Each value must be between 1 and 512 characters.",
        "properties": {
          "en-EN": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "es-ES": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "pt-BR": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "eu-ES": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "ca-ES": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "additionalProperties": false
      },
      "CreateFlowV2Request": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Flow name. Requires at least one language key; each value must be between 1 and 512 characters."
          },
          "description": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Flow description. Requires at least one language key; each value must be between 1 and 512 characters."
          },
          "type": {
            "type": "string",
            "enum": [
              "session",
              "workspace"
            ]
          },
          "detection_only": {
            "type": "boolean"
          },
          "cooldown_minutes": {
            "type": "number",
            "minimum": 10,
            "maximum": 1440,
            "description": "Waiting time in minutes. Must be between 10 and 1440."
          },
          "enabled": {
            "type": "boolean",
            "default": false,
            "description": "If true, the flow is enabled upon creation (requires valid conditions, microservice, and target). If omitted or false, a disabled flow is created."
          },
          "init_text": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Initial text message. Omitted if not needed. When provided, requires at least one language key; each value must be between 1 and 512 characters."
          },
          "ok_text": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Success text message. Omitted if not needed. When provided, requires at least one language key; each value must be between 1 and 512 characters."
          },
          "ko_text": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Error text message. Omitted if not needed. When provided, requires at least one language key; each value must be between 1 and 512 characters."
          },
          "target": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "all_workspaces",
                  "workspaces",
                  "workspace_groups",
                  "reporting_groups"
                ]
              },
              "ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 512
                }
              }
            },
            "required": [
              "type"
            ]
          },
          "microservice_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowConditionInputV2"
            }
          }
        },
        "required": [
          "name",
          "description",
          "type",
          "detection_only",
          "cooldown_minutes",
          "target",
          "microservice_id",
          "conditions"
        ]
      },
      "FlowConditionInputV2": {
        "type": "object",
        "properties": {
          "condition_type_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "operator": {
            "type": "string",
            "enum": [
              "eq",
              "gt",
              "lt",
              "gte",
              "lte",
              "startsWith",
              "endsWith",
              "contains",
              "at"
            ]
          },
          "compare_to": {
            "type": "string",
            "maxLength": 512
          },
          "period": {
            "type": "number",
            "nullable": true
          },
          "check_every": {
            "type": "number"
          }
        },
        "required": [
          "condition_type_id",
          "operator",
          "compare_to",
          "check_every"
        ]
      },
      "CreateOperationV2Request": {
        "type": "object",
        "required": [
          "type",
          "target"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "execute_microservice",
              "delete_workspaces",
              "shutdown_workspaces",
              "restart_workspaces",
              "suspend_workspaces"
            ]
          },
          "target": {
            "type": "object",
            "required": [
              "type",
              "ids"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "workspaces",
                  "sessions"
                ]
              },
              "ids": {
                "type": "array",
                "minItems": 1,
                "maxItems": 20000,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              }
            },
            "additionalProperties": false
          },
          "expiration_in_seconds": {
            "type": "integer",
            "maximum": 84600,
            "minimum": 600
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      },
      "CreateOperationV2Response": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/GetOperationByIdResponseV1"
            }
          }
        }
      },
      "GetOperationByIdResponseV1": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Operation execution identifier."
          },
          "name": {
            "type": "string",
            "description": "Operation name."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the organization owning the operation."
          },
          "description": {
            "type": "string",
            "description": "Operation description. An empty string is returned when it doesn't exist at source."
          },
          "status": {
            "type": "string",
            "enum": [
              "finished",
              "unknown",
              "error",
              "pending",
              "in-progress",
              "timeout",
              "cancelled",
              "scheduled"
            ],
            "description": "Current operation status."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start timestamp."
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Completion timestamp."
          },
          "microservice_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Related microservice identifier, when it exists."
          },
          "flow_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Related flow identifier, when it exists."
          },
          "remote_support": {
            "$ref": "#/components/schemas/GetOperationByIdRemoteSupportV1"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "description",
          "status",
          "created_at"
        ]
      },
      "GetOperationByIdRemoteSupportV1": {
        "type": "object",
        "nullable": true,
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Remote support start date."
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Remote support end date."
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "Type of remote support session."
          }
        }
      },
      "CreateReportingGroupMagicLinkRequestV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration date and time in UTC (ISO 8601, e.g., with a Z suffix). It must be in the future and no more than 91 days ahead.",
            "example": "2026-03-15T12:00:00.000Z"
          },
          "installer": {
            "$ref": "#/components/schemas/ReportingGroupMagicLinkInstallerV2"
          }
        },
        "required": [
          "expires_at",
          "installer"
        ],
        "description": "Request body for creating a magic link of Reporting Group."
      },
      "ReportingGroupMagicLinkInstallerV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "version": {
            "type": "string",
            "enum": [
              "latest"
            ],
            "description": "Installer version.",
            "example": "latest"
          },
          "platform": {
            "type": "string",
            "enum": [
              "windows"
            ],
            "description": "Installer platform.",
            "example": "windows"
          },
          "arch": {
            "type": "string",
            "enum": [
              "x64"
            ],
            "description": "Installer architecture.",
            "example": "x64"
          },
          "type": {
            "type": "string",
            "enum": [
              "fxxone"
            ],
            "description": "Installer type.",
            "example": "fxxone"
          }
        },
        "required": [
          "version",
          "platform",
          "arch",
          "type"
        ],
        "description": "Installer selection for the magic link."
      },
      "CreateReportingGroupMagicLinkResponseV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of the magic link",
            "example": "507f1f77bcf86cd799439099"
          },
          "token": {
            "type": "string",
            "description": "Token associated with the magic link.",
            "example": "2ab46558-3c40-4b72-8fce-08b7b596f624"
          },
          "link": {
            "type": "string",
            "description": "Magic link URL.",
            "example": "https://portal.example.com/magic-link?key=2ab46558-3c40-4b72-8fce-08b7b596f624"
          }
        },
        "required": [
          "id",
          "token",
          "link"
        ]
      },
      "CreateReportingGroupRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 512,
            "description": "The reporting group name. Must be unique within the organization.",
            "example": "Grupo de reporte de Producción"
          },
          "product_config_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Unique identifier of the product configuration to associate with this reporting group. Product configuration must exist and belong to the organization.",
            "example": "507f1f77bcf86cd799439030"
          },
          "patch_policy_target_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. Unique identifier of the patch policy target to associate with this reporting group.",
            "example": "507f1f77bcf86cd799439040"
          },
          "fishing_pattern": {
            "type": "string",
            "maxLength": 250,
            "description": "Optional. A regular expression pattern used to match devices. Must be a valid regex pattern. If provided, fishing_pattern_field must also be specified.",
            "example": "Estaciones de trabajo Windows"
          },
          "fishing_pattern_field": {
            "type": "string",
            "enum": [
              "full_name",
              "description",
              "ou",
              "current_subnet"
            ],
            "description": "Optional. Field to which fishing_pattern is applied. Required if fishing_pattern is provided. Valid values: full_name (full device name), description (device description), ou (organizational unit), current_subnet (current subnet).",
            "example": "full_name"
          },
          "intermediate_device_1_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the first intermediate device Workspace. Intermediate devices are used for actions like Wake-on-LAN in secure networks, allowing remote powering on of target devices through intermediate gateways. Intermediate devices must be sequentially defined without gaps. If intermediate_device_2_id or intermediate_device_3_id is provided, this field is required.",
            "example": "507f1f77bcf86cd799439050"
          },
          "intermediate_device_2_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the second intermediate device Workspace. Used for Wake-on-LAN actions in secure networks. Requires intermediate_device_1_id to be provided. If intermediate_device_3_id is provided, this field is required.",
            "example": "507f1f77bcf86cd799439051"
          },
          "intermediate_device_3_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the third intermediate device Workspace. Used for Wake-on-LAN actions in secure networks. Requires both intermediate_device_1_id and intermediate_device_2_id to be provided.",
            "example": "507f1f77bcf86cd799439052"
          }
        },
        "required": [
          "name",
          "product_config_id"
        ],
        "description": "Request body for creating a new reporting group. Reporting groups manage devices and handle configurations, patch policies, and routing of intermediary devices."
      },
      "ReportingGroupByIdV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Reporting group Id"
          },
          "name": {
            "type": "string",
            "description": "Name of the reporting group"
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "description": "Organization identifier"
          },
          "product_config_id": {
            "type": "string",
            "nullable": true,
            "description": "Product configuration identifier"
          },
          "fishing_pattern": {
            "type": "string",
            "nullable": true,
            "description": "Fishing pattern name"
          },
          "fishing_pattern_field": {
            "type": "string",
            "enum": [
              "full_name",
              "description",
              "ou",
              "current_subnet"
            ],
            "nullable": true,
            "description": "Field to which fishing_pattern is applied. Possible values: full_name, description, ou, current_subnet."
          },
          "patch_policy_target_id": {
            "type": "string",
            "nullable": true,
            "description": "Patch policy target identifier"
          },
          "policy_reporting_group": {
            "type": "string",
            "nullable": true,
            "description": "Policy reporting group identifier"
          },
          "overridden_agent_settings": {
            "$ref": "#/components/schemas/ReportingGroupAgentSettingsV2",
            "nullable": true,
            "description": "Agent settings overridden at the reporting group level"
          },
          "effective_agent_settings": {
            "$ref": "#/components/schemas/ReportingGroupEffectiveAgentSettingsV2",
            "nullable": true,
            "description": "Effective agent settings (combined from product configuration and overrides)"
          },
          "execute_flexx_analyzer_agent": {
            "type": "boolean",
            "description": "If Flexx Analyzer agent execution is enabled"
          },
          "intermediate_device_1_id": {
            "type": "string",
            "nullable": true,
            "description": "Workspace ID of the first intermediary device (searched by sysId)"
          },
          "intermediate_device_2_id": {
            "type": "string",
            "nullable": true,
            "description": "Workspace ID of the second intermediary device (searched by sysId)"
          },
          "intermediate_device_3_id": {
            "type": "string",
            "nullable": true,
            "description": "Workspace ID of the third intermediary device (searched by sysId)"
          }
        },
        "required": [
          "id",
          "name",
          "execute_flexx_analyzer_agent"
        ]
      },
      "ReportingGroupAgentSettingsV2": {
        "type": "object",
        "properties": {
          "remote_support": {
            "type": "string",
            "nullable": true,
            "description": "Remote support configuration"
          },
          "collect_device_location": {
            "type": "boolean",
            "nullable": true,
            "description": "If device location collection is enabled"
          },
          "auto_update_agents": {
            "type": "boolean",
            "nullable": true,
            "description": "If automatic agent updates are enabled"
          },
          "collect_event_logs": {
            "type": "boolean",
            "nullable": true,
            "description": "If event log collection is enabled"
          },
          "event_log_ids": {
            "type": "string",
            "nullable": true,
            "description": "Event log record IDs"
          },
          "event_logs_recurrence": {
            "type": "number",
            "nullable": true,
            "description": "Event logs recurrence"
          },
          "collect_disks": {
            "type": "boolean",
            "nullable": true,
            "description": "If disk collection is enabled"
          },
          "collect_services": {
            "type": "boolean",
            "nullable": true,
            "description": "If service collection is enabled"
          },
          "collect_pnp_events": {
            "type": "boolean",
            "nullable": true,
            "description": "If PnP event collection is enabled"
          },
          "collect_public_ip": {
            "type": "boolean",
            "nullable": true,
            "description": "If public IP collection is enabled"
          },
          "fra_system_actions_role": {
            "type": "string",
            "nullable": true,
            "description": "FRA system actions role"
          },
          "unified_reporting": {
            "type": "string",
            "nullable": true,
            "description": "Unified reporting configuration"
          },
          "unified_operations": {
            "type": "string",
            "nullable": true,
            "description": "Unified operations configuration"
          },
          "uninstall_protection": {
            "type": "string",
            "nullable": true,
            "enum": [
              "off",
              "on"
            ],
            "description": "Possible values: off, on. Returns null if no applicable status."
          },
          "web_apps": {
            "type": "boolean",
            "nullable": true,
            "description": "If web apps are enabled"
          }
        }
      },
      "ReportingGroupEffectiveAgentSettingsV2": {
        "type": "object",
        "description": "Effective agent settings (includes product configuration fields plus overrides)",
        "properties": {
          "remote_support": {
            "type": "string",
            "nullable": true
          },
          "collect_device_location": {
            "type": "boolean",
            "nullable": true
          },
          "auto_update_agents": {
            "type": "boolean",
            "nullable": true
          },
          "collect_event_logs": {
            "type": "boolean",
            "nullable": true
          },
          "event_log_ids": {
            "type": "string",
            "nullable": true
          },
          "event_logs_recurrence": {
            "type": "number",
            "nullable": true
          },
          "collect_disks": {
            "type": "boolean",
            "nullable": true
          },
          "collect_services": {
            "type": "boolean",
            "nullable": true
          },
          "collect_pnp_events": {
            "type": "boolean",
            "nullable": true
          },
          "collect_public_ip": {
            "type": "boolean",
            "nullable": true
          },
          "fra_system_actions_role": {
            "type": "string",
            "nullable": true
          },
          "unified_reporting": {
            "type": "string",
            "nullable": true
          },
          "uninstall_protection": {
            "type": "string",
            "nullable": true,
            "enum": [
              "off",
              "on"
            ],
            "description": "Possible values: off, on. Returns null if no applicable status."
          },
          "resources_report_recurrence": {
            "type": "number",
            "nullable": true
          },
          "profile_storage_report_recurrence": {
            "type": "number",
            "nullable": true
          },
          "sync_broker_recurrence": {
            "type": "number",
            "nullable": true
          },
          "detect_new_citrix_subscriptions": {
            "type": "boolean",
            "nullable": true
          },
          "proxy_type": {
            "type": "string",
            "nullable": true
          },
          "can_enable_flexx_agent_per_group": {
            "type": "boolean",
            "nullable": true
          },
          "web_apps": {
            "type": "boolean",
            "nullable": true
          },
          "fra_simplified_security": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateRoleRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "User role name."
          },
          "permissions": {
            "type": "array",
            "minItems": 1,
            "description": "Permission entries assigned to the role.",
            "items": {
              "$ref": "#/components/schemas/CreateRolePermissionRequestItemV2"
            }
          }
        },
        "required": [
          "name",
          "permissions"
        ]
      },
      "CreateRolePermissionRequestItemV2": {
        "type": "object",
        "properties": {
          "portal_permission": {
            "type": "string",
            "enum": [
              "admin",
              "organization_admin",
              "organization_admin_read_only",
              "user",
              "platform",
              "l1_support_team",
              "l1_support_team_read_only",
              "l2_support_team",
              "l2_support_team_read_only",
              "l3_engineering_team",
              "l3_engineering_team_read_only",
              "billing"
            ],
            "description": "Portal permission level."
          },
          "workspaces_permission": {
            "type": "string",
            "enum": [
              "no_access",
              "l1_support_team_read_only",
              "l1_support_team",
              "l2_support_team_read_only",
              "l2_support_team",
              "l3_engineering_team_read_only",
              "l3_engineering_team",
              "admin_read_only",
              "admin"
            ],
            "description": "Workspace permission level."
          },
          "analyzer_permission": {
            "type": "string",
            "enum": [
              "no_access",
              "access",
              "admin"
            ],
            "description": "Analyzer permission level."
          },
          "target_organization": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              },
              {
                "type": "string",
                "pattern": "^[0-9a-f]{24}$",
                "minLength": 24,
                "maxLength": 24
              }
            ],
            "description": "Organization scope of permission: `all` for all organizations or a specific `organization_id`."
          },
          "target_reporting_groups": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              },
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{24}$",
                  "minLength": 24,
                  "maxLength": 24
                }
              }
            ],
            "description": "Reporting groups scope of permission: `all` for all groups or list of specific `reporting_group_id`."
          }
        },
        "required": [
          "portal_permission",
          "workspaces_permission",
          "analyzer_permission",
          "target_organization",
          "target_reporting_groups"
        ]
      },
      "RoleV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Role identifier."
          },
          "name": {
            "type": "string",
            "description": "Role name."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with this role."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Role creation timestamp in ISO 8601 format."
          },
          "created_by": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the user who created the role."
          },
          "permissions": {
            "type": "array",
            "nullable": true,
            "description": "Permission entries configured for this role.",
            "items": {
              "$ref": "#/components/schemas/GetRolePermissionItemV2"
            }
          }
        },
        "required": [
          "id",
          "name",
          "organization_id",
          "created_at",
          "created_by"
        ]
      },
      "GetRolePermissionItemV2": {
        "type": "object",
        "properties": {
          "portal_permission": {
            "type": "string",
            "nullable": true,
            "enum": [
              "admin",
              "organization_admin",
              "organization_admin_read_only",
              "user",
              "platform",
              "l1_support_team",
              "l1_support_team_read_only",
              "l2_support_team",
              "l2_support_team_read_only",
              "l3_engineering_team",
              "l3_engineering_team_read_only",
              "billing"
            ],
            "description": "Portal permission level."
          },
          "workspaces_permission": {
            "type": "string",
            "nullable": true,
            "enum": [
              "no_access",
              "l1_support_team_read_only",
              "l1_support_team",
              "l2_support_team_read_only",
              "l2_support_team",
              "l3_engineering_team_read_only",
              "l3_engineering_team",
              "admin_read_only",
              "admin"
            ],
            "description": "Workspace permission level."
          },
          "analyzer_permission": {
            "type": "string",
            "nullable": true,
            "enum": [
              "no_access",
              "access",
              "admin"
            ],
            "description": "Analyzer permission level."
          },
          "target_organization": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              },
              {
                "type": "string",
                "pattern": "^[0-9a-f]{24}$",
                "minLength": 24,
                "maxLength": 24
              }
            ],
            "description": "Organization scope of permission: `all` for all organizations or a specific `organization_id`."
          },
          "target_reporting_groups": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              },
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{24}$",
                  "minLength": 24,
                  "maxLength": 24
                }
              }
            ],
            "description": "Reporting groups scope of permission: `all` for all groups or list of specific `reporting_group_id`."
          }
        },
        "required": [
          "target_organization",
          "target_reporting_groups"
        ]
      },
      "CreateTenantRequestV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "tenant",
              "organization"
            ],
            "description": "Creation type. `tenant` for END CUSTOMER, `organization` for PARTNER/WHOLESALER."
          },
          "name": {
            "type": "string",
            "maxLength": 512
          },
          "tenant_config": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "description": "Specific configuration for `type=tenant`.",
            "properties": {
              "product_config_id": {
                "type": "string",
                "maxLength": 24,
                "pattern": "^[0-9a-f]{24}$"
              },
              "analyzer": {
                "type": "string",
                "enum": [
                  "existing",
                  "new"
                ]
              }
            },
            "required": [
              "product_config_id",
              "analyzer"
            ]
          },
          "organization_config": {
            "type": "object",
            "additionalProperties": false,
            "nullable": true,
            "description": "Specific configuration for `type=organization`.",
            "properties": {
              "product_id": {
                "type": "string",
                "maxLength": 24,
                "pattern": "^[0-9a-f]{24}$"
              },
              "region": {
                "type": "string",
                "maxLength": 128
              }
            },
            "required": [
              "product_id",
              "region"
            ]
          },
          "policy_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "organization_email": {
            "type": "string",
            "maxLength": 512
          },
          "organization_language": {
            "type": "string",
            "maxLength": 512
          },
          "organization_country": {
            "type": "string",
            "maxLength": 512
          },
          "organization_industry": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "type",
          "name",
          "organization_email",
          "organization_language",
          "organization_country",
          "organization_industry"
        ],
        "description": "Unique creation body with conditional fields by `type`: if `type=tenant`, requires `tenant_config`; if `type=organization`, requires `organization_config`."
      },
      "TenantByIdV2": {
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "created_at",
          "name",
          "region"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "organization_id": {
            "type": "string",
            "description": "Tenant organization ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "description": "Product ID"
          },
          "policy_id": {
            "type": "string",
            "nullable": true,
            "description": "Policy ID"
          }
        }
      },
      "CreateUserRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "User's name."
          },
          "surname": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "User's surname."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "User's email address."
          },
          "language": {
            "type": "string",
            "enum": [
              "en-EN",
              "es-ES",
              "pt-BR",
              "ca-ES",
              "eu-ES"
            ],
            "description": "Preferred language code."
          },
          "role_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the role assigned to the user."
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "User's department."
          },
          "email_login_enabled": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether email login is enabled for the user."
          }
        },
        "required": [
          "name",
          "surname",
          "email",
          "language",
          "role_id"
        ]
      },
      "UserByIdV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "User identifier."
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with the user."
          },
          "name": {
            "type": "string",
            "description": "User's name."
          },
          "surname": {
            "type": "string",
            "description": "User's surname."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "User's email address."
          },
          "language": {
            "type": "string",
            "enum": [
              "en-EN",
              "es-ES",
              "pt-BR",
              "ca-ES",
              "eu-ES"
            ],
            "description": "User's preferred language code."
          },
          "created_at": {
            "type": "string",
            "description": "Creation date in ISO 8601 format."
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "User's department."
          },
          "role_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the role assigned to the user."
          },
          "created_by": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the user who created the user record."
          },
          "email_login_enabled": {
            "type": "boolean",
            "nullable": true,
            "description": "Indicates if email login is enabled for the user."
          }
        },
        "required": [
          "id",
          "name",
          "surname",
          "email",
          "language",
          "created_at"
        ]
      },
      "CreateWorkspaceGroupScheduleRequestV2": {
        "type": "object",
        "properties": {
          "cron_expression": {
            "type": "string",
            "description": "Cron expression defining when the schedule should run. Format: minute hour day-of-month month day-of-week. Examples: '0 8 * * 1-5' (8 AM on weekdays), '0 0 * * 0' (midnight on Sunday), '30 14 * * *' (2:30 PM daily). Day-of-week: 0=Sunday, 1=Monday, ..., 6=Saturday. Supports ranges (1-5), lists (1,3,5), and wildcards (*). Must be a valid cron expression format with 5 space-separated fields.",
            "example": "0 8 * * 1-5"
          },
          "time_zone": {
            "type": "string",
            "description": "Timezone for the execution of the schedule. Supports IANA identifiers (e.g., 'America/New_York') and Windows identifiers (e.g., 'Pacific Standard Time').",
            "example": "Eastern Standard Time"
          },
          "type": {
            "type": "string",
            "enum": [
              "start",
              "stop",
              "restart"
            ],
            "description": "Type of power operation to perform. START: Turns on the group's Workspaces. STOP: Turns off the group's Workspaces. RESTART: Restarts the group's Workspaces.",
            "example": "start"
          },
          "intermediate_device": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the intermediate device Workspace. If provided, indicates an intermediate device must be used for Wake on LAN operations. Only applicable for START schedules. Used for Wake on LAN actions in secure networks. The Workspace must exist and belong to the organization.",
            "example": "507f1f77bcf86cd799439050"
          }
        },
        "required": [
          "cron_expression",
          "time_zone",
          "type"
        ]
      },
      "WorkspaceGroupScheduleV2": {
        "type": "object",
        "required": [
          "id",
          "cron_expression",
          "time_zone",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "description": "The unique identifier of the schedule",
            "example": "507f1f77bcf86cd799439060"
          },
          "cron_expression": {
            "type": "string",
            "description": "Cron expression defining when the schedule runs. Format: minute hour day-of-month month day-of-week.",
            "example": "0 8 * * 1-5"
          },
          "time_zone": {
            "type": "string",
            "description": "Timezone for the execution of the schedule. Supports IANA identifiers (e.g., 'America/New_York') and Windows identifiers (e.g., 'Pacific Standard Time').",
            "example": "Eastern Standard Time"
          },
          "type": {
            "type": "string",
            "enum": [
              "start",
              "stop",
              "restart"
            ],
            "description": "Power operation type: START (switch on), STOP (switch off), RESTART (restart Workspaces)"
          },
          "intermediate_device": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "nullable": true,
            "description": "The unique identifier of the intermediate device Workspace, if configured. Used for Wake on LAN actions in secure networks.",
            "example": "507f1f77bcf86cd799439050"
          },
          "created_by": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "nullable": true,
            "description": "User ID who created the schedule",
            "example": "507f1f77bcf86cd799439070"
          }
        }
      },
      "WorkspacegroupsCreateRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 512
          },
          "description": {
            "type": "string",
            "maxLength": 512
          },
          "type": {
            "type": "string",
            "enum": [
              "static"
            ],
            "default": "static"
          },
          "location": {
            "$ref": "#/components/schemas/WorkspaceGroupBaseUpdateLocationInputV2"
          }
        },
        "required": [
          "name"
        ]
      },
      "WorkspaceGroupBaseUpdateLocationInputV2": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "address": {
            "type": "string",
            "maxLength": 512
          },
          "description": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "latitude",
          "longitude",
          "address"
        ]
      },
      "WorkspaceGroupDetailResponseV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "description": "ID of the workspace group"
          },
          "name": {
            "type": "string",
            "description": "Name of the workspace group"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description of the workspace group"
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "description": "Organization identifier"
          },
          "created_by": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "description": "ID of the user who created the workspace group"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "static",
              "dynamic",
              "entra_id"
            ],
            "description": "Type of workspace group"
          },
          "filter": {
            "type": "string",
            "nullable": true,
            "description": "Filter string for dynamic workspace groups"
          },
          "location": {
            "$ref": "#/components/schemas/WorkspaceLocationV2",
            "nullable": true,
            "description": "Location information of the workspace group"
          },
          "entra_id_source": {
            "$ref": "#/components/schemas/WorkspaceGroupEntraIdSourceV2",
            "nullable": true,
            "description": "Entra ID source information for the workspace group"
          }
        },
        "required": [
          "id",
          "name",
          "organization_id",
          "created_at"
        ]
      },
      "WorkspaceGroupEntraIdSourceV2": {
        "type": "object",
        "properties": {
          "resource_id": {
            "type": "string",
            "description": "Entra ID resource ID"
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "group",
              "administrative_unit"
            ],
            "description": "Entra ID resource type"
          },
          "resource_name": {
            "type": "string",
            "description": "Entra ID resource name"
          }
        },
        "required": [
          "resource_id",
          "resource_type",
          "resource_name"
        ]
      },
      "WorkspaceLocationV2": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "description": "Latitude coordinate"
          },
          "longitude": {
            "type": "number",
            "description": "Longitude coordinate"
          },
          "address": {
            "type": "string",
            "description": "Address string"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Location description"
          }
        },
        "required": [
          "latitude",
          "longitude",
          "address"
        ]
      },
      "GetOperationByIdResponseV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Operation execution identifier."
          },
          "name": {
            "type": "string",
            "description": "Operation name."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the organization owning the operation."
          },
          "description": {
            "type": "string",
            "description": "Operation description. An empty string is returned when it doesn't exist at source."
          },
          "status": {
            "type": "string",
            "enum": [
              "finished",
              "unknown",
              "error",
              "pending",
              "in-progress",
              "timeout",
              "cancelled",
              "scheduled"
            ],
            "description": "Current operation status."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start timestamp."
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Completion timestamp."
          },
          "microservice_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Related microservice identifier, when it exists."
          },
          "flow_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Related flow identifier, when it exists."
          },
          "remote_support": {
            "$ref": "#/components/schemas/GetOperationByIdRemoteSupportV2"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "description",
          "status",
          "created_at"
        ]
      },
      "GetOperationByIdRemoteSupportV2": {
        "type": "object",
        "nullable": true,
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Remote support start date."
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Remote support end date."
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "Type of remote support session."
          }
        }
      },
      "GetAuditsResponseV2": {
        "type": "object",
        "required": [
          "has_next",
          "data"
        ],
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "description": "List of audits.",
            "items": {
              "$ref": "#/components/schemas/AuditItemV2"
            }
          }
        }
      },
      "AuditItemV2": {
        "type": "object",
        "required": [
          "id",
          "audited_at",
          "action",
          "entity_type",
          "entity_id",
          "trigger_type",
          "trigger_id",
          "trigger_name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Audit identifier.",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24
          },
          "audited_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date when the audit is recorded."
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "description": "Identifier of the organization associated with the record.",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24
          },
          "action": {
            "type": "string",
            "description": "Audited action.",
            "enum": [
              "insert",
              "update",
              "delete",
              "recover",
              "soft_delete"
            ]
          },
          "entity_type": {
            "type": "string",
            "description": "Type of entity on which the action is performed."
          },
          "entity_id": {
            "type": "string",
            "description": "Identifier of the impacted entity."
          },
          "trigger_type": {
            "type": "string",
            "description": "Type of actor triggering the action.",
            "enum": [
              "api",
              "user"
            ]
          },
          "trigger_id": {
            "type": "string",
            "description": "Identifier of the actor.",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24
          },
          "trigger_name": {
            "type": "string",
            "description": "Visible name of the actor."
          }
        }
      },
      "ConditionTypeV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if more results are available on the next page"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionTypeV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "ConditionTypeV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "frequency_values": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "value_type": {
            "type": "string"
          },
          "value_placeholder": {
            "type": "string",
            "nullable": true
          },
          "period": {
            "type": "boolean"
          },
          "op_values": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "eq",
                "gt",
                "lt",
                "gte",
                "lte",
                "startsWith",
                "endsWith",
                "contains",
                "at"
              ]
            },
            "description": "Permitted operator values for the value_type of this condition type. Calculated field based on value_type: string → [\"eq\", \"startsWith\", \"endsWith\", \"contains\"], int/double → [\"eq\", \"gt\", \"lt\", \"gte\", \"lte\"], id/bool → [\"eq\"], cron → [\"at\"]"
          }
        },
        "required": [
          "id"
        ]
      },
      "ListDigitalActivityCoreProcessGroupCoreProcessesResponseV2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDigitalActivityCoreProcessResponseV2"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "GetDigitalActivityCoreProcessResponseV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Functional name of the core process."
          },
          "process_name": {
            "type": "string",
            "description": "Process name of the operating system."
          }
        },
        "required": [
          "name",
          "process_name"
        ]
      },
      "ListDigitalActivityCoreProcessGroupsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDigitalActivityCoreProcessGroupResponseV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "ListDigitalActivityCoreProcessMetricsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDigitalActivityCoreProcessMetricsResponseV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetDigitalActivityCoreProcessMetricsResponseV2": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Workspace identifier."
          },
          "core_process_group_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the core process group."
          },
          "reporting_group_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated reporting group."
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the organization associated with the record."
          },
          "core_activity_time_hours": {
            "type": "number",
            "description": "Core activity hours."
          },
          "reporting_time_hours": {
            "type": "number",
            "description": "Reported hours."
          },
          "opened_session_time_hours": {
            "type": "number",
            "description": "Opened session hours."
          },
          "user_active_time_hours": {
            "type": "number",
            "description": "User active hours."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Metric month."
          },
          "year": {
            "type": "integer",
            "minimum": 2000,
            "maximum": 2100,
            "description": "Metric year."
          },
          "deleted_date": {
            "type": "string",
            "nullable": true,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Workspace deletion date when applicable."
          }
        }
      },
      "ListDigitalActivityHybridWorkMetricsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDigitalActivityHybridWorkMetricsResponseV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetDigitalActivityHybridWorkMetricsResponseV2": {
        "type": "object",
        "properties": {
          "user_name": {
            "type": "string",
            "description": "User-friendly identifier in the metric."
          },
          "office_active_time_hours": {
            "type": "number",
            "description": "Office active hours."
          },
          "remote_active_time_hours": {
            "type": "number",
            "description": "Remote active hours."
          },
          "ambiguous_active_time_hours": {
            "type": "number",
            "description": "Environment-unknown active hours."
          },
          "total_active_time_hours": {
            "type": "number",
            "description": "Total active hours."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Metric month."
          },
          "year": {
            "type": "integer",
            "minimum": 2000,
            "maximum": 2100,
            "description": "Metric year."
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with the row."
          }
        }
      },
      "ListDigitalActivityUserMetricsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDigitalActivityUserMetricsResponseV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetDigitalActivityUserMetricsResponseV2": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Workspace identifier."
          },
          "user_name": {
            "type": "string",
            "description": "User-friendly identifier in the metric."
          },
          "reporting_group_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated reporting group."
          },
          "reporting_time_hours": {
            "type": "number",
            "description": "Reported hours."
          },
          "opened_session_time_hours": {
            "type": "number",
            "description": "Opened session hours."
          },
          "user_active_time_hours": {
            "type": "number",
            "description": "User activity hours."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Metric month."
          },
          "year": {
            "type": "integer",
            "minimum": 2000,
            "maximum": 2100,
            "description": "Metric year."
          },
          "deleted_date": {
            "type": "string",
            "nullable": true,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Workspace deletion date when applicable."
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with the row."
          }
        }
      },
      "ListDigitalActivityWorkspaceMetricsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetDigitalActivityWorkspaceMetricsResponseV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetDigitalActivityWorkspaceMetricsResponseV2": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Workspace identifier."
          },
          "reporting_group_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated reporting group."
          },
          "reporting_time_hours": {
            "type": "number",
            "description": "Reported hours."
          },
          "opened_session_time_hours": {
            "type": "number",
            "description": "Opened session hours."
          },
          "user_active_time_hours": {
            "type": "number",
            "description": "User activity hours."
          },
          "core_activity_time_hours": {
            "type": "number",
            "nullable": true,
            "description": "Core activity hours."
          },
          "month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Metric month."
          },
          "year": {
            "type": "integer",
            "minimum": 2000,
            "maximum": 2100,
            "description": "Metric year."
          },
          "deleted_date": {
            "type": "string",
            "nullable": true,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Workspace deletion date when applicable."
          }
        }
      },
      "FlowListItemV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowListItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "FlowListItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "session",
              "workspace"
            ]
          },
          "detection_only": {
            "type": "boolean"
          },
          "cooldown_minutes": {
            "type": "number",
            "description": "Waiting time in minutes"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "id"
        ]
      },
      "GetInstalledAppByIdResponseV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the installed application."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the organization associated with the installed application."
          },
          "name": {
            "type": "string",
            "description": "Name of the installed application."
          },
          "publisher": {
            "type": "string",
            "nullable": true,
            "description": "Provider of the installed application."
          },
          "operating_system": {
            "type": "string",
            "enum": [
              "windows",
              "linux",
              "android",
              "mac_os",
              "chrome_os",
              "other"
            ],
            "description": "Operating system where the application is observed."
          },
          "notes": {
            "type": "string",
            "description": "Notes associated with the installed application."
          },
          "discovered_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Timestamp of first discovery."
          },
          "reported_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the last report."
          },
          "installations": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of installations observed for the application."
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "operating_system",
          "notes",
          "reported_at",
          "installations"
        ]
      },
      "GetInstalledAppVersionsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetInstalledAppVersionsItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetInstalledAppVersionsItemV2": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "nullable": true,
            "description": "Installed application version."
          },
          "reported_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the last report for this version."
          },
          "discovered_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the first observation for this version."
          }
        },
        "required": [
          "reported_at",
          "discovered_at"
        ]
      },
      "GetInstalledAppWorkspacesResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetInstalledAppWorkspacesItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetInstalledAppWorkspacesItemV2": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Workspace identifier."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier."
          },
          "version": {
            "type": "string",
            "nullable": true,
            "description": "Version of the installed application reported for the Workspace."
          },
          "reported_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date and time of the last installation report for the Workspace."
          },
          "install_location": {
            "type": "string",
            "nullable": true,
            "description": "Reported installation path for the application in the Workspace."
          },
          "installed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Reported installation date and time for the Workspace."
          }
        },
        "required": [
          "workspace_id",
          "organization_id"
        ]
      },
      "GetInstalledAppsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetInstalledAppsItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetInstalledAppsItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the installed application."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the organization associated with this installed application item."
          },
          "name": {
            "type": "string",
            "description": "Name of the installed application."
          },
          "discovered_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Timestamp of first discovery."
          },
          "reported_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the last report."
          },
          "operating_system": {
            "type": "string",
            "enum": [
              "windows",
              "linux",
              "android",
              "mac_os",
              "chrome_os",
              "other"
            ],
            "description": "Operating system where the application is observed."
          },
          "publisher": {
            "type": "string",
            "nullable": true,
            "description": "Publisher of the application."
          },
          "installations": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of installations observed for the application."
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "reported_at",
          "operating_system",
          "installations"
        ]
      },
      "GetMeResponseV2": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the authenticated organization."
          },
          "token_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the authenticated API key."
          },
          "token_name": {
            "type": "string",
            "nullable": true,
            "description": "Authenticated token name."
          },
          "token_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Token creation date."
          },
          "token_expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Token expiration date."
          }
        },
        "required": [
          "organization_id",
          "token_id",
          "token_name",
          "token_created_at",
          "token_expires_at"
        ]
      },
      "GetMicroserviceByIdResponseV2": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MicroserviceItemV2"
          }
        },
        "required": [
          "data"
        ]
      },
      "MicroserviceItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Microservice identifier."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with the microservice."
          },
          "name": {
            "type": "string",
            "description": "Microservice name resolved in the requested language."
          },
          "description": {
            "type": "string",
            "description": "Microservice description resolved in the requested language."
          },
          "category": {
            "type": "string",
            "description": "Microservice category resolved in the requested language."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Microservice creation date and time."
          },
          "archived_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Archived date and time, when applicable."
          },
          "type": {
            "type": "string",
            "enum": [
              "standard",
              "condition"
            ],
            "nullable": true,
            "description": "Functional type of microservice."
          },
          "context": {
            "type": "string",
            "nullable": true,
            "description": "Microservice visibility context."
          },
          "is_ai_enhanced": {
            "type": "boolean",
            "nullable": true,
            "description": "Indicates if AI capabilities are enhanced for the microservice."
          },
          "enabled": {
            "type": "boolean",
            "description": "Indicates if the microservice is enabled for the organization."
          },
          "enabled_configuration": {
            "type": "object",
            "nullable": true,
            "description": "Organization enabled microservice configuration.",
            "properties": {
              "enabled_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "Date and time the configuration was enabled."
              },
              "efficiency": {
                "type": "number",
                "description": "Enabled configuration efficiency value."
              },
              "workspace_group_execution": {
                "type": "string",
                "enum": [
                  "l1",
                  "l2",
                  "l3"
                ],
                "description": "Execution mode by workspace groups."
              },
              "individual_execution": {
                "type": "string",
                "enum": [
                  "l1",
                  "l2",
                  "l3"
                ],
                "description": "Individual execution mode."
              },
              "end_user_execution_workspace_group_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{24}$",
                  "minLength": 24,
                  "maxLength": 24
                },
                "description": "Identifiers of workspace groups enabled for end user execution."
              }
            },
            "required": [
              "enabled_at",
              "efficiency",
              "workspace_group_execution",
              "individual_execution",
              "end_user_execution_workspace_group_ids"
            ]
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "description",
          "category",
          "created_at",
          "archived_at",
          "type",
          "context",
          "is_ai_enhanced",
          "enabled",
          "enabled_configuration"
        ]
      },
      "GetMicroservicesResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MicroserviceItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetOperationResultsResponseV2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetOperationResultItemV2"
            }
          },
          "has_next": {
            "type": "boolean",
            "description": "Indicates if more results exist on the next page."
          }
        },
        "required": [
          "data",
          "has_next"
        ]
      },
      "GetOperationResultItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Result identifier."
          },
          "operation_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Associated operation identifier."
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated workspace."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated organization."
          },
          "status": {
            "type": "string",
            "description": "Execution status of the result.",
            "enum": [
              "scheduled",
              "pending",
              "in-progress",
              "completed",
              "error",
              "timeout",
              "cancelled",
              "unknown"
            ]
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Machine name associated with the session when it exists."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Execution start date and time."
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Execution end date and time."
          },
          "script_detail": {
            "type": "string",
            "nullable": true,
            "description": "Script execution detail when it exists."
          },
          "script_duration": {
            "type": "number",
            "nullable": true,
            "description": "Script duration in seconds when it exists."
          },
          "script_response": {
            "type": "array",
            "nullable": true,
            "description": "Structured script output with timestamp and line.",
            "items": {
              "$ref": "#/components/schemas/GetOperationResultScriptResponseLineV2"
            }
          }
        },
        "required": [
          "id",
          "operation_id",
          "workspace_id",
          "status"
        ]
      },
      "GetOperationResultScriptResponseLineV2": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "ISO-8601 timestamp of the line or null when not available."
          },
          "line": {
            "type": "string",
            "description": "Content of the line or output block."
          }
        },
        "required": [
          "timestamp",
          "line"
        ]
      },
      "GetOperationsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there's a next page."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetOperationItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetOperationItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Operation execution identifier."
          },
          "name": {
            "type": "string",
            "description": "Operation name."
          },
          "description": {
            "type": "string",
            "description": "Operation description. An empty string is returned when it doesn't exist at source."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the organization owning the operation."
          },
          "status": {
            "type": "string",
            "enum": [
              "finished",
              "unknown",
              "error",
              "pending",
              "in-progress",
              "timeout",
              "cancelled",
              "scheduled"
            ],
            "description": "Current operation status."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Start timestamp."
          },
          "ended_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Completion timestamp."
          },
          "microservice_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Related microservice identifier, when it exists."
          },
          "flow_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Related flow identifier, when it exists."
          },
          "remote_support": {
            "$ref": "#/components/schemas/GetOperationRemoteSupportV2"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "description",
          "status",
          "created_at"
        ]
      },
      "GetOperationRemoteSupportV2": {
        "type": "object",
        "nullable": true,
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Remote support start date."
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Remote support end date."
          },
          "type": {
            "type": "string",
            "nullable": true,
            "description": "Type of remote support session."
          }
        }
      },
      "GetOrganizationEntityLimitsResponseV2": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier to which the limits apply."
          },
          "limits": {
            "$ref": "#/components/schemas/OrganizationEntityLimitsV2"
          }
        },
        "required": [
          "organization_id",
          "limits"
        ]
      },
      "OrganizationEntityLimitsV2": {
        "type": "object",
        "properties": {
          "tenants": {
            "type": "integer",
            "minimum": 1
          },
          "reporting_groups": {
            "type": "integer",
            "minimum": 1
          },
          "workspace_groups": {
            "type": "integer",
            "minimum": 1
          },
          "workspace_group_schedules_per_group": {
            "type": "integer",
            "minimum": 1
          },
          "flows": {
            "type": "integer",
            "minimum": 1
          },
          "microservices": {
            "type": "integer",
            "minimum": 1
          },
          "reports": {
            "type": "integer",
            "minimum": 1
          },
          "webapps": {
            "type": "integer",
            "minimum": 1
          },
          "webhooks": {
            "type": "integer",
            "minimum": 1
          },
          "licenses": {
            "type": "integer",
            "minimum": 1
          },
          "alert_settings": {
            "type": "integer",
            "minimum": 1
          },
          "roles": {
            "type": "integer",
            "minimum": 1
          },
          "users": {
            "type": "integer",
            "minimum": 1
          },
          "patching_policies": {
            "type": "integer",
            "minimum": 1
          },
          "patching_targets": {
            "type": "integer",
            "minimum": 1
          },
          "policies": {
            "type": "integer",
            "minimum": 1
          },
          "microservice_categories": {
            "type": "integer",
            "minimum": 1
          },
          "domains": {
            "type": "integer",
            "minimum": 1
          },
          "sso_integrations": {
            "type": "integer",
            "minimum": 1
          },
          "product_configs": {
            "type": "integer",
            "minimum": 1
          },
          "modules": {
            "type": "integer",
            "minimum": 1
          },
          "api_keys": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "tenants",
          "reporting_groups",
          "workspace_groups",
          "workspace_group_schedules_per_group",
          "flows",
          "microservices",
          "reports",
          "webapps",
          "webhooks",
          "licenses",
          "alert_settings",
          "roles",
          "users",
          "patching_policies",
          "patching_targets",
          "policies",
          "microservice_categories",
          "domains",
          "sso_integrations",
          "product_configs",
          "modules",
          "api_keys"
        ]
      },
      "PatchPolicyTargetV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if more results are available on the next page"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PatchPolicyTargetV2"
            },
            "description": "Array of patch policy target objects"
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "PatchPolicyTargetV2": {
        "type": "object",
        "description": "Patch policy target resource",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Unique identifier of the patch policy target",
            "example": "66ab6cf4d4d2e709bafd404c"
          },
          "name": {
            "type": "string",
            "description": "Patch policy target name",
            "example": "Base"
          },
          "created_by": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "User ID who created the patch policy target",
            "example": "6439606652fc0c0051f1787b"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation date and time of patch policy target (datetime ISO 8601)",
            "example": "2024-08-01T11:09:40.719Z"
          },
          "timezone": {
            "type": "string",
            "description": "Timezone for patch policy schedule. IANA timezone identifier or Windows timezone name.",
            "example": "UTC"
          },
          "should_restart": {
            "type": "boolean",
            "description": "Whether Workspaces should be restarted after patching",
            "example": true
          },
          "wake_on_lan": {
            "type": "boolean",
            "description": "If Wake on LAN should be used for patching",
            "example": true
          },
          "force_patching_configuration": {
            "type": "boolean",
            "description": "Whether forced patch configuration should be applied",
            "example": false
          },
          "is_in_maintenance": {
            "type": "boolean",
            "description": "If the patch policy target is currently in maintenance mode",
            "example": false
          },
          "weeks": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "description": "Array of week numbers (1-4) when patching should occur",
            "example": [
              1,
              2
            ]
          },
          "schedule": {
            "type": "object",
            "description": "Schedule defining when patching occurs. Keys are names of days (MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY). Values are empty objects or objects with hour keys (as strings) containing arrays of minute numbers.",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 59
                }
              }
            },
            "example": {
              "MONDAY": {},
              "TUESDAY": {},
              "WEDNESDAY": {},
              "THURSDAY": {
                "9": [
                  15,
                  30,
                  45
                ],
                "10": [
                  0,
                  15,
                  30,
                  45
                ],
                "11": [
                  0,
                  15,
                  30,
                  45
                ]
              },
              "FRIDAY": {},
              "SATURDAY": {},
              "SUNDAY": {}
            }
          },
          "patch_policy_target_type": {
            "type": "string",
            "enum": [
              "windows",
              "linux",
              null
            ],
            "nullable": true,
            "description": "Type of patch policy target ('windows', 'linux' or null).",
            "example": "windows"
          },
          "patch_policy_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "nullable": true,
            "description": "Unique identifier of the associated patch policy. Null if no patch policy assigned.",
            "example": "507f1f77bcf86cd799439011"
          }
        },
        "required": [
          "id"
        ]
      },
      "ProductConfigV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if there are more pages available"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductConfigV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "ProductConfigV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Unique identifier of the product configuration",
            "example": "507f1f77bcf86cd799439011"
          },
          "environment": {
            "type": "string",
            "description": "Environment type for product configuration (e.g., PRODUCTION, STAGING, DEVELOPMENT).",
            "example": "PRODUCTION"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation date and time of product configuration (date and time ISO 8601)",
            "example": "2024-01-15T10:30:00.000Z"
          },
          "active": {
            "type": "boolean",
            "description": "Indicates if the product configuration is active.",
            "example": true
          },
          "product_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Unique identifier of the product associated with this configuration",
            "example": "507f1f77bcf86cd799439001"
          },
          "region": {
            "type": "string",
            "nullable": true,
            "description": "Name of the region where the product configuration is deployed. Nullable if no region assigned.",
            "example": "us-east"
          }
        },
        "required": [
          "id"
        ]
      },
      "GetReportingGroupAgentVersionsCatalogResponseV2": {
        "type": "object",
        "properties": {
          "windows_cp": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "windows": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "macos": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linux": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "windows_cp",
          "windows",
          "macos",
          "linux"
        ]
      },
      "GetReportingGroupAgentVersionsResponseV2": {
        "type": "object",
        "properties": {
          "agent_auto_update": {
            "type": "boolean"
          },
          "versions": {
            "$ref": "#/components/schemas/ReportingGroupAgentVersionsV2"
          }
        },
        "required": [
          "agent_auto_update",
          "versions"
        ]
      },
      "ReportingGroupAgentVersionsV2": {
        "type": "object",
        "properties": {
          "windows_cp": {
            "$ref": "#/components/schemas/ReportingGroupAgentVersionChannelPairV2"
          },
          "windows": {
            "$ref": "#/components/schemas/ReportingGroupAgentVersionChannelPairV2"
          },
          "macos": {
            "$ref": "#/components/schemas/ReportingGroupAgentVersionChannelPairV2"
          },
          "linux": {
            "$ref": "#/components/schemas/ReportingGroupAgentVersionChannelPairV2"
          }
        },
        "required": [
          "windows_cp",
          "windows",
          "macos",
          "linux"
        ]
      },
      "ReportingGroupAgentVersionChannelPairV2": {
        "type": "object",
        "properties": {
          "early": {
            "type": "string"
          },
          "production": {
            "type": "string"
          }
        },
        "required": [
          "early",
          "production"
        ]
      },
      "ReportingGroupListItemV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportingGroupListItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "ReportingGroupListItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Reporting group Id"
          },
          "name": {
            "type": "string",
            "description": "Name of the reporting group"
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "description": "Organization identifier"
          },
          "product_config_id": {
            "type": "string",
            "nullable": true,
            "description": "Product configuration identifier"
          },
          "fishing_pattern": {
            "type": "string",
            "nullable": true,
            "description": "Fishing pattern name"
          },
          "fishing_pattern_field": {
            "type": "string",
            "enum": [
              "full_name",
              "description",
              "ou",
              "current_subnet"
            ],
            "nullable": true,
            "description": "Field to which fishing_pattern is applied. Possible values: full_name, description, ou, current_subnet."
          },
          "patch_policy_target_id": {
            "type": "string",
            "nullable": true,
            "description": "Patch policy target identifier"
          },
          "policy_reporting_group": {
            "type": "string",
            "nullable": true,
            "description": "Policy reporting group identifier"
          },
          "overridden_agent_settings": {
            "$ref": "#/components/schemas/ReportingGroupAgentSettingsV2",
            "nullable": true,
            "description": "Agent configuration overridden at the reporting group level"
          },
          "effective_agent_settings": {
            "$ref": "#/components/schemas/ReportingGroupEffectiveAgentSettingsV2",
            "nullable": true,
            "description": "Effective agent settings"
          },
          "execute_flexx_analyzer_agent": {
            "type": "boolean",
            "description": "If the execution of the FlexxAnalyzer agent is enabled"
          },
          "can_manage_agent_versions": {
            "type": "boolean",
            "description": "Indicates if the report group allows self-management of agent versions according to its associated product configuration"
          },
          "flexx_agent_portal_download": {
            "type": "boolean",
            "description": "If FlexxAgent download from the portal is enabled for the group organization"
          },
          "intermediate_device_1_id": {
            "type": "string",
            "nullable": true,
            "description": "Workspace ID of the first intermediary device"
          },
          "intermediate_device_2_id": {
            "type": "string",
            "nullable": true,
            "description": "Workspace ID of the second intermediary device"
          },
          "intermediate_device_3_id": {
            "type": "string",
            "nullable": true,
            "description": "Workspace ID of the third intermediary device"
          }
        },
        "required": [
          "id"
        ]
      },
      "GetReportingGroupMonthlyReportResponseV2": {
        "type": "object",
        "description": "Monthly support report of a report group.",
        "properties": {
          "reporting_group_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Report group identifier."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier."
          },
          "period_year": {
            "type": "integer",
            "minimum": 1,
            "description": "Year of the report."
          },
          "period_month": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Month of the report."
          },
          "applied_patches": {
            "type": "integer",
            "description": "Number of applied patches."
          },
          "critical_patches": {
            "type": "integer",
            "description": "Number of critical patches."
          },
          "security_patches": {
            "type": "integer",
            "description": "Number of security patches."
          },
          "other_patches": {
            "type": "integer",
            "description": "Number of other patches."
          },
          "total_used_apps": {
            "type": "integer",
            "description": "Total number of applications used in the period."
          },
          "top_apps": {
            "type": "array",
            "description": "Most used applications in the period.",
            "items": {
              "$ref": "#/components/schemas/ReportingGroupMonthlyTopAppV2"
            }
          },
          "automatic_remediations": {
            "$ref": "#/components/schemas/ReportingGroupMonthlyAutomaticRemediationsV2"
          },
          "current_reporting_group_name": {
            "type": "string",
            "description": "Current name of the report group."
          },
          "current_total_workspaces": {
            "type": "integer",
            "description": "Current total of group workspaces."
          },
          "current_total_workspace_users": {
            "type": "integer",
            "description": "Current total of users in group workspaces."
          },
          "current_workspace_antivirus_statistics": {
            "$ref": "#/components/schemas/ReportingGroupMonthlyCurrentWorkspaceAntivirusStatisticsV2"
          }
        },
        "required": [
          "reporting_group_id",
          "organization_id",
          "period_year",
          "period_month",
          "applied_patches",
          "critical_patches",
          "security_patches",
          "other_patches",
          "total_used_apps",
          "top_apps",
          "automatic_remediations",
          "current_reporting_group_name",
          "current_total_workspaces",
          "current_total_workspace_users",
          "current_workspace_antivirus_statistics"
        ]
      },
      "ReportingGroupMonthlyTopAppV2": {
        "type": "object",
        "description": "Application and number of usage days during the period.",
        "properties": {
          "app_name": {
            "type": "string",
            "description": "Application name."
          },
          "usage_days": {
            "type": "integer",
            "description": "Application usage days."
          }
        },
        "required": [
          "app_name",
          "usage_days"
        ]
      },
      "ReportingGroupMonthlyAutomaticRemediationsV2": {
        "type": "object",
        "description": "Count of automatic remediations.",
        "properties": {
          "microservices": {
            "type": "integer",
            "description": "Number of remediations by microservices."
          },
          "flows": {
            "type": "integer",
            "description": "Number of remediations by flows."
          }
        },
        "required": [
          "microservices",
          "flows"
        ]
      },
      "ReportingGroupMonthlyCurrentWorkspaceAntivirusStatisticsV2": {
        "type": "object",
        "description": "Current antivirus status in group workspaces.",
        "properties": {
          "workspaces_without_antivirus": {
            "type": "integer",
            "description": "Number of workspaces without antivirus."
          },
          "workspaces_with_antivirus": {
            "$ref": "#/components/schemas/ReportingGroupMonthlyWorkspacesWithAntivirusV2"
          }
        },
        "required": [
          "workspaces_without_antivirus",
          "workspaces_with_antivirus"
        ]
      },
      "ReportingGroupMonthlyWorkspacesWithAntivirusV2": {
        "type": "object",
        "description": "Summary of workspaces with antivirus.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total of workspaces with antivirus."
          },
          "by_status": {
            "$ref": "#/components/schemas/ReportingGroupMonthlyWorkspacesWithAntivirusByStatusV2"
          }
        },
        "required": [
          "total",
          "by_status"
        ]
      },
      "ReportingGroupMonthlyWorkspacesWithAntivirusByStatusV2": {
        "type": "object",
        "description": "Distribution by antivirus status.",
        "properties": {
          "unknown": {
            "type": "integer",
            "description": "Workspaces with unknown status."
          },
          "not_installed": {
            "type": "integer",
            "description": "Workspaces with antivirus not installed."
          },
          "installed_stopped": {
            "type": "integer",
            "description": "Workspaces with antivirus installed and stopped."
          },
          "installed_working": {
            "type": "integer",
            "description": "Workspaces with antivirus installed and operational."
          }
        },
        "required": [
          "unknown",
          "not_installed",
          "installed_stopped",
          "installed_working"
        ]
      },
      "GetRolesResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetSessionByIdResponseV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "Session identifier."
          },
          "user_name": {
            "type": "string",
            "description": "User account for the session."
          },
          "session_type": {
            "type": "string",
            "enum": [
              "vdi_desktop",
              "application",
              "sdi_desktop",
              "device"
            ],
            "description": "Session type."
          },
          "windows_session_id": {
            "type": "integer",
            "description": "Windows session identifier."
          },
          "connection_state": {
            "type": "string",
            "enum": [
              "unknown",
              "connected",
              "disconnected",
              "terminated",
              "preparing_session",
              "active",
              "reconnecting",
              "non_broker_session",
              "other",
              "pending"
            ],
            "description": "State of session connection."
          },
          "start_date": {
            "type": "string",
            "description": "Session start timestamp."
          },
          "session_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "empty",
              "active_notifications",
              "active_notifications_ack_accepted",
              "active_notifications_ack_pending"
            ],
            "description": "Session status."
          },
          "platform_type": {
            "type": "string",
            "enum": [
              "windows",
              "mac",
              "linux",
              "android",
              "chrome_os",
              "unknown"
            ],
            "description": "Platform type."
          },
          "connected": {
            "type": "boolean",
            "description": "Indicates if the session is currently connected."
          },
          "current_session_id": {
            "type": "integer",
            "description": "Current connection session identifier."
          },
          "current_dc_name": {
            "type": "string",
            "description": "Current data center name."
          },
          "last_connection_time": {
            "type": "string",
            "description": "Timestamp string of the last connection."
          },
          "log_on_duration": {
            "type": "number",
            "description": "Session's login duration."
          },
          "session_key": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "Session key."
          },
          "flexx_analyzer_executed": {
            "type": "boolean",
            "description": "Indicates if the analyzer execution is completed."
          },
          "cpu_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current CPU usage."
          },
          "ram_usage_gb": {
            "type": "number",
            "nullable": true,
            "description": "Current RAM usage in gigabytes."
          },
          "rtt_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current RTT usage."
          },
          "current_uid_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current UID usage."
          },
          "ram_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current RAM usage."
          },
          "ram_percentage": {
            "type": "number",
            "nullable": true,
            "description": "Current RAM usage percentage."
          },
          "number_alerts_user": {
            "type": "number",
            "nullable": true,
            "description": "Number of user alerts."
          },
          "number_alerts_vm": {
            "type": "number",
            "nullable": true,
            "description": "Number of Workspace alerts."
          },
          "workspace_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "MongoDB identifier (_id) of the Workspace related to the session, resolved from the session relationship."
          }
        },
        "required": [
          "id",
          "user_name",
          "session_type",
          "windows_session_id",
          "connection_state",
          "start_date",
          "current_session_id",
          "current_dc_name",
          "last_connection_time",
          "log_on_duration",
          "session_key",
          "connected",
          "flexx_analyzer_executed"
        ]
      },
      "GetSessionsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "If another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetSessionItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetSessionItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "Session identifier."
          },
          "user_name": {
            "type": "string",
            "description": "User account of the session."
          },
          "session_type": {
            "type": "string",
            "enum": [
              "vdi_desktop",
              "application",
              "sdi_desktop",
              "device"
            ],
            "description": "Session type."
          },
          "windows_session_id": {
            "type": "integer",
            "description": "Windows session identifier."
          },
          "connection_state": {
            "type": "string",
            "enum": [
              "unknown",
              "connected",
              "disconnected",
              "terminated",
              "preparing_session",
              "active",
              "reconnecting",
              "non_broker_session",
              "other",
              "pending"
            ],
            "description": "Session connection state."
          },
          "start_date": {
            "type": "string",
            "description": "Session start timestamp."
          },
          "cpu_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current CPU usage."
          },
          "ram_usage_gb": {
            "type": "number",
            "nullable": true,
            "description": "Current RAM usage in gigabytes."
          },
          "rtt_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current RTT usage."
          },
          "session_status": {
            "type": "string",
            "description": "Session status."
          },
          "platform_type": {
            "type": "string",
            "enum": [
              "windows",
              "mac",
              "linux",
              "android",
              "chrome_os",
              "unknown"
            ],
            "description": "Platform type."
          },
          "connected": {
            "type": "boolean",
            "description": "Current connection indicator."
          },
          "current_session_id": {
            "type": "integer",
            "description": "Current connection session identifier."
          },
          "current_dc_name": {
            "type": "string",
            "description": "Current data center name."
          },
          "current_uid_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current UID usage."
          },
          "flexx_analyzer_executed": {
            "type": "boolean",
            "description": "If analyzer execution is finished."
          },
          "last_connection_time": {
            "type": "string",
            "description": "Timestamp string of the last connection."
          },
          "log_on_duration": {
            "type": "number",
            "description": "Login duration."
          },
          "number_alerts_user": {
            "type": "number",
            "nullable": true,
            "description": "Number of user alerts."
          },
          "number_alerts_vm": {
            "type": "number",
            "nullable": true,
            "description": "Number of Workspace alerts."
          },
          "ram_usage": {
            "type": "number",
            "nullable": true,
            "description": "Current RAM usage."
          },
          "ram_percentage": {
            "type": "number",
            "nullable": true,
            "description": "Current RAM usage percentage."
          },
          "session_key": {
            "type": "string",
            "format": "uuid",
            "pattern": "^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$",
            "minLength": 36,
            "maxLength": 36,
            "description": "Session key."
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "MongoDB identifier (_id) of the Workspace associated with the session, resolved from the session relationship."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with the session."
          }
        },
        "required": [
          "id",
          "user_name",
          "session_type",
          "windows_session_id",
          "connection_state",
          "start_date",
          "cpu_usage",
          "ram_usage_gb",
          "rtt_usage",
          "session_status",
          "platform_type",
          "connected",
          "current_session_id",
          "current_dc_name",
          "current_uid_usage",
          "flexx_analyzer_executed",
          "last_connection_time",
          "log_on_duration",
          "number_alerts_user",
          "number_alerts_vm",
          "ram_usage",
          "ram_percentage",
          "session_key",
          "workspace_id",
          "organization_id"
        ]
      },
      "TenantListItemV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if more pages are available"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantListItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "TenantListItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tenant ID"
          },
          "organization_id": {
            "type": "string",
            "description": "Tenant organization ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation date (ISO 8601 date and time)"
          },
          "name": {
            "type": "string",
            "description": "Tenant name"
          },
          "region": {
            "type": "string",
            "description": "Region/Region ID"
          },
          "product_id": {
            "type": "string",
            "nullable": true,
            "description": "Product identifier (nullable if tenant has no assigned product)"
          },
          "policy_id": {
            "type": "string",
            "nullable": true,
            "description": "Policy identifier (nullable if the tenant has no assigned policy)"
          }
        },
        "required": [
          "id"
        ]
      },
      "GetUsersResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "If another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserByIdV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "WorkspacePublicV2": {
        "type": "object",
        "description": "Workspace resource.",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "related_environment": {
            "type": "string",
            "nullable": true
          },
          "operating_system": {
            "type": "string",
            "nullable": true
          },
          "serial_number": {
            "type": "string",
            "nullable": true
          },
          "ip_address": {
            "type": "string",
            "nullable": true
          },
          "os_update_num_pending": {
            "type": "number",
            "nullable": true
          },
          "reporting_group_id": {
            "type": "string",
            "nullable": true
          },
          "flxmid": {
            "type": "string",
            "nullable": true
          },
          "os_update_num_days_since_last": {
            "type": "number",
            "nullable": true
          },
          "total_ram": {
            "type": "number",
            "nullable": true
          },
          "altitude": {
            "type": "number",
            "nullable": true
          },
          "antivirus": {
            "type": "string",
            "nullable": true
          },
          "antivirus_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "not_installed",
              "installed_stopped",
              "installed_working"
            ],
            "description": "Antivirus status."
          },
          "bios_manufacturer": {
            "type": "string",
            "nullable": true
          },
          "bios_mode": {
            "type": "string",
            "nullable": true
          },
          "bios_version": {
            "type": "string",
            "nullable": true
          },
          "bios_smbversion": {
            "type": "string",
            "nullable": true
          },
          "bios_serialnumber": {
            "type": "string",
            "nullable": true
          },
          "base_board_manufacturer": {
            "type": "string",
            "nullable": true
          },
          "base_board_product": {
            "type": "string",
            "nullable": true
          },
          "base_board_version": {
            "type": "string",
            "nullable": true
          },
          "broker": {
            "type": "string",
            "nullable": true,
            "enum": [
              "no_broker_detected",
              "azure_virtual_desktop",
              "citrix_on-premises",
              "citrix_daas",
              "amazon_workspaces",
              "vmware_horizon",
              "parallels_ras",
              "windows_365",
              "rdsh",
              "uds",
              "unknown"
            ],
            "description": "Type of broker."
          },
          "public_ip_city": {
            "type": "string",
            "nullable": true
          },
          "flexxagent_version": {
            "type": "string",
            "nullable": true
          },
          "compliance_result": {
            "type": "string",
            "nullable": true,
            "enum": [
              "not_evaluated",
              "compliant",
              "not_compliant"
            ],
            "description": "Compliance result."
          },
          "compliance_last_execution": {
            "type": "string",
            "nullable": true
          },
          "domain_name": {
            "type": "string",
            "nullable": true
          },
          "public_ip_country": {
            "type": "string",
            "nullable": true
          },
          "cores_count": {
            "type": "string",
            "nullable": true
          },
          "edr_active_detections": {
            "type": "boolean",
            "nullable": true
          },
          "edr_host_id": {
            "type": "string",
            "nullable": true
          },
          "edr_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "not_installed",
              "installed_stopped",
              "installed_working"
            ],
            "description": "EDR agent status."
          },
          "edr_version": {
            "type": "string",
            "nullable": true
          },
          "current_subnet": {
            "type": "string",
            "nullable": true
          },
          "default_gateway": {
            "type": "string",
            "nullable": true
          },
          "device_kind": {
            "type": "string",
            "nullable": true,
            "enum": [
              "virtual",
              "physical"
            ],
            "description": "Device type (Virtual/Physical)."
          },
          "edr": {
            "type": "string",
            "nullable": true
          },
          "ema_agent_version": {
            "type": "string",
            "nullable": true
          },
          "ema_endpoint_id": {
            "type": "string",
            "nullable": true
          },
          "embedded_controller_version": {
            "type": "string",
            "nullable": true
          },
          "os_fast_startup": {
            "type": "boolean",
            "nullable": true
          },
          "flexxanalyzer_config": {
            "type": "string",
            "nullable": true,
            "enum": [
              "not_configured",
              "disabled_in_workspace",
              "configured",
              "installed",
              "not_compatible"
            ],
            "description": "FlexxAnalyzer configuration."
          },
          "flexxanalyzer_version": {
            "type": "string",
            "nullable": true
          },
          "hypervisor": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "physical",
              "microsoft_azure",
              "microsoft_hyper-v",
              "vmware_vsphere",
              "amazon_web_services",
              "nutanix",
              "citrix_hypervisor",
              "oracle_cloud",
              "google_cloud"
            ],
            "description": "Hypervisor type."
          },
          "ip_version": {
            "type": "string",
            "nullable": true
          },
          "public_ip_isp": {
            "type": "string",
            "nullable": true
          },
          "iot_hub_config_sync_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "does_not_apply",
              "synced",
              "unsynced"
            ],
            "description": "IoT Hub config sync status."
          },
          "is_amt_supported": {
            "type": "boolean",
            "nullable": true
          },
          "is_laptop": {
            "type": "boolean",
            "nullable": true
          },
          "is_physical": {
            "type": "boolean",
            "nullable": true
          },
          "last_boot_duration": {
            "type": "number",
            "nullable": true
          },
          "last_restart_time": {
            "type": "string",
            "nullable": true
          },
          "last_time": {
            "type": "string",
            "nullable": true
          },
          "last_windows_update": {
            "type": "string",
            "nullable": true
          },
          "last_autorepair": {
            "type": "string",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "nullable": true
          },
          "locale": {
            "type": "string",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "nullable": true
          },
          "mac_address": {
            "type": "string",
            "nullable": true
          },
          "network_interface_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "ethernet",
              "wifi",
              "mobile_network",
              "other"
            ],
            "description": "Network interface type."
          },
          "os_build_number": {
            "type": "string",
            "nullable": true
          },
          "os_manufacturer": {
            "type": "string",
            "nullable": true
          },
          "os_version": {
            "type": "string",
            "nullable": true
          },
          "ou": {
            "type": "string",
            "nullable": true
          },
          "os_page_file": {
            "type": "string",
            "nullable": true
          },
          "os_page_file_space": {
            "type": "number",
            "nullable": true
          },
          "platform_role": {
            "type": "string",
            "nullable": true
          },
          "platform_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "windows",
              "mac",
              "android",
              "linux",
              "chromebook",
              "ios",
              "unknown"
            ],
            "description": "Platform type."
          },
          "processor": {
            "type": "string",
            "nullable": true
          },
          "public_ip": {
            "type": "string",
            "nullable": true
          },
          "os_reboot_pending": {
            "type": "boolean",
            "nullable": true
          },
          "secure_boot_state": {
            "type": "string",
            "nullable": true
          },
          "system_model": {
            "type": "string",
            "nullable": true
          },
          "system_type": {
            "type": "string",
            "nullable": true
          },
          "os_time_zone": {
            "type": "string",
            "nullable": true
          },
          "user_name": {
            "type": "string",
            "nullable": true
          },
          "vm_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "hidden",
              "workspace_or_avd_session_host",
              "desktop_template_definition",
              "vcc_role",
              "template_definition_surrogate",
              "workspace",
              "server",
              "vdi_appliance",
              "application_template_definition",
              "application_server",
              "endpoint"
            ],
            "description": "VM type."
          },
          "windows_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "workstation",
              "domain_controller",
              "server"
            ],
            "description": "Windows type."
          },
          "created_at": {
            "type": "string",
            "nullable": true
          },
          "last_deregistration_time": {
            "type": "string",
            "nullable": true
          },
          "delete_scheduled_at": {
            "type": "string",
            "nullable": true
          },
          "encrypted_harddisks": {
            "type": "string",
            "nullable": true,
            "enum": [
              "no",
              "yes",
              "partial",
              "na"
            ],
            "description": "Hard disk encryption status."
          },
          "custom_field_01": {
            "type": "string",
            "nullable": true
          },
          "custom_field_02": {
            "type": "string",
            "nullable": true
          },
          "custom_field_03": {
            "type": "string",
            "nullable": true
          },
          "custom_field_04": {
            "type": "string",
            "nullable": true
          },
          "custom_field_05": {
            "type": "string",
            "nullable": true
          },
          "custom_field_06": {
            "type": "string",
            "nullable": true
          },
          "custom_field_07": {
            "type": "string",
            "nullable": true
          },
          "custom_field_08": {
            "type": "string",
            "nullable": true
          },
          "custom_field_09": {
            "type": "string",
            "nullable": true
          },
          "custom_field_10": {
            "type": "string",
            "nullable": true
          },
          "flexxagent_type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unified",
              "mac",
              "linux",
              "universal"
            ],
            "description": "FlexxAgent type."
          },
          "antivirus_version_number": {
            "type": "string",
            "nullable": true
          },
          "related_location": {
            "type": "string",
            "nullable": true
          },
          "area": {
            "type": "string",
            "nullable": true
          },
          "custom_field_11": {
            "type": "string",
            "nullable": true
          },
          "custom_field_12": {
            "type": "string",
            "nullable": true
          },
          "custom_field_13": {
            "type": "string",
            "nullable": true
          },
          "custom_field_14": {
            "type": "string",
            "nullable": true
          },
          "custom_field_15": {
            "type": "string",
            "nullable": true
          },
          "custom_field_16": {
            "type": "string",
            "nullable": true
          },
          "custom_field_17": {
            "type": "string",
            "nullable": true
          },
          "custom_field_18": {
            "type": "string",
            "nullable": true
          },
          "custom_field_19": {
            "type": "string",
            "nullable": true
          },
          "custom_field_20": {
            "type": "string",
            "nullable": true
          },
          "department": {
            "type": "string",
            "nullable": true
          },
          "office": {
            "type": "string",
            "nullable": true
          },
          "last_custom_fields_update": {
            "type": "string",
            "nullable": true
          },
          "workspace_id": {
            "type": "string",
            "nullable": true,
            "minLength": 25,
            "pattern": "^[0-9a-f]{25,}$"
          },
          "flexxanalyzer_proxy_uri": {
            "type": "string",
            "nullable": true
          },
          "iot_hub_name": {
            "type": "string",
            "nullable": true
          },
          "flexxagent_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unknown",
              "working",
              "stopped",
              "not_reporting",
              "service_stopped",
              "service_disabled",
              "communication_error",
              "other_error",
              "not_installed",
              "update_requested",
              "updating",
              "update_error"
            ],
            "description": "FlexxAgent/VDI client status."
          },
          "boot_hard_disk_used_percentage": {
            "type": "number",
            "nullable": true
          },
          "last_connection_time": {
            "type": "string",
            "nullable": true
          },
          "network_signal": {
            "type": "number",
            "nullable": true
          },
          "num_alerts": {
            "type": "number",
            "nullable": true
          },
          "percent_cpu": {
            "type": "number",
            "nullable": true,
            "description": "Workspace CPU usage percentage."
          },
          "percent_ram": {
            "type": "number",
            "nullable": true
          },
          "power_state": {
            "type": "string",
            "nullable": true,
            "enum": [
              "unmanaged",
              "unknown",
              "dev_express",
              "off",
              "on",
              "suspended",
              "turning_on",
              "turning_off",
              "suspending",
              "resuming",
              "non_reporting"
            ],
            "description": "Power state."
          },
          "sessions_count": {
            "type": "number",
            "nullable": true
          },
          "used_system_disk_c": {
            "type": "number",
            "nullable": true
          },
          "wake_on_lan_mac": {
            "type": "string",
            "nullable": true
          },
          "wake_on_lan_subnet": {
            "type": "string",
            "nullable": true
          },
          "broker_status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "warning",
              "other",
              "preparing_session",
              "connected",
              "active",
              "disconnected",
              "reconnecting",
              "non_brokered_session",
              "error",
              "unmanaged",
              "unknown",
              "unavailable",
              "off",
              "on",
              "suspended",
              "turning_on",
              "turning_off",
              "suspending",
              "resuming",
              "not_reporting",
              "unregistered",
              "available",
              "inuse",
              "maintenance_or_drain_mode"
            ],
            "description": "Broker status."
          },
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "online",
              "offline"
            ],
            "description": "Workspace connectivity status."
          }
        },
        "required": [
          "id"
        ]
      },
      "WorkspaceGroupScheduleV2ListResponseV2": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceGroupScheduleV2"
            },
            "description": "Array of cron schedules for the workspace group"
          }
        },
        "required": [
          "data"
        ]
      },
      "WorkspaceGroupWorkspaceItemV2": {
        "type": "object",
        "description": "Workspace element in the Workspace group list (reduced projection).",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "organization_id": {
            "type": "string",
            "nullable": true,
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "related_environment": {
            "type": "string",
            "nullable": true
          },
          "operating_system": {
            "type": "string",
            "nullable": true
          },
          "ip_address": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "last_user": {
            "type": "string",
            "nullable": true
          },
          "total_ram": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "id"
        ]
      },
      "WorkspaceGroupWorkspaceListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceGroupWorkspaceItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "WorkspaceGroupListItemV2ListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceGroupListItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "WorkspaceGroupListItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "description": "ID of the workspace group"
          },
          "name": {
            "type": "string",
            "description": "Name of the workspace group"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description of the workspace group"
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "description": "Organization identifier"
          },
          "created_by": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "description": "ID of the user who created the workspace group"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "enum": [
              "static",
              "dynamic",
              "entra_id"
            ],
            "description": "Type of workspace groups"
          },
          "filter": {
            "type": "string",
            "nullable": true,
            "description": "Filter string for dynamic workspace groups"
          },
          "location": {
            "$ref": "#/components/schemas/WorkspaceLocationV2",
            "nullable": true,
            "description": "Location information of the workspace group"
          },
          "entra_id_source": {
            "$ref": "#/components/schemas/WorkspaceGroupEntraIdSourceV2",
            "nullable": true,
            "description": "Entra ID source information for the workspace group"
          }
        },
        "required": [
          "id"
        ]
      },
      "WorkspaceListResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspacePublicV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "ReplaceDigitalActivityCoreProcessGroupCoreProcessesRequestV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "core_processes": {
            "type": "array",
            "description": "Complete collection of core processes that replaces the group's current state.",
            "items": {
              "$ref": "#/components/schemas/ReplaceDigitalActivityCoreProcessItemV2"
            }
          }
        },
        "required": [
          "core_processes"
        ],
        "description": "Full replacement body for the group's core processes."
      },
      "ReplaceDigitalActivityCoreProcessItemV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Functional name of the core process."
          },
          "process_name": {
            "type": "string",
            "description": "Process name of the operating system."
          }
        },
        "required": [
          "name",
          "process_name"
        ]
      },
      "GetCoreProcessGroupCoreProcessesResponseV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReplaceDigitalActivityCoreProcessItemV2"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "UpdateDigitalActivityCoreProcessGroupRequestV2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the core process group."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Description of the core process group."
          },
          "workspace_group_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the associated workspace group."
          }
        },
        "required": [
          "name",
          "description",
          "workspace_group_id"
        ],
        "description": "Full update body for the core process group."
      },
      "UpdateFlowV2Request": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Flow name. At least one language key is required; each value between 1 and 512 characters."
          },
          "description": {
            "$ref": "#/components/schemas/MultilangField",
            "description": "Flow description. At least one language key is required; each value between 1 and 512 characters."
          },
          "detection_only": {
            "type": "boolean"
          },
          "cooldown_minutes": {
            "type": "number",
            "minimum": 10,
            "maximum": 1440,
            "description": "Waiting time in minutes. Must be between 10 and 1440."
          },
          "enabled": {
            "type": "boolean",
            "description": "Indicates if the flow is enabled. PUT expects a complete definition; this field is required."
          },
          "init_text": {
            "$ref": "#/components/schemas/MultilangField",
            "nullable": true,
            "description": "Initial text message. Mandatory in PUT. Send null to clear; otherwise, an object with at least one language key; each value between 1 and 512 characters."
          },
          "ok_text": {
            "$ref": "#/components/schemas/MultilangField",
            "nullable": true,
            "description": "Success text message. Mandatory in PUT. Send null to clear; otherwise, object with at least one language key; each value between 1 and 512 characters."
          },
          "ko_text": {
            "$ref": "#/components/schemas/MultilangField",
            "nullable": true,
            "description": "Error text message. Mandatory in PUT. Send null to clear; otherwise, an object with at least one language key; each value between 1 and 512 characters."
          },
          "target": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "all_workspaces",
                  "workspaces",
                  "workspace_groups",
                  "reporting_groups"
                ]
              },
              "ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 512
                }
              }
            },
            "required": [
              "type"
            ]
          },
          "microservice_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowConditionInputV2"
            }
          }
        },
        "required": [
          "name",
          "description",
          "detection_only",
          "cooldown_minutes",
          "enabled",
          "init_text",
          "ok_text",
          "ko_text",
          "target",
          "microservice_id",
          "conditions"
        ]
      },
      "UpdateReportingGroupAgentVersionsRequestV2": {
        "type": "object",
        "properties": {
          "agent_auto_update": {
            "type": "boolean"
          },
          "versions": {
            "$ref": "#/components/schemas/ReportingGroupAgentVersionsV2"
          }
        },
        "required": [
          "agent_auto_update",
          "versions"
        ]
      },
      "UpdateReportingGroupRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 512,
            "description": "The reporting group name. Must be unique within the organization.",
            "example": "Grupo de reporte de producción actualizado"
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "description": "Optional. A description of the reporting group's purpose and usage.",
            "example": "Grupo de reporte actualizado para entornos de producción"
          },
          "patch_policy_target_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the patch policy target to be associated with this reporting group. Set it to null or omit it to remove the association.",
            "example": "507f1f77bcf86cd799439040"
          },
          "fishing_pattern": {
            "type": "string",
            "maxLength": 250,
            "description": "Optional. A regular expression pattern used to match devices. Must be a valid regex pattern. If provided, fishing_pattern_field must also be specified. Omit to remove the pattern.",
            "example": "Estaciones de trabajo Windows"
          },
          "fishing_pattern_field": {
            "type": "string",
            "enum": [
              "full_name",
              "description",
              "ou",
              "current_subnet"
            ],
            "description": "Optional. Field to which fishing_pattern is applied. Required if fishing_pattern is provided. Valid values: full_name (full device name), description (device description), ou (organizational unit), current_subnet (current subnet).",
            "example": "full_name"
          },
          "intermediate_device_1_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the Workspace of the first intermediate device. Intermediate devices are used for Wake-on-LAN actions in secure networks, allowing remote powering on of target devices through intermediate gateways. Intermediate devices must be sequentially defined without gaps. Omitting will clear all intermediate devices. If intermediate_device_2_id or intermediate_device_3_id is provided, this field is required.",
            "example": "507f1f77bcf86cd799439050"
          },
          "intermediate_device_2_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the Workspace of the second intermediate device. Used for Wake-on-LAN actions in secure networks. Requires intermediate_device_1_id to be provided. If omitted while intermediate_device_1_id is provided, this and intermediate_device_3_id will be cleared. If intermediate_device_3_id is provided, this field is required.",
            "example": "507f1f77bcf86cd799439051"
          },
          "intermediate_device_3_id": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the Workspace of the third intermediate device. Used for actions like Wake-on-LAN in secure networks. Requires both intermediate_device_1_id and intermediate_device_2_id to be provided. If omitted while intermediate_device_1_id and intermediate_device_2_id are provided, this field will be cleared.",
            "example": "507f1f77bcf86cd799439052"
          }
        },
        "required": [
          "name"
        ],
        "description": "Request body to update an existing reporting group. This endpoint implements complete replacement semantics: all updateable fields must be included. Optional fields omitted will be cleared (idempotent behavior). Intermediate devices are used for Wake-on-LAN actions in secure networks, allowing remote powering on of devices through intermediate gateways. Intermediate devices must be defined sequentially: you cannot define intermediate_device_2_id without intermediate_device_1_id, nor intermediate_device_3_id without intermediate_device_2_id. All intermediate device Workspace IDs must exist and belong to the organization."
      },
      "UpdateRoleRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "User role name."
          },
          "permissions": {
            "type": "array",
            "minItems": 1,
            "description": "Complete permission entries defining the final state of the role.",
            "items": {
              "$ref": "#/components/schemas/UpdateRolePermissionItemV2"
            }
          }
        },
        "required": [
          "name",
          "permissions"
        ]
      },
      "UpdateRolePermissionItemV2": {
        "type": "object",
        "properties": {
          "target_organization": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              },
              {
                "type": "string",
                "pattern": "^[0-9a-f]{24}$",
                "minLength": 24,
                "maxLength": 24
              }
            ],
            "description": "Permission organization scope. Use all for all organizations or a specific organization_id."
          },
          "portal_permission": {
            "type": "string",
            "enum": [
              "admin",
              "organization_admin",
              "organization_admin_read_only",
              "user",
              "platform",
              "l1_support_team",
              "l1_support_team_read_only",
              "l2_support_team",
              "l2_support_team_read_only",
              "l3_engineering_team",
              "l3_engineering_team_read_only",
              "billing"
            ],
            "description": "Portal permission level."
          },
          "workspaces_permission": {
            "type": "string",
            "enum": [
              "no_access",
              "l1_support_team_read_only",
              "l1_support_team",
              "l2_support_team_read_only",
              "l2_support_team",
              "l3_engineering_team_read_only",
              "l3_engineering_team",
              "admin_read_only",
              "admin"
            ],
            "description": "Workspace permission level."
          },
          "analyzer_permission": {
            "type": "string",
            "enum": [
              "no_access",
              "access",
              "admin"
            ],
            "description": "Analyzer permission level."
          },
          "target_reporting_groups": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              },
              {
                "type": "array",
                "minItems": 1,
                "items": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{24}$",
                  "minLength": 24,
                  "maxLength": 24
                }
              }
            ],
            "description": "Permission reporting groups scope. Use all for all groups or a list of reporting_group_id."
          }
        },
        "required": [
          "target_organization",
          "portal_permission",
          "workspaces_permission",
          "analyzer_permission",
          "target_reporting_groups"
        ]
      },
      "UpdateTenantRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 512
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateUserRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "User's name."
          },
          "surname": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "User's surname."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "User's email address."
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "User's department."
          },
          "role_id": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Identifier of the role assigned to the user."
          }
        },
        "required": [
          "name",
          "surname",
          "email",
          "department",
          "role_id"
        ]
      },
      "UpdateWorkspaceGroupScheduleRequestV2": {
        "type": "object",
        "properties": {
          "cron_expression": {
            "type": "string",
            "description": "Cron expression that defines when the schedule should be executed. Format: minute hour day-of-month month day-of-week. Examples: '0 8 * * 1-5' (8 AM weekdays), '0 0 * * 0' (midnight on Sunday), '30 14 * * *(2:30 PM daily). Day-of-week: 0=Sunday, 1=Monday, ..., 6=Saturday. Supports ranges (1-5), lists (1,3,5), and wildcards (*). Must be a valid cron expression format with 5 space-separated fields.",
            "example": "0 8 * * 1-5"
          },
          "time_zone": {
            "type": "string",
            "description": "Timezone for the execution of the schedule. Supports IANA identifiers (e.g., 'America/New_York') and Windows identifiers (e.g., 'Pacific Standard Time').",
            "example": "Eastern Standard Time"
          },
          "type": {
            "type": "string",
            "enum": [
              "start",
              "stop",
              "restart"
            ],
            "description": "Type of power operation to perform. START: Turns on the group's Workspaces. STOP: Turns off the group's Workspaces. RESTART: Restarts the group's Workspaces.",
            "example": "start"
          },
          "intermediate_device": {
            "type": "string",
            "maxLength": 24,
            "pattern": "^[0-9a-f]{24}$",
            "description": "Optional. The unique identifier of the Workspace intermediate device. If provided, indicates that an intermediate device should be used for Wake-on-LAN operations. Only applicable to START schedules. Used for secure network Wake-on-LAN actions. The Workspace must exist and belong to the organization. To remove an intermediate device, omit this field.",
            "example": "507f1f77bcf86cd799439050"
          }
        },
        "required": [
          "cron_expression",
          "time_zone",
          "type"
        ]
      },
      "WorkspaceGroupUpdateRequestV2": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 512
          },
          "description": {
            "type": "string",
            "maxLength": 512
          },
          "location": {
            "$ref": "#/components/schemas/WorkspaceGroupBaseUpdateLocationInputV2"
          }
        },
        "required": [
          "name",
          "description",
          "location"
        ]
      },
      "UpdateWorkspaceGroupWorkspacesResponseV2": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Confirmation message for update"
          },
          "total_in_group": {
            "type": "integer",
            "description": "Total Workspaces in the group after applying the update"
          }
        },
        "required": [
          "message",
          "total_in_group"
        ]
      },
      "WorkspacesUpdateRequestV2": {
        "type": "object",
        "properties": {
          "workspace_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 24,
              "pattern": "^[0-9a-f]{24}$"
            },
            "description": "Array of Workspace IDs"
          }
        },
        "required": [
          "workspace_ids"
        ]
      },
      "WorkspaceAgentVersionItemV2": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "discovered_at",
          "version"
        ],
        "properties": {
          "discovered_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date when the agent version was detected."
          },
          "version": {
            "type": "string",
            "description": "Agent version detected in the workspace."
          }
        }
      },
      "GetWorkspaceAgentVersionsResponseV2": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data",
          "has_next"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceAgentVersionItemV2"
            }
          },
          "has_next": {
            "type": "boolean",
            "description": "Indicates if more results exist on the next page."
          }
        }
      },
      "GetWorkspaceAlertsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "If another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspaceAlertItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspaceAlertItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Alert identifier."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Alert name."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Alert description."
          },
          "severity": {
            "type": "string",
            "enum": [
              "critical",
              "warning",
              "informational"
            ],
            "nullable": true,
            "description": "Alert severity in lowercase. It will be null when the source data is not valid."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Alert start timestamp."
          },
          "authorized_minutes": {
            "type": "number",
            "nullable": true,
            "description": "Authorized duration in minutes."
          },
          "notified_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Notification timestamp."
          },
          "information": {
            "type": "string",
            "nullable": true,
            "description": "Additional alert information."
          },
          "threshold_unit_name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the threshold unit."
          },
          "threshold_value": {
            "type": "number",
            "nullable": true,
            "description": "Threshold value."
          },
          "element": {
            "type": "string",
            "nullable": true,
            "description": "Affected element."
          },
          "category": {
            "type": "string",
            "nullable": true,
            "description": "Alert category."
          }
        },
        "required": [
          "id"
        ]
      },
      "GetWorkspaceDisksResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "If another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspaceDiskItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspaceDiskItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Disk record identifier."
          },
          "name": {
            "type": "string",
            "description": "Disk name."
          },
          "device_id": {
            "type": "string",
            "description": "Disk device identifier string."
          },
          "encrypted": {
            "type": "string",
            "enum": [
              "not_encrypted",
              "encrypted",
              "partially_encrypted",
              "na"
            ],
            "description": "Disk encryption status."
          },
          "encryption_method": {
            "type": "string",
            "description": "Encryption method label."
          },
          "location": {
            "type": "string",
            "description": "Disk location label."
          },
          "media_type": {
            "type": "string",
            "description": "Disk media type."
          },
          "os_drive": {
            "type": "boolean",
            "nullable": true,
            "description": "If the disk is marked as OS drive."
          },
          "partition": {
            "type": "string",
            "description": "Partition descriptor."
          },
          "physical_disk_size": {
            "type": "number",
            "description": "Physical disk size value."
          },
          "total_size": {
            "type": "number",
            "description": "Total disk size value."
          },
          "last_updated_at": {
            "type": "string",
            "description": "Date of last update to the disk record."
          },
          "used_size": {
            "type": "number",
            "description": "Used disk size value."
          },
          "volume_label": {
            "type": "string",
            "description": "Volume label."
          }
        },
        "required": [
          "id",
          "name",
          "device_id",
          "encrypted",
          "encryption_method",
          "location",
          "partition",
          "physical_disk_size",
          "total_size"
        ]
      },
      "GetWorkspaceInstalledAppsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspaceInstalledAppItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspaceInstalledAppItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Installed application identifier."
          },
          "product_name": {
            "type": "string",
            "description": "Installed application name."
          },
          "publisher": {
            "type": "string",
            "nullable": true,
            "description": "Installed application publisher."
          },
          "version": {
            "type": "string",
            "nullable": true,
            "description": "Installed application version."
          },
          "installed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Installation timestamp."
          },
          "install_location": {
            "type": "string",
            "nullable": true,
            "description": "Installation location."
          },
          "last_reported_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last report timestamp."
          }
        },
        "required": [
          "id",
          "product_name",
          "last_reported_at"
        ]
      },
      "GetWorkspaceOperationsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetOperationByIdResponseV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspacePatchesResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspacePatchItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspacePatchItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Patch record identifier."
          },
          "kb": {
            "type": "string",
            "description": "Patch KB code."
          },
          "title": {
            "type": "string",
            "description": "Patch title."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "installed"
            ],
            "description": "Patch status."
          },
          "product": {
            "type": "string",
            "description": "Product associated with the patch."
          },
          "severity": {
            "type": "string",
            "description": "Patch severity."
          },
          "arrived_at": {
            "type": "string",
            "description": "Patch arrival or publishing date."
          },
          "category": {
            "type": "string",
            "description": "Patch category."
          },
          "installed_at": {
            "type": "string",
            "nullable": true,
            "description": "Patch installation date."
          },
          "additional_information_url": {
            "type": "string",
            "description": "URL with additional patch information."
          }
        },
        "required": [
          "id",
          "kb",
          "title",
          "status",
          "product",
          "severity",
          "arrived_at",
          "category",
          "additional_information_url"
        ]
      },
      "GetWorkspacePnpErrorsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspacePnpErrorItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspacePnpErrorItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "PnP error record identifier."
          },
          "name": {
            "type": "string",
            "description": "Error name."
          },
          "status": {
            "type": "string",
            "description": "Error status."
          },
          "class": {
            "type": "string",
            "description": "Device class."
          },
          "device_id": {
            "type": "string",
            "description": "Device identifier."
          },
          "error_description": {
            "type": "string",
            "description": "Error description."
          },
          "error_code": {
            "type": "string",
            "description": "Error code."
          },
          "properties": {
            "type": "string",
            "description": "Additional properties."
          },
          "last_updated_at": {
            "type": "string",
            "description": "Last update date."
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "class",
          "device_id",
          "error_description",
          "error_code",
          "properties",
          "last_updated_at"
        ]
      },
      "GetWorkspacePnpEventsResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspacePnpEventItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspacePnpEventItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Event identifier."
          },
          "action": {
            "type": "string",
            "description": "Action label."
          },
          "created_at": {
            "type": "string",
            "description": "Event date string."
          },
          "user_name": {
            "type": "string",
            "description": "User associated with the event."
          },
          "caption": {
            "type": "string",
            "description": "Event caption."
          },
          "device_id": {
            "type": "string",
            "description": "Device identifier associated with the event."
          }
        },
        "required": [
          "id",
          "action",
          "created_at",
          "user_name",
          "caption",
          "device_id"
        ]
      },
      "GetWorkspaceServicesResponseV2": {
        "type": "object",
        "properties": {
          "has_next": {
            "type": "boolean",
            "description": "Indicates if another page is available."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetWorkspaceServiceItemV2"
            }
          }
        },
        "required": [
          "has_next",
          "data"
        ]
      },
      "GetWorkspaceServiceItemV2": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Service identifier."
          },
          "name": {
            "type": "string",
            "description": "Service name."
          },
          "description": {
            "type": "string",
            "description": "Service description."
          },
          "status": {
            "type": "string",
            "description": "Service status."
          },
          "accept_stop": {
            "type": "boolean",
            "nullable": true,
            "description": "Indicates if the service accepts stop requests."
          },
          "display_name": {
            "type": "string",
            "description": "Service display name."
          },
          "log_on_as": {
            "type": "string",
            "description": "Account used to run the service."
          },
          "path": {
            "type": "string",
            "description": "Service executable path."
          },
          "organization_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Organization identifier associated with the service."
          },
          "reporting_group_id": {
            "type": "string",
            "description": "Reporting Group identifier associated with the service."
          },
          "startup_type": {
            "type": "string",
            "description": "Service startup type."
          },
          "last_updated_at": {
            "type": "string",
            "description": "Last update timestamp string."
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{24}$",
            "minLength": 24,
            "maxLength": 24,
            "description": "Workspace identifier associated with the service."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "status",
          "display_name",
          "log_on_as",
          "path",
          "organization_id",
          "reporting_group_id",
          "startup_type",
          "last_updated_at",
          "workspace_id"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Too Many Requests",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
