{
    "swagger": "2.0",
    "info": {
        "description": "# API Testing Instructions\n\nYou have two options to test the APIs:\n\n1. **Using the Swagger UI**  \n   If you are already logged in to your project and accessing this page via  \n   `\u003cproject_domain\u003e/swagger/index.html`, you can directly call the API endpoints  \n   without providing API keys. Authentication is handled automatically using  \n   cookies stored in your browser.\n\n2. **Using an External Tool**  \n   If you are using an external tool, update the BaseURL to include the  \n   `serverURL` followed by the `/api/v1` path. Authenticate your requests using  \n   the Access Token generated from the [API Keys](https://app.middleware.io/settings/api-keys) section in the application  \n   settings.\n\n   _Note: Do not use the project API key that is used for agent installation._\n",
        "title": "Middleware API",
        "contact": {
            "name": "Technical Support",
            "email": "support@middleware.io"
        },
        "version": "1.0"
    },
    "basePath": "/api/v1",
    "paths": {
        "/agent/client-token/{token}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API deletes a specific client token by its value.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Delete a client token",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Client token value",
                        "name": "token",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Status of token deletion",
                        "schema": {
                            "$ref": "#/definitions/agent.DeleteResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Token not found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/client-tokens": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API retrieves a list of all client tokens created under the current account/project.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "List all client tokens",
                "responses": {
                    "202": {
                        "description": "List of client tokens",
                        "schema": {
                            "$ref": "#/definitions/agent.ListResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/generate-client-token": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API creates a new client token for browser or SDK integration based on the provided configuration.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Generate new client token",
                "parameters": [
                    {
                        "description": "Client token generation request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/bifrostapp_internal_endpoints_agent.SaveRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Generated client token details",
                        "schema": {
                            "$ref": "#/definitions/agent.GenerateTokenResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/generate-token": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Creates and returns a new token for an agent. The token can be used by the agent for authentication.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Generate new agent token",
                "parameters": [
                    {
                        "description": "Token creation payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/bifrostapp_internal_store_agent.SaveRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Generated token details",
                        "schema": {
                            "$ref": "#/definitions/agent.GenerateTokenResponse"
                        }
                    }
                }
            }
        },
        "/agent/hosts": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API retrieves a paginated list of registered agent hosts. Optionally, it can include Kubernetes cluster hosts if specified.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get list of agent hosts",
                "parameters": [
                    {
                        "type": "boolean",
                        "description": "Include Kubernetes cluster hosts (true/false)",
                        "name": "shouldGetK8sClusters",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter hosts by name",
                        "name": "searchQuery",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Page number for pagination",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Number of records per page",
                        "name": "recordsPerPage",
                        "in": "query"
                    }
                ],
                "responses": {
                    "202": {
                        "description": "List of hosts with pagination info",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/ingestion-rules/{token}": {
            "get": {
                "description": "This API returns ingestion rules and configurations based on the provided agent token.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Get ingestion rules configuration for an agent",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Agent Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Configuration file name (optional, e.g., daemonset, deployment)",
                        "name": "config",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Uses for Agent Side config call (optional, e.g., daemonset, deployment)",
                        "name": "component_type",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Agent version",
                        "name": "agent_version",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Platform (e.g., k8s, windows, linux, darwin)",
                        "name": "platform",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Infrastructure platform (e.g., aws, azure, gcp)",
                        "name": "infra_platform",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "host_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Comma-separated host tags (e.g., env:prod,region:us-east-1)",
                        "name": "host_tags",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "description": "Enable Datadog receiver (true/false)",
                        "name": "enable_datadog_receiver",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns ingestion rules configuration",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Invalid or expired token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/name/{name}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API fetches the client token details for a specific application name within the authenticated context.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get client token by application name",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Application name",
                        "name": "name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Client token details for the given app name",
                        "schema": {
                            "$ref": "#/definitions/agent.ClientTokenDetailResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Application not found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/public/setting/config-groups/{token}/{groupName}": {
            "put": {
                "description": "Using a valid agent token, this API assigns the provided agents (hosts or k8s) to the specified default configuration group and automatically attaches them to the corresponding default ingestion pipeline (default-host or default-k8s).",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Assign agents to default config group and pipeline using token",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Agent Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Default configuration group name",
                        "name": "groupName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Agent type (host or k8s). Defaults to host",
                        "name": "agent_type",
                        "in": "query"
                    },
                    {
                        "description": "List of agent/host IDs to assign",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Agents successfully assigned to config group and pipeline",
                        "schema": {
                            "type": "object"
                        }
                    },
                    "400": {
                        "description": "Invalid input or assignment failed",
                        "schema": {
                            "type": "object"
                        }
                    },
                    "401": {
                        "description": "Invalid or unauthorized token",
                        "schema": {
                            "type": "object"
                        }
                    }
                }
            }
        },
        "/agent/public/setting/{token}/{hostId}": {
            "get": {
                "description": "This API fetches the current configuration and settings for the specified host. It supports both host-level and Kubernetes ingestion control configurations.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Get agent configuration for a host",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Agent Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "hostId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Host configuration and ingestion control settings",
                        "schema": {
                            "$ref": "#/definitions/agent.AgentSettingModels"
                        }
                    },
                    "401": {
                        "description": "Invalid or expired token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            },
            "post": {
                "description": "This API allows agents to update their configuration and metadata at the host level. The configuration must be sent as base64-encoded JSON in the `value` field.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Update agent configuration for a host",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Agent Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "hostId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Request body containing base64-encoded config and metadata",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success: returns updated agent setting",
                        "schema": {
                            "$ref": "#/definitions/agent.AgentSettingModels"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/restart-status/{token}": {
            "get": {
                "description": "This API provides the restart status for a given agent host or Kubernetes components. It also resets the restart indicators once fetched.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Get agent restart or rollout status",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Agent Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Platform type (e.g., k8s, linux)",
                        "name": "platform",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "host_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Restart and rollout status for the given host",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Invalid or expired token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/config-groups": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API returns a paginated list of all agent configuration groups along with optional host IDs associated with each group.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get all configuration groups",
                "parameters": [
                    {
                        "type": "boolean",
                        "description": "Include host IDs for each configuration group (true/false)",
                        "name": "fetchHostIds",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Agent type (e.g., host, k8s)",
                        "name": "agent_type",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Search query to filter groups",
                        "name": "searchQuery",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Page number for pagination (default: 1)",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Number of records per page (default: 10)",
                        "name": "recordsPerPage",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of configuration groups",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "additionalProperties": true
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid agent type or bad request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/config-groups/{groupName}": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API associates one or more hosts with a given configuration group (also known as a config class).",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Assign configuration group to hosts",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Configuration group name",
                        "name": "groupName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Agent type (e.g., host, k8s)",
                        "name": "agent_type",
                        "in": "query"
                    },
                    {
                        "description": "Request body containing an array of host IDs",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated host configuration details",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/agent.AgentSettingModels"
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request body or agent type",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API creates a new configuration group or updates an existing one with provided settings and associated hosts.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Create or update configuration group",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Group name",
                        "name": "groupName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Configuration group data (Base64-encoded value and host IDs)",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "object"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Saved configuration group details",
                        "schema": {
                            "$ref": "#/definitions/agent.SaveHostResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request body or agent type",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API deletes a specific configuration group. The default group cannot be deleted.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Delete configuration group",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Configuration group name",
                        "name": "groupName",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Agent type (e.g., host, k8s)",
                        "name": "agent_type",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Deletion status message",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/config-groups/{g}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API retrieves the configuration settings and associated host IDs for a given configuration group name or ID.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get configuration group by name or ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Group name or ID",
                        "name": "g",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Agent type (e.g., host, k8s)",
                        "name": "agent_type",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Configuration settings for the given group",
                        "schema": {
                            "$ref": "#/definitions/agent.SaveHostResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/db/hosts/{configKey}/{isKubeAgent}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns filtered agent host settings based on `configKey` and `isKubeAgent` parameters.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get all host settings from database",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Configuration key (e.g. oracledb_config)",
                        "name": "configKey",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Set to false for non-K8s settings",
                        "name": "isKubeAgent",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Filtered host settings",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "object",
                                "additionalProperties": true
                            }
                        }
                    }
                }
            }
        },
        "/agent/setting/rm/{platform}/{configKey}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API removes a given configuration key under a specific platform (e.g., linux, k8s) from all host settings and marks them for restart.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Remove specific agent configuration from all hosts",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Platform name (e.g., linux, k8s)",
                        "name": "platform",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Configuration key to remove",
                        "name": "configKey",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Status of configuration removal across hosts",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/validate-regex": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Validates whether a provided regex expression matches the provided text input.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Validate a regex against input text",
                "parameters": [
                    {
                        "description": "Regex validation payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/agent.ValidateRegexRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Validation result",
                        "schema": {
                            "$ref": "#/definitions/agent.ValidateRegexResponse"
                        }
                    }
                }
            }
        },
        "/agent/setting/validate-regexes": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API validates one or more regex patterns against provided test values to check if they match as expected.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Validate regular expressions",
                "parameters": [
                    {
                        "description": "Regex validation request containing patterns and test values",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/agent.ValidateRegexesRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Validation result for each regex pattern",
                        "schema": {
                            "$ref": "#/definitions/agent.ValidateRegexesResponse"
                        }
                    },
                    "400": {
                        "description": "Invalid request body or missing fields",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/{hostId}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API fetches the current configuration and settings for a specified host. It also applies ingestion control schema transformations for Kubernetes agents.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get agent configuration for a specific host",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "hostId",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Agent configuration settings for the given host",
                        "schema": {
                            "$ref": "#/definitions/agent.AgentSettingModels"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/{hostId}/detected-integrations": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Returns infrastructure integrations (Redis, MySQL, Kafka, etc.) detected by the agent on the host, with rich metadata including ports, service type, and instances.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get auto-detected integrations for a host",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "hostId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Platform type (linux, darwin, windows). Defaults to linux.",
                        "name": "platform",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Detected integrations with metadata",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/setting/{hostId}/integrations": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API returns a list of enabled integrations for a given host_id by checking the agent configuration.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get enabled integrations for a specific host/cluster",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unique Host Identifier",
                        "name": "hostId",
                        "in": "path"
                    },
                    {
                        "type": "string",
                        "description": "Platform type (k8s, linux, windows, darwin). If not provided, auto-detected.",
                        "name": "platform",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of enabled integrations",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/token/{token}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API retrieves details of a specific client token using its token value.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Get client token by value",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Client token value",
                        "name": "token",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "202": {
                        "description": "Client token details",
                        "schema": {
                            "$ref": "#/definitions/agent.ClientTokenDetailResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Token not found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/agent/tracking/{token}": {
            "post": {
                "description": "Used by Middleware agents (Host or APM) to report installation, uninstallation, or error tracking information.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Track APM or Host agent installation and status updates",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unique agent token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tracking request body",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.TrackingRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns success status and message",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Invalid JSON or missing required fields",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/agent/update-agent-token": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Updates an existing agent token or marks it as deleted/default based on the provided request.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Update existing agent token",
                "parameters": [
                    {
                        "description": "Token update payload",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/bifrostapp_internal_store_agent.UpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Update response",
                        "schema": {
                            "$ref": "#/definitions/agent.AgentConfigModels"
                        }
                    }
                }
            }
        },
        "/agent/update-client-token": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "This API updates an existing client token’s configuration such as origin, app name, or instrumentation options.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT PRIVATE ROUTES"
                ],
                "summary": "Update existing client token",
                "parameters": [
                    {
                        "description": "Client token update request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/bifrostapp_internal_endpoints_agent.UpdateRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Updated client token details",
                        "schema": {
                            "$ref": "#/definitions/agent.UpdateResponse"
                        }
                    },
                    "401": {
                        "description": "Unauthorized or invalid token",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/apm/tracking/{token}": {
            "post": {
                "description": "Used by Middleware agents (Host or APM) to report installation, uninstallation, or error tracking information.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AGENT"
                ],
                "summary": "Track APM or Host agent installation and status updates",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Unique agent token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Tracking request body",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/handlers.TrackingRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Returns success status and message",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Invalid JSON or missing required fields",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "500": {
                        "description": "Internal server error",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/builder/metrics-v2": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Get a list of metrics, filters, or groupby tags.",
                "parameters": [
                    {
                        "description": "Provide the below list of parameters.",
                        "name": "payload",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/MetricsV2Payload"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/MetricsV2Response"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/report": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "If the report key is provided, the data of only that report will be returned.",
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Get a list of dashboards (i.e. reports).",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Number of items per page",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sorting instructions in JSON array format. Each item should include the column name, sorting order (asc/desc), and priority (where lower number = higher priority). Example: [{\\",
                        "name": "sort",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Search for reports by name or description",
                        "name": "search",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter reports by a comma-separated list of values. Valid values: custom, created_by_you, favorite, frequently_viewed, or a data source name like aws, mysql, etc.",
                        "name": "filterBy",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter reports by a comma-separated list of display scopes.",
                        "name": "display_scope",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ReportListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "If the report id has been provided, the report will be updated. Otherwise, a new report will be created.",
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Create or update a dashboard.",
                "parameters": [
                    {
                        "description": "The dashboard to create or update.",
                        "name": "report",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/UpsertReportRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/BuilderReport"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/report/clone": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Clone a report.",
                "parameters": [
                    {
                        "description": "The report to clone.",
                        "name": "report",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/UpsertReportRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/BuilderReport"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/report/favourite/{reportId}/{favourite}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Mark a report as favourite or unfavourite.",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "The ID of the report to mark as favourite",
                        "name": "reportId",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "Whether to mark the report as favourite or unfavourite",
                        "name": "favourite",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/report/{id}": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "If the report id has been provided, the report will be updated. Otherwise, a new report will be created.",
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Create or update a dashboard.",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "The ID of the dashboard to be updated",
                        "name": "id",
                        "in": "path"
                    },
                    {
                        "description": "The dashboard to create or update.",
                        "name": "report",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/UpsertReportRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/BuilderReport"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Delete a dashboard.",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "The ID of the dashboard to delete",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/report/{reportKey}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "If the report key is provided, the data of only that report will be returned.",
                "tags": [
                    "DASHBOARDS"
                ],
                "summary": "Get a list of dashboards (i.e. reports).",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Number of items per page",
                        "name": "limit",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "Offset",
                        "name": "offset",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Sorting instructions in JSON array format. Each item should include the column name, sorting order (asc/desc), and priority (where lower number = higher priority). Example: [{\\",
                        "name": "sort",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Search for reports by name or description",
                        "name": "search",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter reports by a comma-separated list of values. Valid values: custom, created_by_you, favorite, frequently_viewed, or a data source name like aws, mysql, etc.",
                        "name": "filterBy",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter reports by a comma-separated list of display scopes.",
                        "name": "display_scope",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Filter reports by report key",
                        "name": "reportKey",
                        "in": "path"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/ReportListResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/resources": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Get a list of resources.",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/sampling": {
            "get": {
                "description": "Reports how much of the stored data a query over the given range would read, so the\ntime picker can show whether the screen is built from a sample. The measurement is\nthe one the widget path uses and shares its cache, so it costs nothing on the common path.",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Builder"
                ],
                "summary": "Query-side sampling for a time range",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Range start, Unix milliseconds",
                        "name": "fromTs",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "description": "Range end, Unix milliseconds",
                        "name": "toTs",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "log, trace or trace.rum",
                        "name": "resource",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/helpers.SamplingPreview"
                        }
                    }
                }
            }
        },
        "/builder/widget": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "description": "Either report_id or display_scope is required.",
                "tags": [
                    "BUILDER"
                ],
                "summary": "Get a list of widgets.",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Report ID",
                        "name": "report_id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Display Scope",
                        "name": "display_scope",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Widget"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Create or update a widget.",
                "parameters": [
                    {
                        "description": "The widget to create or update.",
                        "name": "widget",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CustomWidget"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Widget"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "409": {
                        "description": "Conflict",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/widget/data": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Get the data for the given widget.",
                "parameters": [
                    {
                        "description": "The widget for which the data is to be fetched.",
                        "name": "widget",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CustomWidget"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/BuilderDataResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/widget/multi-data": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Get the data for the given list of widgets.",
                "parameters": [
                    {
                        "description": "The list of widgets for which the data is to be fetched.",
                        "name": "widgets",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/CustomWidget"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/BuilderDataResponse"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/widget/scope/layouts": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Update the layouts for the given scope i.e. the widget.",
                "parameters": [
                    {
                        "description": "The list of layouts of widgets.",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/LayoutRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/builder/widget/{builder_id}": {
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "tags": [
                    "BUILDER"
                ],
                "summary": "Delete a widget.",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "The ID of the widget to delete.",
                        "name": "builder_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/ErrorDetails"
                        }
                    }
                }
            }
        },
        "/rules/{rule_id}/alerts": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ALERTS"
                ],
                "summary": "Get Alerts By Rule Id",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "rule_id",
                        "name": "rule_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "default": 0,
                        "description": "page",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "default": "created_at",
                        "description": "order_by",
                        "name": "order_by",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/AlertsResponse"
                        }
                    },
                    "400": {
                        "description": "Error Response",
                        "schema": {
                            "$ref": "#/definitions/ErrorResponse"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ALERTS"
                ],
                "summary": "Create Alerts By Rule Id",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "Rule Id",
                        "name": "rule_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "NewAlert",
                        "name": "alert",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/NewAlert"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/Alert"
                        }
                    },
                    "400": {
                        "description": "Error While Create Alert",
                        "schema": {
                            "$ref": "#/definitions/ErrorResponse"
                        }
                    }
                }
            }
        },
        "/rules/{rule_id}/alerts/stats": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ALERTS"
                ],
                "summary": "Get Stats By Rule Id",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "rule_id",
                        "name": "rule_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/StatsResponse"
                        }
                    },
                    "400": {
                        "description": "Error Response",
                        "schema": {
                            "$ref": "#/definitions/ErrorResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "Alert": {
            "type": "object",
            "properties": {
                "attributesb": {
                    "type": "object"
                },
                "created_at": {
                    "type": "string"
                },
                "executor_id": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "message": {
                    "type": "string"
                },
                "operator": {
                    "type": "string"
                },
                "project_uid": {
                    "type": "string"
                },
                "rule_id": {
                    "type": "integer"
                },
                "status": {
                    "type": "integer"
                },
                "threshold": {
                    "type": "number"
                },
                "title": {
                    "type": "string"
                },
                "total_count": {
                    "type": "integer"
                },
                "triggered_at": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "value": {
                    "type": "number"
                }
            }
        },
        "AlertsResponse": {
            "type": "object",
            "properties": {
                "alerts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/ViewModelAlert"
                    }
                },
                "columns": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Column"
                    }
                },
                "latest_status": {
                    "type": "integer"
                },
                "latest_triggered_at": {
                    "type": "string"
                }
            }
        },
        "BuilderDataResponse": {
            "description": "BuilderDataResponse is the response structure for the /data and /multi-data endpoints.",
            "type": "object",
            "properties": {
                "chart_data": {
                    "description": "ChartData contains the data for the given widget. The structure of the data depends on the chart type."
                },
                "chart_data_v2": {
                    "description": "ChartDataV2 contains the data for the given widget in v2 format, which is optimized for the frontend to contain the data in the format of the UI library itself."
                },
                "error": {
                    "type": "string"
                },
                "error_desc": {
                    "type": "string"
                },
                "key": {
                    "type": "string"
                },
                "not_available_metrics": {
                    "description": "NotAvailableMetrics contains list of metrics that are not available in the rpMap",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "query_data": {
                    "description": "QueryData contains either the data from the ChartData or ChartDataV2 based on the useV2 flag used in the request.\nThe other fields will be deprecated after v2 is fully deployed."
                },
                "time_range": {
                    "$ref": "#/definitions/builder.TimeRange"
                }
            }
        },
        "BuilderReport": {
            "type": "object",
            "required": [
                "account_id",
                "id",
                "key",
                "label",
                "user_id",
                "visibility"
            ],
            "properties": {
                "account_id": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "display_scope": {
                    "type": "string"
                },
                "favorite": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "meta_data": {
                    "type": "object"
                },
                "project_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                },
                "user": {
                    "type": "object",
                    "properties": {
                        "name": {
                            "type": "string"
                        }
                    }
                },
                "user_id": {
                    "type": "integer"
                },
                "view_count": {
                    "type": "integer"
                },
                "visibility": {
                    "type": "string"
                }
            }
        },
        "BuilderViewOptions": {
            "description": "BuilderViewOptions represents the entities with which the widget is associated.",
            "type": "object",
            "properties": {
                "displayScope": {
                    "type": "string"
                },
                "report": {
                    "$ref": "#/definitions/Report"
                },
                "resource": {
                    "$ref": "#/definitions/Resource"
                }
            }
        },
        "Column": {
            "type": "object",
            "properties": {
                "key": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                }
            }
        },
        "CountBy": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "timestamp": {
                    "type": "string"
                },
                "value": {
                    "type": "number"
                }
            }
        },
        "CustomWidget": {
            "description": "CustomWidget represents the widget configuration in the UI. This is the format in which the data for widget is being requested and processed in the backend.",
            "type": "object",
            "properties": {
                "builderConfig": {},
                "builderId": {
                    "type": "integer"
                },
                "builderMetaData": {
                    "$ref": "#/definitions/WidgetMetaData"
                },
                "builderViewOptions": {
                    "$ref": "#/definitions/BuilderViewOptions"
                },
                "description": {
                    "type": "string"
                },
                "keepOldData": {
                    "description": "KeepOldData note: do not use KeepOldData as this is deprecated, this will be only used in ai module till the changes are made.",
                    "type": "boolean"
                },
                "key": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "layout": {
                    "$ref": "#/definitions/LayoutItem"
                },
                "params": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/RequestParam"
                    }
                },
                "returnOnlyFormulaResult": {
                    "description": "Specifically for alerts module, where only the result of the formula needs to be returned",
                    "type": "boolean"
                },
                "scopeId": {
                    "type": "integer"
                },
                "useV2": {
                    "description": "UseV2 indicates if the request should return result in v2 format",
                    "type": "boolean"
                },
                "widgetAppId": {
                    "type": "integer"
                }
            }
        },
        "ErrorDetails": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                },
                "success": {
                    "type": "boolean"
                }
            }
        },
        "ErrorResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "error statement"
                },
                "success": {
                    "type": "boolean",
                    "example": false
                }
            }
        },
        "KpiType": {
            "type": "integer",
            "enum": [
                1,
                2,
                3
            ],
            "x-enum-varnames": [
                "Metric",
                "Log",
                "Trace"
            ]
        },
        "LayoutItem": {
            "description": "LayoutItem represents the layout of the widget in the dashboard view.",
            "type": "object",
            "properties": {
                "_scope_id": {
                    "type": "integer"
                },
                "h": {
                    "type": "integer"
                },
                "resizeHandles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "w": {
                    "type": "integer"
                },
                "x": {
                    "type": "integer"
                },
                "y": {
                    "type": "integer"
                }
            }
        },
        "LayoutRequest": {
            "type": "object",
            "properties": {
                "layouts": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/LayoutItem"
                    }
                }
            }
        },
        "MetricsV2Payload": {
            "type": "object"
        },
        "MetricsV2Response": {
            "description": "MetricsV2Response is the structure of the response body for the MetricsV2 API.",
            "type": "object",
            "properties": {
                "items": {
                    "description": "Items is the list of items representing either metrics, filters, or groupby tags.",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": {}
                    }
                },
                "limit": {
                    "description": "Limit is the number of items per page.",
                    "type": "integer"
                },
                "page": {
                    "description": "Page is the page number of the data.",
                    "type": "integer"
                }
            }
        },
        "NewAlert": {
            "type": "object",
            "properties": {
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "created_at": {
                    "type": "string"
                },
                "executor_id": {
                    "type": "integer"
                },
                "message": {
                    "type": "string"
                },
                "operator": {
                    "type": "string"
                },
                "project_uid": {
                    "type": "string"
                },
                "rule_id": {
                    "type": "integer"
                },
                "status": {
                    "type": "integer"
                },
                "threshold": {
                    "type": "number"
                },
                "title": {
                    "type": "string"
                },
                "triggered_at": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "value": {
                    "type": "number"
                }
            }
        },
        "Report": {
            "description": "ReportView represents the report or dashboard with which the widget is associated.",
            "type": "object",
            "properties": {
                "metadata": {
                    "type": "object"
                },
                "reportDescription": {
                    "type": "string"
                },
                "reportId": {
                    "type": "integer"
                },
                "reportKey": {
                    "type": "string"
                },
                "reportName": {
                    "type": "string"
                }
            }
        },
        "ReportListResponse": {
            "type": "object",
            "properties": {
                "limit": {
                    "type": "integer"
                },
                "offset": {
                    "type": "integer"
                },
                "reports": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/BuilderReport"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "RequestParam": {
            "description": "RequestParam contains the metadata or config of the request to load data for the widget. It contains key and value pair. For example, time range, debug config, etc.",
            "type": "object",
            "properties": {
                "key": {
                    "type": "string"
                },
                "value": {}
            }
        },
        "Resource": {
            "description": "Resource represents the resource of the widget with which it is associated.",
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "StatsResponse": {
            "type": "object",
            "properties": {
                "count_by_status": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/CountBy"
                    }
                },
                "count_by_title": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/CountBy"
                    }
                },
                "timeseries_by_title": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/CountBy"
                    }
                }
            }
        },
        "TextChartConfig": {
            "description": "TextChartConfig holds the markdown content and display settings (font size, color, alignment) for a text chart widget.",
            "type": "object",
            "properties": {
                "alignment": {
                    "type": "string"
                },
                "color": {
                    "type": "string"
                },
                "fontSize": {
                    "type": "integer"
                },
                "markdown": {
                    "type": "string"
                }
            }
        },
        "UpsertReportRequest": {
            "type": "object",
            "required": [
                "label",
                "visibility"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "display_scope": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "type": "string"
                },
                "label": {
                    "type": "string",
                    "minLength": 3
                },
                "metaData": {
                    "type": "object",
                    "additionalProperties": true
                },
                "visibility": {
                    "type": "string",
                    "minLength": 1
                }
            }
        },
        "ValidationErrorResponse": {
            "type": "object",
            "properties": {
                "breakpoint": {
                    "type": "string",
                    "example": "cannot bind new alert json"
                },
                "code": {
                    "type": "string",
                    "example": "ValidationError"
                },
                "message": {
                    "type": "string",
                    "example": "error msg"
                }
            }
        },
        "ViewModelAlert": {
            "type": "object",
            "properties": {
                "attributes": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "executor_id": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "message": {
                    "type": "string"
                },
                "operator": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "threshold": {
                    "type": "number"
                },
                "title": {
                    "type": "string"
                },
                "total_count": {
                    "type": "integer"
                },
                "triggered_at": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                },
                "value": {
                    "type": "number"
                }
            }
        },
        "Widget": {
            "description": "Widget represents a component of a dashboard in the UI. It is the smallest unit of a dashboard. It contains the configuration like queries, layout, metadata, etc to create a chart and load data into it. This is the format in which the widget is stored in the database.",
            "type": "object",
            "properties": {
                "account_id": {
                    "type": "integer"
                },
                "config": {
                    "type": "object"
                },
                "created_at": {
                    "type": "string"
                },
                "dataset_id": {
                    "description": "deprecated: need to remove",
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "key": {
                    "type": "string"
                },
                "label": {
                    "type": "string"
                },
                "meta_data": {
                    "type": "object"
                },
                "project_id": {
                    "type": "integer"
                },
                "scope": {
                    "$ref": "#/definitions/WidgetScope"
                },
                "status": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                },
                "user_id": {
                    "type": "integer"
                },
                "visibility": {
                    "$ref": "#/definitions/WidgetVisibility"
                },
                "widget_app_id": {
                    "type": "integer"
                }
            }
        },
        "WidgetMetaData": {
            "description": "WidgetMetaData contains the metadata of the widget. It contains the details like chart type, group name, chart configuration, color scheme, etc.",
            "type": "object",
            "properties": {
                "chartType": {
                    "type": "string"
                },
                "colorScheme": {
                    "type": "string"
                },
                "default_key": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "display_preference": {
                    "type": "string"
                },
                "expanedLegendColumns": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "group_name": {
                    "type": "string"
                },
                "group_order": {
                    "type": "integer"
                },
                "is_default": {
                    "type": "boolean"
                },
                "legendType": {
                    "type": "string"
                },
                "lineStroke": {
                    "type": "string"
                },
                "lineStyle": {
                    "type": "string"
                },
                "pieChartComparisonType": {
                    "$ref": "#/definitions/common.PieChartOptionsType"
                },
                "textChart": {
                    "$ref": "#/definitions/TextChartConfig"
                },
                "yAxisAlwaysIncludeZero": {
                    "type": "boolean"
                },
                "yAxisMax": {
                    "type": "integer"
                },
                "yAxisMin": {
                    "type": "integer"
                },
                "yAxisType": {
                    "type": "string"
                }
            }
        },
        "WidgetScope": {
            "description": "WidgetScope contains the details of widget with which it is associated and other details. It could be a report (custom dashboard) or scoped-dashboard (static screens).",
            "type": "object",
            "properties": {
                "builder_id": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "display_scope": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "meta_data": {
                    "type": "object"
                },
                "order_id": {
                    "type": "integer"
                },
                "project_id": {
                    "type": "integer"
                },
                "report_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "WidgetVisibility": {
            "description": "Visibility of the widget, public or private.",
            "type": "string",
            "enum": [
                "public",
                "private"
            ],
            "x-enum-varnames": [
                "WidgetBuilderVisibilityPublic",
                "WidgetBuilderVisibilityPrivate"
            ]
        },
        "agent.AgentConfigModels": {
            "type": "object",
            "properties": {
                "account_id": {
                    "type": "integer"
                },
                "created_at": {
                    "type": "string"
                },
                "created_by": {
                    "type": "integer"
                },
                "deleted": {
                    "type": "boolean"
                },
                "id": {
                    "type": "integer"
                },
                "is_default": {
                    "type": "boolean"
                },
                "key": {
                    "type": "string"
                },
                "meta_data": {
                    "type": "object"
                },
                "project_id": {
                    "type": "integer"
                },
                "token": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "agent.AgentSettingModels": {
            "type": "object",
            "properties": {
                "account_id": {
                    "type": "integer"
                },
                "config": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "config_null": {
                    "type": "object"
                },
                "created_at": {
                    "type": "string"
                },
                "group_id": {
                    "$ref": "#/definitions/sql.NullInt64"
                },
                "host_id": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "meta_data": {
                    "type": "object",
                    "additionalProperties": true
                },
                "meta_data_null": {
                    "type": "object"
                },
                "project_id": {
                    "type": "integer"
                },
                "token": {
                    "type": "string"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "agent.AgentType": {
            "type": "string",
            "enum": [
                "host",
                "k8s",
                "serverless"
            ],
            "x-enum-varnames": [
                "AgentTypeHost",
                "AgentTypeK8s",
                "AgentTypeServerless"
            ]
        },
        "agent.ClientTokenDetailResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/agent.AgentConfigModels"
                },
                "error": {
                    "type": "string"
                },
                "status": {
                    "type": "boolean"
                }
            }
        },
        "agent.DeleteResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "status": {
                    "type": "boolean"
                }
            }
        },
        "agent.GenerateTokenResponse": {
            "type": "object",
            "properties": {
                "agentConfig": {
                    "$ref": "#/definitions/agent.AgentConfigModels"
                },
                "success": {
                    "type": "boolean"
                }
            }
        },
        "agent.ListResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/agent.AgentConfigModels"
                    }
                },
                "status": {
                    "type": "boolean"
                }
            }
        },
        "agent.RecordingOptions": {
            "type": "object",
            "properties": {
                "maskAllInputs": {
                    "type": "boolean"
                },
                "maskInputSelectors": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "maskSensitiveInputs": {
                    "type": "boolean"
                },
                "maskTextClass": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "agent.SaveHostResponse": {
            "type": "object",
            "properties": {
                "account_id": {
                    "type": "integer"
                },
                "agent_type": {
                    "$ref": "#/definitions/agent.AgentType"
                },
                "config": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "object",
                        "additionalProperties": true
                    }
                },
                "config_null": {
                    "type": "object"
                },
                "created_at": {
                    "type": "string"
                },
                "hostIds": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "id": {
                    "type": "integer"
                },
                "meta_data": {
                    "type": "object",
                    "additionalProperties": true
                },
                "meta_data_null": {
                    "type": "object"
                },
                "name": {
                    "type": "string"
                },
                "project_id": {
                    "type": "integer"
                },
                "updated_at": {
                    "type": "string"
                }
            }
        },
        "agent.UpdateResponse": {
            "type": "object",
            "properties": {
                "Success": {
                    "type": "boolean"
                },
                "data": {
                    "$ref": "#/definitions/agent.AgentConfigModels"
                },
                "error": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                }
            }
        },
        "agent.ValidateRegexRequest": {
            "type": "object",
            "required": [
                "regex",
                "value"
            ],
            "properties": {
                "regex": {
                    "type": "string"
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "multiline",
                        "single"
                    ]
                },
                "value": {
                    "type": "string"
                }
            }
        },
        "agent.ValidateRegexResponse": {
            "type": "object",
            "properties": {
                "data": {
                    "$ref": "#/definitions/gin.H"
                },
                "error": {
                    "type": "string"
                },
                "success": {
                    "type": "boolean"
                }
            }
        },
        "agent.ValidateRegexesRequest": {
            "type": "object",
            "required": [
                "regexes",
                "testValues"
            ],
            "properties": {
                "regexes": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "testValues": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "agent.ValidateRegexesResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string"
                },
                "results": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "success": {
                    "type": "boolean"
                }
            }
        },
        "bifrostapp_internal_endpoints_agent.SaveRequest": {
            "type": "object",
            "required": [
                "app_name",
                "type"
            ],
            "properties": {
                "advanceNetworkCapture": {
                    "type": "boolean"
                },
                "app_name": {
                    "type": "string"
                },
                "console": {
                    "type": "boolean"
                },
                "disableNetworkInstrumentation": {
                    "type": "boolean"
                },
                "disableTracePropagation": {
                    "type": "boolean"
                },
                "errors": {
                    "type": "boolean"
                },
                "language": {
                    "type": "string"
                },
                "longtask": {
                    "type": "boolean"
                },
                "origin": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "recording": {
                    "type": "boolean"
                },
                "recordingOptions": {
                    "$ref": "#/definitions/agent.RecordingOptions"
                },
                "tracePropagationTargets": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "type": {
                    "type": "string"
                },
                "vcsCommitSHA": {
                    "type": "string"
                },
                "vcsRepositoryURL": {
                    "type": "string"
                },
                "webVitals": {
                    "type": "boolean"
                },
                "websocket": {
                    "type": "boolean"
                }
            }
        },
        "bifrostapp_internal_endpoints_agent.UpdateRequest": {
            "type": "object",
            "required": [
                "token"
            ],
            "properties": {
                "advanceNetworkCapture": {
                    "type": "boolean"
                },
                "app_name": {
                    "type": "string"
                },
                "console": {
                    "type": "boolean"
                },
                "disableNetworkInstrumentation": {
                    "type": "boolean"
                },
                "disableTracePropagation": {
                    "type": "boolean"
                },
                "errors": {
                    "type": "boolean"
                },
                "language": {
                    "type": "string"
                },
                "longtask": {
                    "type": "boolean"
                },
                "origin": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "recording": {
                    "type": "boolean"
                },
                "recordingOptions": {
                    "$ref": "#/definitions/agent.RecordingOptions"
                },
                "token": {
                    "type": "string"
                },
                "tracePropagationTargets": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "vcsCommitSHA": {
                    "type": "string"
                },
                "vcsRepositoryURL": {
                    "type": "string"
                },
                "webVitals": {
                    "type": "boolean"
                },
                "websocket": {
                    "type": "boolean"
                }
            }
        },
        "bifrostapp_internal_store_agent.SaveRequest": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "description": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "bifrostapp_internal_store_agent.UpdateRequest": {
            "type": "object",
            "properties": {
                "deleted": {
                    "type": "boolean"
                },
                "is_default": {
                    "type": "boolean"
                },
                "token": {
                    "type": "string"
                }
            }
        },
        "builder.TimeRange": {
            "type": "object",
            "properties": {
                "fromTs": {
                    "type": "integer"
                },
                "interval": {
                    "type": "integer"
                },
                "toTs": {
                    "type": "integer"
                }
            }
        },
        "common.PieChartOptionsType": {
            "type": "string",
            "enum": [
                "concentric",
                "side_by_side"
            ],
            "x-enum-varnames": [
                "Concentric",
                "SideBySide"
            ]
        },
        "gin.H": {
            "type": "object",
            "additionalProperties": {}
        },
        "handlers.TrackingRequest": {
            "type": "object",
            "required": [
                "metadata",
                "status"
            ],
            "properties": {
                "metadata": {
                    "type": "object",
                    "additionalProperties": true
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "helpers.SamplingPreview": {
            "type": "object",
            "properties": {
                "applied": {
                    "description": "Applied is true when a query over this range reads only part of the stored rows. False means\nthe range is small enough to read whole, the resource is not on a sampled path, or the\nselection could not be measured — in every one of those cases ScannedPercent is 100.",
                    "type": "boolean"
                },
                "scanned_percent": {
                    "description": "ScannedPercent is the share of stored rows a query reads, 0 \u003c percent \u003c= 100. It is the\nsummed TierRatio of the selected SampleWeight tiers — the tier's true share of the table, as\nmeasured by the stats query rather than inferred from the weight value.",
                    "type": "number"
                },
                "unit": {
                    "description": "Unit names what a row is on this resource, for the reader-facing sentence: \"logs\", \"spans\",\nor \"RUM events\".",
                    "type": "string"
                }
            }
        },
        "sql.NullInt64": {
            "type": "object",
            "properties": {
                "int64": {
                    "type": "integer",
                    "format": "int64"
                },
                "valid": {
                    "description": "Valid is true if Int64 is not NULL",
                    "type": "boolean"
                }
            }
        }
    },
    "securityDefinitions": {
        "ApiKeyAuth": {
            "type": "apiKey",
            "name": "ApiKey",
            "in": "header"
        }
    }
}