{
  "openapi": "3.1.0",
  "info": {
    "title": "Telemetry API",
    "version": "1.4.6",
    "description": "Log sources, collectors, ClickHouse connections, logs-to-metrics rules, dashboards, charts, alerts, explorations, and ad-hoc queries."
  },
  "servers": [
    {
      "url": "https://telemetry.betterstack.com"
    },
    {
      "url": "https://logs.betterstack.com",
      "description": "Alias host serving the same API."
    }
  ],
  "x-cli-token-env": "BETTERSTACK_GLOBAL_API_TOKEN",
  "x-cli-examples": [
    {
      "title": "List your sources, most recently active first",
      "commands": [
        "source list"
      ]
    }
  ],
  "security": [
    {
      "teamApiToken": []
    },
    {
      "globalApiToken": []
    },
    {
      "userOauth": []
    }
  ],
  "tags": [
    {
      "name": "alert",
      "description": "An alert on a dashboard chart or a saved exploration that opens an incident when its condition is met."
    },
    {
      "name": "aws_log_group_subscription",
      "description": "An override that subscribes a CloudWatch log group to an AWS source or keeps it unsubscribed, even before the source has found the group."
    },
    {
      "name": "collector",
      "description": "A Better Stack Collector agent that ingests logs, metrics, and traces from a host or cluster."
    },
    {
      "name": "collector_target",
      "description": "A database or process a collector scrapes for metrics, for example Postgres, nginx, or a Prometheus endpoint."
    },
    {
      "name": "connection",
      "description": "A ClickHouse connection for querying ingested data directly over SQL."
    },
    {
      "name": "dashboard",
      "description": "A dashboard of charts visualizing logs, metrics, and traces."
    },
    {
      "name": "dashboard_chart",
      "description": "A chart on a dashboard, backed by one or more queries.",
      "x-wire-type": "chart"
    },
    {
      "name": "dashboard_chart_comment",
      "description": "A comment pinned to a point in time on a dashboard chart, such as a release marker.",
      "x-wire-type": "chart_comment"
    },
    {
      "name": "dashboard_group",
      "description": "A group that organizes related dashboards together."
    },
    {
      "name": "dashboard_section",
      "description": "A full-width section divider that groups charts on a dashboard.",
      "x-wire-type": "section"
    },
    {
      "name": "dashboard_template",
      "description": "A prebuilt dashboard template that can be exported and imported to create a dashboard."
    },
    {
      "name": "dashboard_version",
      "description": "A version of a dashboard, as it was right before one change, kept so the dashboard can be rolled back to it."
    },
    {
      "name": "data_region",
      "description": "A data region or dedicated cluster a new source can store its data in."
    },
    {
      "name": "exploration",
      "description": "A saved exploration, which is a chart with its queries and variables over logs, metrics, or traces."
    },
    {
      "name": "exploration_group",
      "description": "A group that organizes related explorations together."
    },
    {
      "name": "extracted_metric",
      "description": "A rule that extracts a metric, or a label, from a source's logs using its `sql_expression`.",
      "x-wire-type": "metric"
    },
    {
      "name": "gcp_metric",
      "description": "A Google Cloud metric a GCP source can collect, and whether its metric filters collect it."
    },
    {
      "name": "log_pattern",
      "description": "A group of similar logs from one source that share a pattern."
    },
    {
      "name": "metric",
      "description": "A metric a source or an application has received, or one defined from its logs.",
      "x-wire-type": "source_metric"
    },
    {
      "name": "query",
      "description": "Run a SQL query over a source's logs, spans, metrics, web events, or exceptions and return the matching rows. Use a Telemetry API token, a global API token with **Query API** access, or an OAuth sign-in. To write the SQL, follow the [Query API guide](/docs/logs/query-api/connect-remotely/)."
    },
    {
      "name": "service",
      "description": "A service a source detected in its logs, spans or metrics, such as an app, a database or a web server."
    },
    {
      "name": "service_map",
      "description": "The services or hosts on a source's service map, and the connections between them and to outside addresses. The map is drawn from the collector's metrics or from the source's traces."
    },
    {
      "name": "service_operation",
      "description": "An operation of a service, such as `POST /api/checkout`. An operation is the name the service gives its spans."
    },
    {
      "name": "source",
      "description": "A telemetry source, a stream of logs, metrics, or traces ingested into Better Stack."
    },
    {
      "name": "source_field",
      "description": "A field a source's logs, spans, exceptions or web events can be queried by."
    },
    {
      "name": "source_field_value",
      "description": "A value one field of a source's logs or spans had in a time range."
    },
    {
      "name": "source_group",
      "description": "A group that organizes related telemetry sources together."
    },
    {
      "name": "trace",
      "description": "A trace in a source, the spans of one request as it passes through your services."
    }
  ],
  "paths": {
    "/api/v1/collectors/{collector_id}/targets": {
      "get": {
        "operationId": "list_collector_target",
        "summary": "List a collector's scrape targets.",
        "description": "Which attributes each target has depends on its kind.",
        "tags": [
          "collector_target"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/collectors/:collector_id/targets",
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1234"
              ]
            },
            "description": "Collector whose targets are listed.",
            "x-path-wildcard": false,
            "examples": {
              "list_collector_targets": {
                "summary": "List collector targets",
                "value": "1234"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of collector_target objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorTargetList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "kind",
          "enabled",
          "host",
          "port",
          "status"
        ],
        "x-cli-name-fields": [
          "host"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "kind",
          "host",
          "enabled",
          "port",
          "service",
          "listen_ip",
          "endpoint",
          "scheme",
          "username",
          "ssl_mode",
          "tls",
          "status",
          "container",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector_target.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_collector_target",
        "summary": "Add a scrape target to a collector.",
        "description": "`kind` and `host` are required, and which other attributes apply depends on the kind. Adding a database target also copies its credentials to the collector's other targets for the same service that have none.",
        "tags": [
          "collector_target"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v1/collectors/:collector_id/targets",
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "postgres": {
                "summary": "Postgres",
                "value": "1234"
              },
              "elasticsearch": {
                "summary": "Elasticsearch",
                "value": "1234"
              },
              "nginx": {
                "summary": "Nginx",
                "value": "1234"
              },
              "prometheus": {
                "summary": "Prometheus",
                "value": "1234"
              },
              "disabled": {
                "summary": "Disabled",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single collector_target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorTargetDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A setting the kind needs is missing, or another target of the collector has the same kind, host, port and `service`. `errors` lists the messages and `invalid_attributes` names the attributes. Send `ssl_mode` for `postgres` and `pgbouncer`, `tls` for `mysql` and `endpoint` for `prometheus`. The `kind` or `host` attribute is missing, listed in `required_attributes`. An attribute that doesn't apply to the kind, such as `ssl_mode` on redis, is listed in `invalid_attributes`. A `kind`, `ssl_mode`, `tls` or `scheme` outside its allowed values is listed in `invalid_values`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectorTargetCreate"
              },
              "examples": {
                "postgres": {
                  "summary": "Postgres",
                  "value": {
                    "kind": "postgres",
                    "host": "db.example.com",
                    "port": 5432,
                    "username": "monitor",
                    "password": "secret",
                    "ssl_mode": "require"
                  }
                },
                "elasticsearch": {
                  "summary": "Elasticsearch",
                  "value": {
                    "kind": "elasticsearch",
                    "host": "search.example.com",
                    "port": 9200,
                    "scheme": "https",
                    "api_key": "secret"
                  }
                },
                "nginx": {
                  "summary": "Nginx",
                  "value": {
                    "kind": "nginx",
                    "host": "web-1",
                    "service": "edge-nginx",
                    "listen_ip": "10.0.0.1",
                    "port": 80
                  }
                },
                "prometheus": {
                  "summary": "Prometheus",
                  "value": {
                    "kind": "prometheus",
                    "host": "app-1",
                    "service": "app-metrics",
                    "endpoint": "http://10.0.0.5:9090/metrics"
                  }
                },
                "disabled": {
                  "summary": "Disabled",
                  "value": {
                    "kind": "redis",
                    "host": "cache.example.com",
                    "port": 6379,
                    "enabled": false
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "kind",
          "enabled",
          "host",
          "port",
          "status"
        ],
        "x-cli-name-fields": [
          "host"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "kind",
          "host",
          "enabled",
          "port",
          "service",
          "listen_ip",
          "endpoint",
          "scheme",
          "username",
          "ssl_mode",
          "tls",
          "status",
          "container",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector_target.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v1/collectors/{collector_id}/targets/{id}": {
      "delete": {
        "operationId": "delete_collector_target",
        "summary": "Remove a target from the collector.",
        "tags": [
          "collector_target"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v1/collectors/:collector_id/targets/:id",
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "remove_a_collector_target": {
                "summary": "Remove a collector target",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "remove_a_collector_target": {
                "summary": "Remove a collector target",
                "value": "1"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector target doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "The target is archived rather than permanently deleted."
        ]
      },
      "get": {
        "operationId": "get_collector_target",
        "summary": "Get a collector target.",
        "description": "Passwords and API keys are never returned.",
        "tags": [
          "collector_target"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/collectors/:collector_id/targets/:id",
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_collector_target": {
                "summary": "Get a collector target",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123"
              ]
            },
            "description": "Get the ID via [List collector targets](/docs/logs/api/list-collector-metrics-targets/).",
            "x-path-wildcard": false,
            "examples": {
              "get_a_collector_target": {
                "summary": "Get a collector target",
                "value": "1"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single collector_target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorTargetDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector target doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "kind",
          "enabled",
          "host",
          "port",
          "status"
        ],
        "x-cli-name-fields": [
          "host"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "kind",
          "host",
          "enabled",
          "port",
          "service",
          "listen_ip",
          "endpoint",
          "scheme",
          "username",
          "ssl_mode",
          "tls",
          "status",
          "container",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector_target.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_collector_target",
        "summary": "Update a collector target's connection details or whether it's enabled.",
        "description": "Send only the fields you want to change. `kind` and `collector_id` can't be changed.",
        "tags": [
          "collector_target"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v1/collectors/:collector_id/targets/:id",
        "parameters": [
          {
            "name": "collector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "change_host": {
                "summary": "Change host",
                "value": "1234"
              },
              "rotate_credentials": {
                "summary": "Rotate credentials",
                "value": "1234"
              },
              "disable": {
                "summary": "Disable",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "change_host": {
                "summary": "Change host",
                "value": "1"
              },
              "rotate_credentials": {
                "summary": "Rotate credentials",
                "value": "1"
              },
              "disable": {
                "summary": "Disable",
                "value": "1"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single collector_target.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorTargetDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector target doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A setting the kind needs was sent empty, or another target of the collector has the same kind, host, port and `service`. `errors` lists the messages and `invalid_attributes` names the attributes. Leave out a setting you don't change, or send it with a value. An attribute that doesn't apply to the target's kind, such as `ssl_mode` on redis, is listed in `invalid_attributes`. An `ssl_mode`, `tls` or `scheme` outside its allowed values is listed in `invalid_values`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectorTargetUpdate"
              },
              "examples": {
                "change_host": {
                  "summary": "Change host",
                  "value": {
                    "host": "new-db.example.com"
                  }
                },
                "rotate_credentials": {
                  "summary": "Rotate credentials",
                  "value": {
                    "username": "monitor",
                    "password": "new-secret"
                  }
                },
                "disable": {
                  "summary": "Disable",
                  "value": {
                    "enabled": false
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "kind",
          "enabled",
          "host",
          "port",
          "status"
        ],
        "x-cli-name-fields": [
          "host"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "kind",
          "host",
          "enabled",
          "port",
          "service",
          "listen_ip",
          "endpoint",
          "scheme",
          "username",
          "ssl_mode",
          "tls",
          "status",
          "container",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector_target.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v1/source-groups": {
      "get": {
        "operationId": "list_source_group",
        "summary": "List your source groups, in `sort_index` order.",
        "tags": [
          "source_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/source-groups",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of source_group objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceGroupList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "sort_index"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sort_index",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_source_group",
        "summary": "Create a source group for organizing related sources.",
        "tags": [
          "source_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v1/source-groups",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single source_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` attribute is missing or invalid, or the token reaches several teams and none was picked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceGroupCreate"
              },
              "examples": {
                "create_a_source_group": {
                  "summary": "Create a source group",
                  "value": {
                    "name": "Backend sources"
                  }
                },
                "set_the_display_order": {
                  "summary": "Set the display order",
                  "value": {
                    "name": "Frontend sources",
                    "sort_index": 2
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "sort_index"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sort_index",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v1/source-groups/{id}": {
      "delete": {
        "operationId": "delete_source_group",
        "summary": "Delete a source group permanently.",
        "description": "The sources in the group are kept, outside any group.",
        "tags": [
          "source_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v1/source-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_source_group": {
                "summary": "Delete a source group",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_source_group",
        "summary": "Get a source group.",
        "description": "To list its sources, use [List sources in a source group](/docs/logs/api/listing-sources-in-source-group/).",
        "tags": [
          "source_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/source-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_source_group": {
                "summary": "Get a source group",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single source_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "sort_index"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sort_index",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_source_group",
        "summary": "Rename or reorder a source group.",
        "description": "Send `name` on every update, even when only `sort_index` changes.",
        "tags": [
          "source_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v1/source-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_source_group": {
                "summary": "Update a source group",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single source_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceGroupUpdate"
              },
              "examples": {
                "update_a_source_group": {
                  "summary": "Update a source group",
                  "value": {
                    "name": "My renamed source group"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "sort_index"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sort_index",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v1/source-groups/{id}/sources": {
      "get": {
        "operationId": "sources_source_group",
        "summary": "List the sources in a source group.",
        "tags": [
          "source_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v1/source-groups/:id/sources",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_sources_in_a_group": {
                "summary": "List sources in a group",
                "value": "572"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of source objects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The source's id."
                          },
                          "type": {
                            "type": "string",
                            "const": "source"
                          },
                          "attributes": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Source name.",
                                "examples": [
                                  "Nginx"
                                ]
                              },
                              "platform": {
                                "type": "string",
                                "enum": [
                                  "apache2",
                                  "aws",
                                  "aws_cloudwatch",
                                  "aws_ecs",
                                  "aws_elb",
                                  "aws_fargate",
                                  "azure",
                                  "azure_logs",
                                  "claude_platform",
                                  "cloudflare_logpush",
                                  "cloudflare_prometheus_exporter",
                                  "cloudflare_worker",
                                  "datadog_agent",
                                  "digitalocean",
                                  "docker",
                                  "dokku",
                                  "dotnet",
                                  "elasticsearch",
                                  "erlang",
                                  "fastly",
                                  "filebeat",
                                  "flights",
                                  "fluentbit",
                                  "fluentd",
                                  "fly_io",
                                  "gcp",
                                  "go",
                                  "google_cloud_pubsub",
                                  "haproxy",
                                  "heroku",
                                  "http",
                                  "java",
                                  "javascript",
                                  "kubernetes",
                                  "logstash",
                                  "minio",
                                  "mongodb",
                                  "mysql",
                                  "nginx",
                                  "open_telemetry",
                                  "oracle_cloud",
                                  "php",
                                  "postgresql",
                                  "prometheus",
                                  "prometheus_scrape",
                                  "python",
                                  "rabbitmq",
                                  "redis",
                                  "render",
                                  "rsyslog",
                                  "ruby",
                                  "syslog-ng",
                                  "traefik",
                                  "ubuntu",
                                  "vector",
                                  "vercel_integration",
                                  "winlogbeat"
                                ],
                                "description": "The platform the source ingests from.",
                                "examples": [
                                  "nginx"
                                ]
                              },
                              "data_region": {
                                "type": "string",
                                "description": "The storage zone the source's data is kept in, such as `us-west-2a`.",
                                "examples": [
                                  "us-west-2a"
                                ]
                              },
                              "source_group_id": {
                                "type": "integer",
                                "format": "int64",
                                "description": "The ID of the source group the source belongs to.",
                                "examples": [
                                  572
                                ]
                              },
                              "ingesting_paused": {
                                "type": "boolean",
                                "description": "Whether ingestion is paused for this source.",
                                "default": false,
                                "examples": [
                                  false
                                ]
                              },
                              "logs_retention": {
                                "type": "integer",
                                "format": "int64",
                                "description": "Days the source keeps logs.",
                                "examples": [
                                  7
                                ]
                              },
                              "metrics_retention": {
                                "type": "integer",
                                "format": "int64",
                                "description": "Days the source keeps metrics.",
                                "examples": [
                                  14
                                ]
                              },
                              "live_tail_pattern": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
                                "examples": [
                                  "{level} {host} {nginx.status} {nginx.method} {nginx.host} {nginx.path} {nginx.client} {nginx.agent} {message}"
                                ]
                              },
                              "vrl_transformation_logs": {
                                "type": "string",
                                "format": "vrl",
                                "description": "VRL program Better Stack runs on each log line as it's ingested. An empty string when there's no program or it's the platform's default program.",
                                "examples": [
                                  ".message = upcase!(.message)\n."
                                ]
                              },
                              "vrl_transformation_spans": {
                                "type": "string",
                                "format": "vrl",
                                "description": "VRL program Better Stack runs on each span as it's ingested. An empty string when there's no program.",
                                "examples": [
                                  ".name = downcase!(.name)\n."
                                ]
                              },
                              "blocked_metrics": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Metric names dropped when they're ingested.",
                                "default": [],
                                "examples": [
                                  [
                                    "go_gc_duration_seconds",
                                    "go_memstats_heap_idle_bytes"
                                  ]
                                ]
                              },
                              "scrape_urls": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "URLs to scrape metrics from. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                                "default": [],
                                "examples": [
                                  [
                                    "https://example.com/metrics"
                                  ]
                                ]
                              },
                              "scrape_frequency_secs": {
                                "type": "integer",
                                "format": "int64",
                                "enum": [
                                  15,
                                  30,
                                  60,
                                  120,
                                  300
                                ],
                                "description": "Seconds between scrapes.",
                                "default": 15,
                                "examples": [
                                  30
                                ]
                              },
                              "scrape_request_headers": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "The header's name."
                                    },
                                    "value": {
                                      "type": "string",
                                      "description": "The header's value."
                                    }
                                  }
                                },
                                "description": "Custom headers sent with each scrape request, each with a `name` and a `value`. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                                "x-detect-credentials": true,
                                "examples": [
                                  [
                                    {
                                      "name": "X-Scrape-Source",
                                      "value": "better-stack"
                                    }
                                  ]
                                ]
                              },
                              "scrape_request_basic_auth_user": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Username for basic authentication on scrape requests. `null` or an empty string when none is set.",
                                "examples": [
                                  "prometheus"
                                ]
                              },
                              "scrape_request_basic_auth_password": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Password for basic authentication on scrape requests, in plain text. `null` or an empty string when none is set.",
                                "x-sensitive": true,
                                "examples": [
                                  "s3cr3t-placeholder"
                                ]
                              },
                              "skip_ssl_verify": {
                                "type": "boolean",
                                "description": "Whether scrapes skip TLS verification.",
                                "default": false,
                                "examples": [
                                  false
                                ]
                              },
                              "custom_bucket": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The bucket's name, taken from `endpoint`.",
                                    "readOnly": true
                                  },
                                  "endpoint": {
                                    "type": "string",
                                    "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
                                  },
                                  "access_key_id": {
                                    "type": "string",
                                    "description": "The access key ID Better Stack uses to write to the bucket."
                                  },
                                  "secret_access_key": {
                                    "type": "string",
                                    "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
                                  },
                                  "keep_data_after_retention": {
                                    "type": "boolean",
                                    "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
                                  }
                                },
                                "description": "Your own S3-compatible bucket the source archives data in, or `null` when it uses Better Stack storage. `secret_access_key` is never returned.",
                                "examples": [
                                  {
                                    "name": "storage-bucket",
                                    "endpoint": "https://s3.us-east-1.amazonaws.com/storage-bucket",
                                    "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                                    "keep_data_after_retention": false
                                  }
                                ]
                              },
                              "token": {
                                "type": "string",
                                "description": "Ingestion token. Returned in every response.",
                                "x-sensitive": true,
                                "readOnly": true,
                                "examples": [
                                  "FczKcxEhjEDE58dBX7XaeX1q"
                                ]
                              },
                              "table_name": {
                                "type": "string",
                                "description": "The name you query the source's data by, such as `prometheus`.",
                                "readOnly": true,
                                "examples": [
                                  "nginx"
                                ]
                              },
                              "ingesting_host": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Host to send data to. `null` for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms, whose data Better Stack scrapes.",
                                "readOnly": true,
                                "examples": [
                                  "s95.eu-nbg-2.betterstackdata.com"
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the source was created.",
                                "readOnly": true,
                                "examples": [
                                  "2026-05-27T12:30:41.695Z"
                                ]
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the source was last updated.",
                                "readOnly": true,
                                "examples": [
                                  "2026-06-11T14:00:50.756Z"
                                ]
                              },
                              "team_id": {
                                "type": "integer",
                                "format": "int64",
                                "description": "Team that owns the source, as the number in its team ID, such as `123` for `t123`.",
                                "readOnly": true,
                                "examples": [
                                  123
                                ]
                              },
                              "team_name": {
                                "type": "string",
                                "description": "Name of the team that owns the source.",
                                "readOnly": true,
                                "examples": [
                                  "Test team"
                                ]
                              },
                              "retention": {
                                "type": "integer",
                                "format": "int64",
                                "description": "Days to keep logs, the same as `logs_retention`.",
                                "readOnly": true,
                                "examples": [
                                  7
                                ],
                                "deprecated": true
                              },
                              "vrl_transformation": {
                                "type": "string",
                                "description": "VRL program Better Stack runs on each log line as it's ingested, the same as `vrl_transformation_logs`. An empty string when there's no program or it's the platform's default program.",
                                "readOnly": true,
                                "examples": [
                                  ".message = upcase!(.message)\n."
                                ],
                                "deprecated": true
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/PaginationPageNumber"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Only sources that scrape, such as `prometheus_scrape`, return `scrape_urls`, `scrape_frequency_secs`, `scrape_request_headers`, `scrape_request_basic_auth_user`, `scrape_request_basic_auth_password` and `skip_ssl_verify`."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_data_on",
          "team_id",
          "source_group_id",
          "ingesting_paused"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "data_region",
          "source_group_id",
          "ingesting_paused",
          "logs_retention",
          "metrics_retention",
          "live_tail_pattern",
          "vrl_transformation_logs",
          "vrl_transformation_spans",
          "blocked_metrics",
          "scrape_urls",
          "scrape_frequency_secs",
          "scrape_request_headers",
          "scrape_request_basic_auth_user",
          "skip_ssl_verify",
          "custom_bucket",
          "token",
          "table_name",
          "ingesting_host",
          "created_at",
          "updated_at",
          "team_id",
          "team_name",
          "retention",
          "vrl_transformation"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_group.sources"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/dashboard-groups": {
      "get": {
        "operationId": "list_dashboard_group",
        "summary": "List your dashboard groups, oldest first.",
        "tags": [
          "dashboard_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/dashboard-groups",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Production"
              ]
            },
            "description": "Search over group names."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard_group objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardGroupList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "With an OAuth token, the list doesn't include groups the user's role can't read."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_dashboard_group",
        "summary": "Create a dashboard group for organizing dashboards.",
        "tags": [
          "dashboard_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v2/dashboard-groups",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single dashboard_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` attribute is missing, an attribute is unknown, a value is invalid, or the token reaches several teams and none was picked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardGroupCreate"
              },
              "examples": {
                "create_a_dashboard_group": {
                  "summary": "Create a dashboard group",
                  "value": {
                    "name": "Production Monitoring"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/dashboard-groups/{id}": {
      "delete": {
        "operationId": "delete_dashboard_group",
        "summary": "Delete a dashboard group permanently.",
        "description": "The dashboards in the group are kept, outside any group.",
        "tags": [
          "dashboard_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v2/dashboard-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_dashboard_group": {
                "summary": "Delete a dashboard group",
                "value": "456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_dashboard_group",
        "summary": "Get a dashboard group.",
        "description": "To list its dashboards, use [List dashboards in a group](/docs/logs/api/dashboard-groups/list-dashboards/).",
        "tags": [
          "dashboard_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/dashboard-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_dashboard_group": {
                "summary": "Get a dashboard group",
                "value": "456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_dashboard_group",
        "summary": "Rename a dashboard group.",
        "tags": [
          "dashboard_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v2/dashboard-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_dashboard_group": {
                "summary": "Update a dashboard group",
                "value": "456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardGroupUpdate"
              },
              "examples": {
                "update_a_dashboard_group": {
                  "summary": "Update a dashboard group",
                  "value": {
                    "name": "Updated Group Name"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "Sending a blank name does nothing."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/dashboard-groups/{id}/dashboards": {
      "get": {
        "operationId": "dashboards_dashboard_group",
        "summary": "List the dashboards in a group.",
        "tags": [
          "dashboard_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/dashboard-groups/:id/dashboards",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_dashboards_in_a_group": {
                "summary": "List dashboards in a group",
                "value": "789"
              }
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "CPU"
              ]
            },
            "description": "Full-text search over dashboard names."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard objects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The dashboard's id."
                          },
                          "type": {
                            "type": "string",
                            "const": "dashboard"
                          },
                          "attributes": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Dashboard name.",
                                "examples": [
                                  "Sample Dashboard"
                                ]
                              },
                              "dashboard_group_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "format": "int64",
                                "description": "Group this dashboard belongs to.",
                                "examples": [
                                  789
                                ]
                              },
                              "refresh_interval": {
                                "type": "integer",
                                "format": "int64",
                                "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off.",
                                "default": 30,
                                "examples": [
                                  30
                                ]
                              },
                              "date_range_from": {
                                "type": "string",
                                "description": "Default range start, for example now-3h.",
                                "default": "now-3h",
                                "examples": [
                                  "now-3h"
                                ]
                              },
                              "date_range_to": {
                                "type": "string",
                                "description": "Default range end, for example now.",
                                "default": "now",
                                "examples": [
                                  "now"
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the dashboard was created.",
                                "readOnly": true,
                                "examples": [
                                  "2025-01-20T15:00:00.000Z"
                                ]
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the dashboard was last updated.",
                                "readOnly": true,
                                "examples": [
                                  "2025-01-21T10:00:00.000Z"
                                ]
                              },
                              "team_id": {
                                "type": "integer",
                                "format": "int64",
                                "description": "Team that owns the dashboard, such as `t123`.",
                                "readOnly": true,
                                "examples": [
                                  123456
                                ]
                              },
                              "team_name": {
                                "type": "string",
                                "description": "Name of the team that owns the dashboard.",
                                "readOnly": true,
                                "examples": [
                                  "example-team"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/PaginationPageNumber"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Here `team_id` is a plain team number, not the `t`-prefixed ID the dashboard endpoints return."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.dashboards"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/exploration-groups": {
      "get": {
        "operationId": "list_exploration_group",
        "summary": "List your exploration groups, oldest first.",
        "tags": [
          "exploration_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/exploration-groups",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Production"
              ]
            },
            "description": "Search over group names."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of exploration_group objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorationGroupList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_exploration_group",
        "summary": "Create an exploration group for organizing saved explorations.",
        "tags": [
          "exploration_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v2/exploration-groups",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single exploration_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorationGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorationGroupCreate"
              },
              "examples": {
                "create_an_exploration_group": {
                  "summary": "Create an exploration group",
                  "value": {
                    "name": "Production Monitoring"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/exploration-groups/{id}": {
      "delete": {
        "operationId": "delete_exploration_group",
        "summary": "Delete an exploration group permanently.",
        "description": "The explorations in the group are kept, outside any group.",
        "tags": [
          "exploration_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v2/exploration-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_an_exploration_group": {
                "summary": "Delete an exploration group",
                "value": "456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_exploration_group",
        "summary": "Get an exploration group.",
        "description": "To list its explorations, use [List explorations in a group](/docs/logs/api/exploration-groups/list-explorations/).",
        "tags": [
          "exploration_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/exploration-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_an_exploration_group": {
                "summary": "Get an exploration group",
                "value": "456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single exploration_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorationGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "The ID of another kind of group, such as a source group or a dashboard group, returns 404, like an unknown ID."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_exploration_group",
        "summary": "Rename an exploration group.",
        "tags": [
          "exploration_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v2/exploration-groups/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_an_exploration_group": {
                "summary": "Update an exploration group",
                "value": "456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single exploration_group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorationGroupDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorationGroupUpdate"
              },
              "examples": {
                "update_an_exploration_group": {
                  "summary": "Update an exploration group",
                  "value": {
                    "name": "Updated Group Name"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "Sending a blank name does nothing."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_group.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/exploration-groups/{id}/explorations": {
      "get": {
        "operationId": "explorations_exploration_group",
        "summary": "List the saved explorations in an exploration group.",
        "tags": [
          "exploration_group"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/exploration-groups/:id/explorations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_explorations_in_a_group": {
                "summary": "List explorations in a group",
                "value": "456"
              }
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Error"
              ]
            },
            "description": "Search over exploration names and their group's name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of exploration objects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The exploration's id."
                          },
                          "type": {
                            "type": "string",
                            "const": "exploration"
                          },
                          "attributes": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.",
                                "examples": [
                                  "Error Rate Analysis"
                                ]
                              },
                              "date_range_from": {
                                "type": "string",
                                "description": "Start of the default date range, such as `now-3h`. A funnel's range starts at `now-7d` by default. Once set, it can't be cleared.",
                                "default": "now-3h",
                                "examples": [
                                  "now-3h"
                                ]
                              },
                              "date_range_to": {
                                "type": "string",
                                "description": "End of the default date range, such as `now`. Once set, it can't be cleared.",
                                "default": "now",
                                "examples": [
                                  "now"
                                ]
                              },
                              "exploration_group_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "format": "int64",
                                "description": "Group this exploration belongs to.",
                                "examples": [
                                  456
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the exploration was created.",
                                "readOnly": true,
                                "examples": [
                                  "2026-02-20T10:00:00.000Z"
                                ]
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the exploration was last updated.",
                                "readOnly": true,
                                "examples": [
                                  "2026-02-23T14:30:00.000Z"
                                ]
                              },
                              "team_name": {
                                "type": "string",
                                "description": "Name of the team that owns the exploration.",
                                "readOnly": true,
                                "examples": [
                                  "My Team"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/PaginationPageNumber"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration group doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "exploration_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "date_range_from",
          "date_range_to",
          "exploration_group_id",
          "created_at",
          "updated_at",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.exploration_group.explorations"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/sources/{source_id}/aws-log-group-subscriptions": {
      "get": {
        "operationId": "list_aws_log_group_subscription",
        "summary": "List the log groups you've subscribed or kept unsubscribed on an AWS source with an override.",
        "tags": [
          "aws_log_group_subscription"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/sources/:source_id/aws-log-group-subscriptions",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "The ID of the `aws` source. Get it via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "list_log_group_subscriptions": {
                "summary": "List log group subscriptions",
                "value": "123456"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of aws_log_group_subscription objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwsLogGroupSubscriptionList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, isn't an `aws` source, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "region",
          "name",
          "subscribed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "region",
          "name",
          "subscribed",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.aws_log_group_subscription.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_aws_log_group_subscription",
        "summary": "Create an override that subscribes a log group or keeps it unsubscribed.",
        "description": "The source doesn't need to have found the log group yet.",
        "tags": [
          "aws_log_group_subscription"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v2/sources/:source_id/aws-log-group-subscriptions",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "The ID of the `aws` source. Get it via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "create_a_log_group_subscription": {
                "summary": "Create a log group subscription",
                "value": "123456"
              },
              "keep_a_noisy_log_group_unsubscribed": {
                "summary": "Keep a noisy log group unsubscribed",
                "value": "123456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single aws_log_group_subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwsLogGroupSubscriptionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, isn't an `aws` source, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `region`, `name` or `subscribed` attribute is missing, the name is `RDSOSMetrics`, the log group Amazon RDS sends its metrics to, or that region and name already have an override.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AwsLogGroupSubscriptionCreate"
              },
              "examples": {
                "create_a_log_group_subscription": {
                  "summary": "Create a log group subscription",
                  "value": {
                    "region": "us-east-1",
                    "name": "/aws/lambda/checkout",
                    "subscribed": true
                  }
                },
                "keep_a_noisy_log_group_unsubscribed": {
                  "summary": "Keep a noisy log group unsubscribed",
                  "value": {
                    "region": "eu-west-1",
                    "name": "/aws/lambda/healthcheck",
                    "subscribed": false
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "region",
          "name",
          "subscribed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "region",
          "name",
          "subscribed",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.aws_log_group_subscription.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v2/sources/{source_id}/aws-log-group-subscriptions/{id}": {
      "delete": {
        "operationId": "delete_aws_log_group_subscription",
        "summary": "Delete a log group override.",
        "description": "The log group then follows the automatic subscription settings of the source again.",
        "tags": [
          "aws_log_group_subscription"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v2/sources/:source_id/aws-log-group-subscriptions/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "The ID of the `aws` source. Get it via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "delete_a_log_group_subscription": {
                "summary": "Delete a log group subscription",
                "value": "123456"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_log_group_subscription": {
                "summary": "Delete a log group subscription",
                "value": "4821"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source or the log group subscription doesn't exist, the source isn't an `aws` source, or the token can't access them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_aws_log_group_subscription",
        "summary": "Get one log group override, the settings that replace the defaults for that log group.",
        "tags": [
          "aws_log_group_subscription"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v2/sources/:source_id/aws-log-group-subscriptions/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "The ID of the `aws` source. Get it via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "get_a_log_group_subscription": {
                "summary": "Get a log group subscription",
                "value": "123456"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_log_group_subscription": {
                "summary": "Get a log group subscription",
                "value": "4821"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single aws_log_group_subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwsLogGroupSubscriptionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source or the log group subscription doesn't exist, the source isn't an `aws` source, or the token can't access them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "region",
          "name",
          "subscribed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "region",
          "name",
          "subscribed",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.aws_log_group_subscription.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_aws_log_group_subscription",
        "summary": "Change whether the override subscribes its log group.",
        "tags": [
          "aws_log_group_subscription"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v2/sources/:source_id/aws-log-group-subscriptions/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "The ID of the `aws` source. Get it via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "update_a_log_group_subscription": {
                "summary": "Update a log group subscription",
                "value": "123456"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_log_group_subscription": {
                "summary": "Update a log group subscription",
                "value": "4821"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single aws_log_group_subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwsLogGroupSubscriptionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source or the log group subscription doesn't exist, the source isn't an `aws` source, or the token can't access them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `subscribed` attribute is missing or isn't `true` or `false`, or an attribute other than `subscribed` was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AwsLogGroupSubscriptionUpdate"
              },
              "examples": {
                "update_a_log_group_subscription": {
                  "summary": "Update a log group subscription",
                  "value": {
                    "subscribed": false
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "region",
          "name",
          "subscribed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "region",
          "name",
          "subscribed",
          "created_at",
          "updated_at",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.aws_log_group_subscription.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/alerts": {
      "get": {
        "operationId": "list_alert",
        "summary": "List your alerts on every dashboard and Telemetry exploration, newest first.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/alerts",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "123"
              ]
            },
            "description": "Use it with `chart_id` to list only the alerts on that dashboard chart."
          },
          {
            "name": "chart_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "456"
              ]
            },
            "description": "Use it with `dashboard_id` to list only the alerts on that dashboard chart."
          },
          {
            "name": "exploration_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "789"
              ]
            },
            "description": "Only the alerts on this exploration."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of alert objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Filtering by `exploration_id`, or by `dashboard_id` together with `chart_id`, returns all of that exploration's or chart's alerts without pagination. `dashboard_id` or `chart_id` on its own is ignored."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "alert_type",
          "operator",
          "value",
          "paused",
          "dashboard_id",
          "chart_id",
          "exploration_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "dashboard_id",
          "chart_id",
          "exploration_id",
          "name",
          "alert_type",
          "operator",
          "value",
          "string_value",
          "paused",
          "paused_reason",
          "query_period",
          "confirmation_period",
          "recovery_period",
          "aggregation_interval",
          "check_period",
          "series_names",
          "series_names_except",
          "source_variable",
          "source_mode",
          "source_platforms",
          "escalation_target",
          "incident_cause",
          "incident_name",
          "incident_per_series",
          "additional_conditions",
          "variable_values",
          "on_missing_data",
          "anomaly_sensitivity",
          "anomaly_trigger",
          "shown_interval",
          "anomaly_training_range_days",
          "call",
          "sms",
          "email",
          "push",
          "critical_alert",
          "created_at",
          "updated_at",
          "metadata",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.alert.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_alert",
        "summary": "Create an alert on a dashboard chart or an exploration.",
        "description": "Send `dashboard_id` with `chart_id`, or `exploration_id`. The chart must be a line, bar, tail or table chart.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/alerts",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Sending `call`, `sms`, `push` or `critical_alert` as `true` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved. The request sent both a chart and an exploration, neither, or `dashboard_id` without `chart_id`. The error is in `invalid_values.owner`. The `name` or `alert_type` attribute is missing, or `operator` is missing for a threshold or relative alert. Listed in `required_attributes`. The chart's type doesn't support alerts, a threshold or relative alert has neither `value` nor `string_value` or has no `check_period`, `series_names` and `series_names_except` were both sent, or `escalation_target`, `metadata`, `variable_values` or `shown_interval` is invalid. Listed in `invalid_values`. The alert would check the exploration too often over too long a range. The message is in `invalid_values.base`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertCreate"
              },
              "examples": {
                "on_a_dashboard_chart": {
                  "summary": "On a dashboard chart",
                  "value": {
                    "dashboard_id": "123",
                    "chart_id": "456",
                    "name": "High Error Rate",
                    "alert_type": "threshold",
                    "operator": "higher_than",
                    "value": 100,
                    "check_period": 300,
                    "confirmation_period": 0,
                    "escalation_target": {
                      "policy_name": "Critical Policy"
                    },
                    "metadata": {
                      "runbook": [
                        "http://runbook/high-errors"
                      ]
                    }
                  }
                },
                "on_an_exploration": {
                  "summary": "On an exploration",
                  "value": {
                    "exploration_id": "789",
                    "name": "Status is Error",
                    "alert_type": "threshold",
                    "operator": "equal",
                    "string_value": "error",
                    "check_period": 300,
                    "confirmation_period": 0
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "The exploration in `exploration_id` must be one of your Telemetry explorations."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "alert_type",
          "operator",
          "value",
          "paused",
          "dashboard_id",
          "chart_id",
          "exploration_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "dashboard_id",
          "chart_id",
          "exploration_id",
          "name",
          "alert_type",
          "operator",
          "value",
          "string_value",
          "paused",
          "paused_reason",
          "query_period",
          "confirmation_period",
          "recovery_period",
          "aggregation_interval",
          "check_period",
          "series_names",
          "series_names_except",
          "source_variable",
          "source_mode",
          "source_platforms",
          "escalation_target",
          "incident_cause",
          "incident_name",
          "incident_per_series",
          "additional_conditions",
          "variable_values",
          "on_missing_data",
          "anomaly_sensitivity",
          "anomaly_trigger",
          "shown_interval",
          "anomaly_training_range_days",
          "call",
          "sms",
          "email",
          "push",
          "critical_alert",
          "created_at",
          "updated_at",
          "metadata",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.alert.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/alerts/preview": {
      "post": {
        "operationId": "preview_alert",
        "summary": "Replay an alert over past data to see the incidents it would have opened.",
        "description": "Pass `alert_id` to replay an existing alert, and send any setting you want to try instead of its own. To try an alert that doesn't exist yet, pass `dashboard_id` with `chart_id`, or `exploration_id`, with its settings. Nothing is saved. Use a replay to pick a threshold or a significance before creating an alert, or to check whether an alert is too noisy.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/alerts/preview",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the replay's report as a plain JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "chart": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The chart replayed, with its `id`, `name` and `chart_type`.",
                          "examples": [
                            {
                              "id": "456",
                              "name": "Errors",
                              "chart_type": "line_chart"
                            }
                          ]
                        },
                        "configuration": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The settings the replay used. For an existing alert, those are its own settings with the ones you sent on top.",
                          "examples": [
                            {
                              "alert_type": "threshold",
                              "operator": "higher_than",
                              "value": 5000,
                              "confirmation_period": 60,
                              "recovery_period": 300
                            }
                          ]
                        },
                        "window": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The window replayed, with its `from`, `to`, length in `seconds` and `interval_seconds` per data point. `requested_from` and `requested_to` are the window asked for.",
                          "examples": [
                            {
                              "from": "2026-11-15T10:00:00Z",
                              "to": "2026-11-22T10:00:00Z",
                              "requested_from": "2026-11-15T10:00:00Z",
                              "requested_to": "2026-11-22T10:00:00Z",
                              "seconds": 604800,
                              "interval_seconds": 60
                            }
                          ]
                        },
                        "totals": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Totals for the replay. `incidents` is how many incidents the alert would have opened, and `incidents_per_day` how many a day. `alerting_seconds` is how long the alert would have been alerting, and `alerting_share` that time as a fraction of the window. `alerting_points` counts the data points that alerted.",
                          "examples": [
                            {
                              "incidents": 3,
                              "incidents_per_day": 0.43,
                              "alerting_seconds": 1260,
                              "alerting_share": 0.2,
                              "alerting_points": 21
                            }
                          ]
                        },
                        "incidents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "started_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the incident would have started, once the condition held for `confirmation_period`."
                              },
                              "ended_at": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "When the incident would have ended. For an incident still open, it's the end of the window."
                              },
                              "duration_seconds": {
                                "type": "integer",
                                "format": "int64",
                                "description": "How long the incident would have lasted, in seconds."
                              },
                              "series_names": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "The series that caused the incident."
                              },
                              "open": {
                                "type": "boolean",
                                "description": "Whether the incident was still open at the end of the window."
                              }
                            }
                          },
                          "description": "The incidents the alert would have opened, oldest first.",
                          "examples": [
                            [
                              {
                                "started_at": "2026-11-20T08:12:00Z",
                                "ended_at": "2026-11-20T08:31:00Z",
                                "duration_seconds": 1140,
                                "series_names": [
                                  "api"
                                ],
                                "open": false
                              }
                            ]
                          ]
                        },
                        "series": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The series name."
                              },
                              "alerting_points": {
                                "type": "integer",
                                "format": "int64",
                                "description": "How many of the series' data points breached the condition."
                              }
                            }
                          },
                          "description": "Every series the replay checked.",
                          "examples": [
                            [
                              {
                                "name": "api",
                                "alerting_points": 21
                              }
                            ]
                          ]
                        },
                        "unchecked_series": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Series the anomaly detection couldn't check.",
                          "examples": [
                            []
                          ]
                        },
                        "omitted_series": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Series the replay skipped. A replay checks at most 50 series, or 10 for an anomaly alert.",
                          "examples": [
                            []
                          ]
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "A code to check for, such as `range_clamped`, `range_shortened`, `series_omitted` or `series_error`."
                              },
                              "message": {
                                "type": "string",
                                "description": "What the warning means for the numbers, in a sentence."
                              }
                            }
                          },
                          "description": "Reasons the numbers may be incomplete, such as a shortened window or skipped series.",
                          "examples": [
                            [
                              {
                                "code": "range_clamped",
                                "message": "A replay covers at most 7 days, so the window was cut back to start at 2026-11-15 10:00 UTC."
                              }
                            ]
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert, dashboard, chart or exploration wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request doesn't send exactly one of `alert_id`, `dashboard_id` with `chart_id`, or `exploration_id`, sends a setting the replay doesn't accept or a time in a format it doesn't recognize, or names a chart that can't be replayed, such as a tail or table chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alert_id": {
                    "type": "string",
                    "description": "ID of the alert to replay. Settings you send override it for this replay only. Get the IDs via [List chart alerts](/docs/logs/api/alerts/list/).",
                    "examples": [
                      "1234"
                    ]
                  },
                  "dashboard_id": {
                    "type": "string",
                    "description": "Dashboard of the chart to replay a new alert on, with `chart_id`. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
                    "examples": [
                      "123"
                    ]
                  },
                  "chart_id": {
                    "type": "string",
                    "description": "Chart to replay a new alert on, with `dashboard_id`. Get the IDs via [List charts](/docs/logs/api/charts/list/).",
                    "examples": [
                      "456"
                    ]
                  },
                  "exploration_id": {
                    "type": "string",
                    "description": "Exploration to replay a new alert on. Get the IDs via [List explorations](/docs/logs/api/explorations/list/).",
                    "examples": [
                      "789"
                    ]
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Start of the window to replay, as `now-3h`, `now-7d`, an ISO 8601 time or a Unix timestamp. An ISO 8601 time without a zone is read in your time zone when you sign in with OAuth, or in UTC with an API token. Defaults to 24 hours before `end_time`. At most 7 days are replayed.",
                    "examples": [
                      "now-7d"
                    ]
                  },
                  "end_time": {
                    "type": "string",
                    "description": "End of the window to replay, in the same forms as `start_time`. Defaults to `now`.",
                    "examples": [
                      "now"
                    ]
                  },
                  "alert_type": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "relative",
                      "anomaly_rrcf"
                    ],
                    "description": "Alert type, as on create. Required for a new alert.",
                    "x-enum-descriptions": {
                      "threshold": "Fires when the value crosses a threshold.",
                      "relative": "Compares the value with the previous period as a percentage change.",
                      "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                    },
                    "examples": [
                      "threshold"
                    ]
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "equal",
                      "not_equal",
                      "higher_than",
                      "higher_than_or_equal",
                      "lower_than",
                      "lower_than_or_equal",
                      "increases_by",
                      "decreases_by",
                      "changes_by"
                    ],
                    "description": "How the value is compared, as on create. Required for a new `threshold` or `relative` alert.",
                    "x-enum-descriptions": {
                      "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                      "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                      "higher_than": "A `threshold` alert fires when the value is above `value`.",
                      "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                      "lower_than": "A `threshold` alert fires when the value is below `value`.",
                      "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                      "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                      "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                      "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                    },
                    "examples": [
                      "higher_than"
                    ]
                  },
                  "value": {
                    "type": "number",
                    "description": "Threshold value, or the percentage for a `relative` alert.",
                    "examples": [
                      5000
                    ]
                  },
                  "string_value": {
                    "type": "string",
                    "description": "Value to compare a string series with.",
                    "examples": [
                      "error"
                    ]
                  },
                  "anomaly_sensitivity": {
                    "type": "number",
                    "description": "Significance of an `anomaly_rrcf` alert, 1 to 10. A higher value needs a larger deviation, so it fires less often.",
                    "examples": [
                      5.0
                    ]
                  },
                  "anomaly_trigger": {
                    "type": "string",
                    "enum": [
                      "any",
                      "higher",
                      "lower"
                    ],
                    "description": "Which anomalies an `anomaly_rrcf` alert fires on.",
                    "x-enum-descriptions": {
                      "any": "Fires on values above or below the prediction.",
                      "higher": "Fires on values above the prediction.",
                      "lower": "Fires on values below the prediction."
                    },
                    "examples": [
                      "any"
                    ]
                  },
                  "confirmation_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds the condition must hold before an incident opens.",
                    "examples": [
                      60
                    ]
                  },
                  "recovery_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds the condition must be clear before an incident closes.",
                    "examples": [
                      300
                    ]
                  },
                  "query_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds a `relative` alert compares against.",
                    "examples": [
                      3600
                    ]
                  },
                  "check_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds between checks.",
                    "examples": [
                      60
                    ]
                  },
                  "aggregation_interval": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds per data point the alert evaluates.",
                    "examples": [
                      60
                    ]
                  },
                  "on_missing_data": {
                    "type": "string",
                    "enum": [
                      "treat_as_zero",
                      "dont_fire",
                      "treat_as_previous",
                      "start_incident"
                    ],
                    "description": "What a check does when the query returns no data. Anomaly alerts don't accept it.",
                    "x-enum-descriptions": {
                      "treat_as_zero": "Checks the missing data as if the value were 0.",
                      "dont_fire": "Starts no incident for missing data.",
                      "treat_as_previous": "Checks the missing data as if it had the previous value.",
                      "start_incident": "Starts an incident when the query returns no data."
                    },
                    "examples": [
                      "dont_fire"
                    ]
                  },
                  "series_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Replay only these series. Can't be combined with `series_names_except`.",
                    "examples": [
                      [
                        "error"
                      ]
                    ]
                  },
                  "series_names_except": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Replay every series except these.",
                    "examples": [
                      [
                        "debug"
                      ]
                    ]
                  },
                  "additional_conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alert_type": {
                          "type": "string",
                          "description": "The type of the condition, `threshold` or `relative`."
                        },
                        "operator": {
                          "type": "string",
                          "description": "The comparison the condition makes, from the same values as `operator`."
                        },
                        "value": {
                          "type": "number",
                          "description": "Threshold value."
                        },
                        "string_value": {
                          "type": "string",
                          "description": "Threshold value for a string series."
                        },
                        "series_names": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition is limited to. An empty list means every series."
                        },
                        "series_names_except": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition ignores while it watches every other series."
                        }
                      }
                    },
                    "description": "Extra conditions combined with the alert's own, as on create. The replay fires only where a series meets every condition that covers it. For an existing alert, the conditions you send replace its own for the replay. Send `[]` to replay it without them.",
                    "examples": [
                      [
                        {
                          "alert_type": "relative",
                          "operator": "increases_by",
                          "value": 10
                        }
                      ]
                    ]
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "alert_id"
                    ]
                  },
                  {
                    "required": [
                      "dashboard_id",
                      "chart_id"
                    ]
                  },
                  {
                    "required": [
                      "exploration_id"
                    ]
                  }
                ],
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "alert_id",
                        "dashboard_id"
                      ]
                    },
                    {
                      "required": [
                        "alert_id",
                        "chart_id"
                      ]
                    },
                    {
                      "required": [
                        "alert_id",
                        "exploration_id"
                      ]
                    },
                    {
                      "required": [
                        "dashboard_id",
                        "exploration_id"
                      ]
                    },
                    {
                      "required": [
                        "chart_id",
                        "exploration_id"
                      ]
                    }
                  ]
                }
              },
              "examples": {
                "replay_an_alert": {
                  "summary": "Replay an alert",
                  "value": {
                    "alert_id": "1234",
                    "start_time": "now-7d"
                  }
                },
                "try_a_threshold_on_a_chart": {
                  "summary": "Try a threshold on a chart",
                  "value": {
                    "dashboard_id": "1234",
                    "chart_id": "18718",
                    "alert_type": "threshold",
                    "operator": "higher_than",
                    "value": 5000,
                    "start_time": "now-7d"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-response-fields": [
          "chart",
          "configuration",
          "window",
          "totals",
          "incidents",
          "series",
          "unchecked_series",
          "omitted_series",
          "warnings"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.alert.preview"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": []
        }
      }
    },
    "/api/v3/alerts/{id}": {
      "delete": {
        "operationId": "delete_alert",
        "summary": "Delete an alert permanently, along with its anomaly model.",
        "description": "The alert's open incidents are resolved.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v3/alerts/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_an_alert": {
                "summary": "Delete an alert",
                "value": "789"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_alert",
        "summary": "Get an alert's settings, such as its conditions and who it notifies.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/alerts/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_an_alert": {
                "summary": "Get an alert",
                "value": "789"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "alert_type",
          "operator",
          "value",
          "paused",
          "dashboard_id",
          "chart_id",
          "exploration_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "dashboard_id",
          "chart_id",
          "exploration_id",
          "name",
          "alert_type",
          "operator",
          "value",
          "string_value",
          "paused",
          "paused_reason",
          "query_period",
          "confirmation_period",
          "recovery_period",
          "aggregation_interval",
          "check_period",
          "series_names",
          "series_names_except",
          "source_variable",
          "source_mode",
          "source_platforms",
          "escalation_target",
          "incident_cause",
          "incident_name",
          "incident_per_series",
          "additional_conditions",
          "variable_values",
          "on_missing_data",
          "anomaly_sensitivity",
          "anomaly_trigger",
          "shown_interval",
          "anomaly_training_range_days",
          "call",
          "sms",
          "email",
          "push",
          "critical_alert",
          "created_at",
          "updated_at",
          "metadata",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.alert.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_alert",
        "summary": "Update an alert.",
        "description": "Send only the settings you want to change. The alert's chart can't be changed.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v3/alerts/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_an_alert": {
                "summary": "Update an alert",
                "value": "789"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Switching on `call`, `sms`, `push` or `critical_alert` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved. Re-sending a channel the alert already has always works. An attribute is unknown or invalid, `series_names` and `series_names_except` were both sent, `on_missing_data` was sent for an `anomaly_rrcf` alert, or `shown_interval` isn't one of the allowed intervals.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlertUpdate"
              },
              "examples": {
                "update_an_alert": {
                  "summary": "Update an alert",
                  "value": {
                    "value": 150.0,
                    "confirmation_period": 60
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "alert_type",
          "operator",
          "value",
          "paused",
          "dashboard_id",
          "chart_id",
          "exploration_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "dashboard_id",
          "chart_id",
          "exploration_id",
          "name",
          "alert_type",
          "operator",
          "value",
          "string_value",
          "paused",
          "paused_reason",
          "query_period",
          "confirmation_period",
          "recovery_period",
          "aggregation_interval",
          "check_period",
          "series_names",
          "series_names_except",
          "source_variable",
          "source_mode",
          "source_platforms",
          "escalation_target",
          "incident_cause",
          "incident_name",
          "incident_per_series",
          "additional_conditions",
          "variable_values",
          "on_missing_data",
          "anomaly_sensitivity",
          "anomaly_trigger",
          "shown_interval",
          "anomaly_training_range_days",
          "call",
          "sms",
          "email",
          "push",
          "critical_alert",
          "created_at",
          "updated_at",
          "metadata",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.alert.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/connections": {
      "get": {
        "operationId": "list_connection",
        "summary": "List your ClickHouse connections.",
        "description": "To see a connection's `sample_query` and `data_sources`, use [Get a connection](/docs/logs/api/connections/get/).",
        "tags": [
          "connection"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/connections",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of connection objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionList"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The connection doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "client_type",
          "cluster",
          "host",
          "port",
          "username",
          "valid_until",
          "note"
        ],
        "x-cli-name-fields": [
          "note",
          "cluster",
          "client_type"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "client_type",
          "cluster",
          "clusters",
          "team_ids",
          "team_names",
          "ip_allowlist",
          "valid_until",
          "note",
          "host",
          "port",
          "username",
          "password",
          "created_by",
          "sample_query",
          "data_sources",
          "created_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.connection.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_connection",
        "summary": "Create a ClickHouse connection for querying ingested data over SQL.",
        "description": "The password is only shown when you create the connection. Make sure to save it.",
        "tags": [
          "connection"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/connections",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The connection doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `client_type` or `team_ids` attribute is missing or invalid, a team wasn't found, a Grafana connection has no `cluster`, the `cluster` is one the organization doesn't store data in, another validation failed, or the data cluster couldn't create the credentials. In the last case nothing is saved, so try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionCreate"
              },
              "examples": {
                "create_a_connection": {
                  "summary": "Create a connection",
                  "value": {
                    "client_type": "clickhouse",
                    "team_ids": [
                      "t123"
                    ],
                    "ip_allowlist": [
                      "192.168.1.0/24",
                      "10.0.0.1"
                    ],
                    "valid_until": "2030-12-31T00:00:00Z",
                    "note": "Production connection for analytics"
                  }
                },
                "connect_grafana_to_one_cluster": {
                  "summary": "Connect Grafana to one cluster",
                  "value": {
                    "client_type": "grafana",
                    "cluster": "eu-nbg-2",
                    "team_ids": [
                      "t123"
                    ],
                    "valid_until": "2030-12-31T00:00:00Z",
                    "note": "Grafana Cloud data source"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "The `valid_until` attribute defaults to one hour after the connection is created. Send it as `null` for a connection that never expires."
        ],
        "x-cli-default-fields": [
          "id",
          "client_type",
          "cluster",
          "host",
          "port",
          "username",
          "valid_until",
          "note"
        ],
        "x-cli-name-fields": [
          "note",
          "cluster",
          "client_type"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "client_type",
          "cluster",
          "clusters",
          "team_ids",
          "team_names",
          "ip_allowlist",
          "valid_until",
          "note",
          "host",
          "port",
          "username",
          "password",
          "created_by",
          "sample_query",
          "data_sources",
          "created_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.connection.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/connections/{id}": {
      "delete": {
        "operationId": "delete_connection",
        "summary": "Revoke a ClickHouse connection immediately.",
        "description": "The connection's credentials stop working on every cluster it reaches.",
        "tags": [
          "connection"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v3/connections/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_connection": {
                "summary": "Delete a connection",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The connection doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_connection",
        "summary": "Get a ClickHouse connection.",
        "description": "The password is only shown when you create the connection.",
        "tags": [
          "connection"
        ],
        "security": [
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/connections/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_connection": {
                "summary": "Get a connection",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing or invalid, or it's a team API token. Use a global API token or an OAuth token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The connection doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "client_type",
          "cluster",
          "host",
          "port",
          "username",
          "valid_until",
          "note"
        ],
        "x-cli-name-fields": [
          "note",
          "cluster",
          "client_type"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "client_type",
          "cluster",
          "clusters",
          "team_ids",
          "team_names",
          "ip_allowlist",
          "valid_until",
          "note",
          "host",
          "port",
          "username",
          "password",
          "created_by",
          "sample_query",
          "data_sources",
          "created_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.connection.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/explorations": {
      "get": {
        "operationId": "list_exploration",
        "summary": "List your saved explorations.",
        "description": "To see an exploration's chart, queries and variables, use [Get an exploration](/docs/logs/api/explorations/get/).",
        "tags": [
          "exploration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/explorations",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "-updated_at"
              ]
            },
            "description": "Sort by `name`, `created_at` or `updated_at`. Add a `-` prefix for descending order, such as `-created_at`. Defaults to the oldest explorations first. Any other value is ignored."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Error"
              ]
            },
            "description": "Search over exploration names and their group's name."
          },
          {
            "name": "exploration_group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "456"
              ]
            },
            "description": "Only explorations in this group."
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "telemetry",
                "rum"
              ],
              "x-enum-descriptions": {
                "telemetry": "Telemetry's Explore.",
                "rum": "RUM's Explore, which reads an application's web events only."
              },
              "examples": [
                "rum"
              ]
            },
            "description": "Only explorations in this Explore. Leave it out to list both."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of exploration objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorationList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "The `query` parameter matches part of the chart's name or its group's name. A `query` that's part of the word `explorations` also matches every ungrouped exploration."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "exploration_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "date_range_from",
          "date_range_to",
          "exploration_group_id",
          "chart",
          "queries",
          "variables",
          "product",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.exploration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_exploration",
        "summary": "Save an exploration, either a chart with a query or a funnel.",
        "description": "A chart queries logs, metrics or traces. A funnel counts how many sessions get through a series of steps in a source's events. An exploration can have a default date range and variables.",
        "tags": [
          "exploration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/explorations",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single exploration.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ExplorationDocument"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "funnel_preview": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "steps": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The step's name."
                                  },
                                  "count": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "How many sessions reached the step."
                                  },
                                  "of_previous": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "description": "The step's count as a share of the previous step's, from 0 to 1. `null` for the first step."
                                  },
                                  "of_first": {
                                    "type": "number",
                                    "description": "The step's count as a share of the first step's, from 0 to 1."
                                  }
                                }
                              },
                              "description": "Each step, in journey order."
                            },
                            "breakdown": {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "description": "The field each step is split by."
                                },
                                "value_count": {
                                  "type": "integer",
                                  "format": "int64",
                                  "description": "How many distinct values the field has, which can be more than `values` lists."
                                },
                                "values": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "description": "A value of the breakdown field."
                                      },
                                      "counts": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "format": "int64"
                                        },
                                        "description": "How many sessions with this value reached each step, in step order."
                                      }
                                    }
                                  },
                                  "description": "The top values of the field, each with its counts."
                                }
                              },
                              "description": "The counts per value of the breakdown field, for its top values. Present only when the funnel has a breakdown."
                            },
                            "error": {
                              "type": "string",
                              "description": "Why the funnel couldn't be counted. Present only when the count failed."
                            }
                          },
                          "description": "For a funnel, how many sessions reached each step over the saved range. When the count couldn't run, only `error` is set, and the funnel is still saved. Left out for other explorations.",
                          "examples": [
                            {
                              "steps": [
                                {
                                  "name": "Cart",
                                  "count": 200,
                                  "of_previous": null,
                                  "of_first": 1.0
                                },
                                {
                                  "name": "Purchase",
                                  "count": 50,
                                  "of_previous": 0.25,
                                  "of_first": 0.25
                                }
                              ]
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name`, `chart`, `queries`, `chart.chart_type` or a funnel's `source_id` attribute is missing, listed in `required_attributes`, or the token reaches several teams and none was picked. The `name` attribute is blank. `invalid_values` names it as `chart.name`, the name of the exploration's chart. Send a `name` with text in it. The `exploration_group_id` attribute isn't an exploration group, the chart or a query doesn't fit its type, `queries` is empty, variable names repeat, or a `source` variable's values aren't your sources. Listed in `invalid_values`. A query doesn't fit when its `query_type` can't render in the chosen `chart_type`, or when a chart other than `line_chart` has more than one query. The `product` attribute is `rum` and a source in the `source` variable isn't picked as its web events. Reported in `invalid_values.product`. A funnel's `source_id` isn't one of your sources or has no web events, logs or spans, or `product` is `rum` and it has no web events. Reported in `invalid_values.source_id`. The `product` attribute is neither `telemetry` nor `rum`, or `exploration_group_id` is a group of the other Explore. Listed in `invalid_values`. A funnel has fewer than 2 or more than 32 steps, a step without conditions or with conditions that can't run, or a session or breakdown field the source's recent events don't have. Reported in `invalid_values` under `queries[0].funnel_query`, and nothing is saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorationCreate"
              },
              "examples": {
                "create_an_exploration": {
                  "summary": "Create an exploration",
                  "value": {
                    "name": "Error Rate Analysis",
                    "date_range_from": "now-3h",
                    "date_range_to": "now",
                    "exploration_group_id": null,
                    "chart": {
                      "chart_type": "line_chart",
                      "description": "Shows error rates across all services",
                      "settings": {
                        "unit": "auto",
                        "decimal_places": 0,
                        "legend": "shown_below",
                        "stacking": "dont_stack"
                      }
                    },
                    "queries": [
                      {
                        "name": "Main Query",
                        "query_type": "sql_expression",
                        "sql_query": "SELECT {{time}} AS time, count(*) AS value\nFROM {{source}}\nWHERE dt BETWEEN {{start_time}} AND {{end_time}}\n  [[ AND match(JSONExtractString(raw, 'level'), {{level}}) ]]\nGROUP BY time",
                        "source_variable": "source"
                      }
                    ],
                    "variables": [
                      {
                        "name": "source",
                        "variable_type": "source",
                        "values": [
                          "123"
                        ]
                      },
                      {
                        "name": "level",
                        "variable_type": "select_with_sql",
                        "values": [],
                        "default_values": [],
                        "sql_definition": "JSONExtractString(raw, 'level')",
                        "allow_multiple_values": true
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "A `funnel_chart` or `funnel_trend_chart` creates a funnel. A funnel accepts `source_id`, one `funnel_query` and no `variables`, and its range defaults to the last 7 days. A funnel's steps are counted before it's saved, and the response has a `funnel_preview` next to `data` with the sessions that reached each step over the saved range.",
          "To save a funnel, send `chart` with `chart_type` set to `funnel_chart` and, optionally, `settings.funnel_unit_name`, the word the chart counts in. Send `queries` with one query whose `query_type` is `funnel_query`, its `steps` in `queries[0].funnel_query.steps`, each with a `name` and `conditions`, and optionally a `session_field` and `breakdown_field` beside them. For example `{\"name\": \"Checkout\", \"source_id\": 3769, \"chart\": {\"chart_type\": \"funnel_chart\", \"settings\": {\"funnel_unit_name\": \"sessions\"}}, \"queries\": [{\"query_type\": \"funnel_query\", \"funnel_query\": {\"steps\": [{\"name\": \"Cart\", \"conditions\": \"payload.meta.path=\\\"/cart\\\"\"}, {\"name\": \"Purchase\", \"conditions\": \"event=\\\"purchase\\\"\"}]}}]}`.",
          "A step's `conditions` is a Live tail query matched against single events, such as `field=\"value\"` for equals, `field:\"value\"` for contains, `field!=\"value\"` for not equals, `field=*` for present and `field=~\"^/products/[0-9]+$\"` for a regular expression, combined with `AND`, `OR` and brackets. Fields are the events' dotted JSON paths. Web events from the Better Stack JS tag have `event`, `payload.meta.path` for the page, `payload.target.selector` for a clicked element, `contexts.device.type` and `user.id`.",
          "A step that reaches 0 sessions in `meta.funnel_preview` almost always has a wrong field or value. When every step is at 0, the first step matches nothing or the session field is missing from the events."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "exploration_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "date_range_from",
          "date_range_to",
          "exploration_group_id",
          "chart",
          "queries",
          "variables",
          "product",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.exploration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/explorations/{exploration_id}/alerts": {
      "get": {
        "operationId": "list_on_exploration_alert",
        "summary": "List the alerts on one saved exploration.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v3/explorations/:exploration_id/alerts",
        "parameters": [
          {
            "name": "exploration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "789"
              ]
            },
            "description": "Exploration whose alerts are listed.",
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of alert objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every alert in one page."
        ]
      },
      "post": {
        "operationId": "create_on_exploration_alert",
        "summary": "Create an alert on a saved exploration.",
        "description": "The exploration's chart must be a line, bar, tail, or table chart.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "POST /api/v3/explorations/:exploration_id/alerts",
        "parameters": [
          {
            "name": "exploration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Sending `call`, `sms`, `push` or `critical_alert` as `true` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved. A required attribute is missing or an attribute is invalid, as for an alert on a dashboard chart. Also returned when `shown_interval` isn't one of the allowed intervals, or when the alert would check the exploration too often over too long a range, with the message in `invalid_values.base`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
                    "examples": [
                      "High Error Rate"
                    ]
                  },
                  "alert_type": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "relative",
                      "anomaly_rrcf"
                    ],
                    "description": "Alert type. An update can change it.",
                    "x-enum-descriptions": {
                      "threshold": "Fires when the value crosses a threshold.",
                      "relative": "Compares the value with the previous period as a percentage change.",
                      "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                    },
                    "examples": [
                      "threshold"
                    ]
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "equal",
                      "not_equal",
                      "higher_than",
                      "higher_than_or_equal",
                      "lower_than",
                      "lower_than_or_equal",
                      "increases_by",
                      "decreases_by",
                      "changes_by"
                    ],
                    "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
                    "x-enum-descriptions": {
                      "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                      "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                      "higher_than": "A `threshold` alert fires when the value is above `value`.",
                      "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                      "lower_than": "A `threshold` alert fires when the value is below `value`.",
                      "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                      "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                      "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                      "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                    },
                    "examples": [
                      "higher_than"
                    ]
                  },
                  "value": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
                    "examples": [
                      100.0
                    ]
                  },
                  "string_value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
                    "examples": [
                      "error"
                    ]
                  },
                  "paused": {
                    "type": "boolean",
                    "description": "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored.",
                    "default": false,
                    "examples": [
                      true
                    ]
                  },
                  "query_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60.",
                    "examples": [
                      600
                    ]
                  },
                  "confirmation_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
                    "default": 60,
                    "examples": [
                      120
                    ]
                  },
                  "recovery_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
                    "default": 60,
                    "examples": [
                      60
                    ]
                  },
                  "aggregation_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60.",
                    "examples": [
                      300
                    ]
                  },
                  "check_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert.",
                    "examples": [
                      300
                    ]
                  },
                  "series_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both.",
                    "examples": [
                      [
                        "error"
                      ]
                    ]
                  },
                  "series_names_except": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both.",
                    "examples": [
                      []
                    ]
                  },
                  "source_variable": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
                    "examples": [
                      "source:t123456_my_app"
                    ]
                  },
                  "source_mode": {
                    "type": "string",
                    "enum": [
                      "source_variable",
                      "platforms_single_source",
                      "platforms_all_sources"
                    ],
                    "description": "How the alert picks its sources.",
                    "x-enum-descriptions": {
                      "source_variable": "Runs on the sources in `source_variable`.",
                      "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                      "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                    },
                    "default": "source_variable",
                    "examples": [
                      "source_variable"
                    ]
                  },
                  "source_platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
                    "default": [],
                    "examples": [
                      [
                        "kubernetes"
                      ]
                    ]
                  },
                  "escalation_target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "policy_id": {
                            "type": "string",
                            "description": "Escalation policy ID."
                          },
                          "policy_name": {
                            "type": "string",
                            "description": "Escalation policy name."
                          },
                          "team_id": {
                            "type": "string",
                            "pattern": "^t[1-9][0-9]*$",
                            "description": "Team ID, such as `t123`."
                          },
                          "team_name": {
                            "type": "string",
                            "description": "Team name.",
                            "readOnly": true
                          }
                        }
                      },
                      {
                        "type": "string",
                        "enum": [
                          "current_team",
                          "unknown"
                        ]
                      }
                    ],
                    "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
                    "default": "current_team",
                    "examples": [
                      {
                        "policy_id": "456",
                        "policy_name": "Critical Policy"
                      }
                    ]
                  },
                  "incident_cause": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
                    "examples": [
                      "Error rate exceeded {{current_value}}"
                    ]
                  },
                  "incident_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
                    "examples": [
                      "High error rate on Checkout API"
                    ]
                  },
                  "incident_per_series": {
                    "type": "boolean",
                    "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
                    "default": false,
                    "examples": [
                      false
                    ]
                  },
                  "additional_conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alert_type": {
                          "type": "string",
                          "description": "The type of the condition, `threshold` or `relative`."
                        },
                        "operator": {
                          "type": "string",
                          "description": "The comparison the condition makes, from the same values as `operator`."
                        },
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Threshold value. `null` when the condition compares `string_value`."
                        },
                        "string_value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Threshold value for a string series. `null` when the condition compares `value`."
                        },
                        "series_names": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition is limited to. An empty list means every series."
                        },
                        "series_names_except": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition ignores while it watches every other series."
                        }
                      }
                    },
                    "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
                    "examples": [
                      [
                        {
                          "alert_type": "relative",
                          "operator": "increases_by",
                          "value": 10
                        }
                      ]
                    ]
                  },
                  "variable_values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of a variable on the alert's dashboard or exploration."
                        },
                        "selected_label": {
                          "type": "string",
                          "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The values the alert uses for the variable, as strings."
                        }
                      }
                    },
                    "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
                    "examples": [
                      [
                        {
                          "name": "environment",
                          "selected_label": "production",
                          "values": [
                            "production"
                          ]
                        }
                      ]
                    ]
                  },
                  "on_missing_data": {
                    "type": "string",
                    "enum": [
                      "treat_as_zero",
                      "dont_fire",
                      "treat_as_previous",
                      "start_incident"
                    ],
                    "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
                    "x-enum-descriptions": {
                      "treat_as_zero": "Checks the missing data as if the value were 0.",
                      "dont_fire": "Starts no incident for missing data.",
                      "treat_as_previous": "Checks the missing data as if it had the previous value.",
                      "start_incident": "Starts an incident when the query returns no data."
                    },
                    "examples": [
                      "dont_fire"
                    ]
                  },
                  "anomaly_sensitivity": {
                    "type": "number",
                    "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
                    "examples": [
                      5.0
                    ]
                  },
                  "anomaly_trigger": {
                    "type": "string",
                    "enum": [
                      "any",
                      "higher",
                      "lower"
                    ],
                    "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "x-enum-descriptions": {
                      "any": "Fires on values above or below the prediction.",
                      "higher": "Fires on values above the prediction.",
                      "lower": "Fires on values below the prediction."
                    },
                    "examples": [
                      "any"
                    ]
                  },
                  "shown_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.",
                    "examples": [
                      300
                    ]
                  },
                  "anomaly_training_range_days": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "examples": [
                      7
                    ]
                  },
                  "call": {
                    "type": "boolean",
                    "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "sms": {
                    "type": "boolean",
                    "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "email": {
                    "type": "boolean",
                    "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
                    "examples": [
                      true
                    ]
                  },
                  "push": {
                    "type": "boolean",
                    "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "critical_alert": {
                    "type": "boolean",
                    "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "metadata": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`.",
                    "examples": [
                      {
                        "runbook": [
                          "https://wiki.example.com/runbook"
                        ],
                        "env": [
                          "production"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "alert_type"
                ],
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "threshold",
                            "relative"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": {
                          "default": "dont_fire"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "threshold",
                              "relative"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": false
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "anomaly_rrcf"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": {
                          "default": 5.0
                        },
                        "anomaly_trigger": {
                          "default": "any"
                        },
                        "anomaly_training_range_days": {
                          "default": 7
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "anomaly_rrcf"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": false,
                        "anomaly_trigger": false,
                        "anomaly_training_range_days": false
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        }
      }
    },
    "/api/v3/explorations/{exploration_id}/alerts/{id}": {
      "delete": {
        "operationId": "delete_on_exploration_alert",
        "summary": "Delete an alert of a saved exploration permanently, along with its anomaly model.",
        "description": "The alert's open incidents are resolved.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "DELETE /api/v3/explorations/:exploration_id/alerts/:id",
        "parameters": [
          {
            "name": "exploration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_on_exploration_alert",
        "summary": "Get one alert on a saved exploration.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v3/explorations/:exploration_id/alerts/:id",
        "parameters": [
          {
            "name": "exploration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_on_exploration_alert",
        "summary": "Update an alert on a saved exploration.",
        "description": "Send only the settings you want to change.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "PATCH /api/v3/explorations/:exploration_id/alerts/:id",
        "parameters": [
          {
            "name": "exploration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Switching on `call`, `sms`, `push` or `critical_alert` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved. Re-sending a channel the alert already has always works.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
                    "examples": [
                      "High Error Rate"
                    ]
                  },
                  "alert_type": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "relative",
                      "anomaly_rrcf"
                    ],
                    "description": "Alert type. An update can change it.",
                    "x-enum-descriptions": {
                      "threshold": "Fires when the value crosses a threshold.",
                      "relative": "Compares the value with the previous period as a percentage change.",
                      "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                    },
                    "examples": [
                      "threshold"
                    ]
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "equal",
                      "not_equal",
                      "higher_than",
                      "higher_than_or_equal",
                      "lower_than",
                      "lower_than_or_equal",
                      "increases_by",
                      "decreases_by",
                      "changes_by"
                    ],
                    "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
                    "x-enum-descriptions": {
                      "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                      "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                      "higher_than": "A `threshold` alert fires when the value is above `value`.",
                      "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                      "lower_than": "A `threshold` alert fires when the value is below `value`.",
                      "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                      "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                      "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                      "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                    },
                    "examples": [
                      "higher_than"
                    ]
                  },
                  "value": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
                    "examples": [
                      100.0
                    ]
                  },
                  "string_value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
                    "examples": [
                      "error"
                    ]
                  },
                  "paused": {
                    "type": "boolean",
                    "description": "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored.",
                    "default": false,
                    "examples": [
                      true
                    ]
                  },
                  "query_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60.",
                    "examples": [
                      600
                    ]
                  },
                  "confirmation_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
                    "default": 60,
                    "examples": [
                      120
                    ]
                  },
                  "recovery_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
                    "default": 60,
                    "examples": [
                      60
                    ]
                  },
                  "aggregation_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60.",
                    "examples": [
                      300
                    ]
                  },
                  "check_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert.",
                    "examples": [
                      300
                    ]
                  },
                  "series_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both.",
                    "examples": [
                      [
                        "error"
                      ]
                    ]
                  },
                  "series_names_except": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both.",
                    "examples": [
                      []
                    ]
                  },
                  "source_variable": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
                    "examples": [
                      "source:t123456_my_app"
                    ]
                  },
                  "source_mode": {
                    "type": "string",
                    "enum": [
                      "source_variable",
                      "platforms_single_source",
                      "platforms_all_sources"
                    ],
                    "description": "How the alert picks its sources.",
                    "x-enum-descriptions": {
                      "source_variable": "Runs on the sources in `source_variable`.",
                      "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                      "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                    },
                    "default": "source_variable",
                    "examples": [
                      "source_variable"
                    ]
                  },
                  "source_platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
                    "default": [],
                    "examples": [
                      [
                        "kubernetes"
                      ]
                    ]
                  },
                  "escalation_target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "policy_id": {
                            "type": "string",
                            "description": "Escalation policy ID."
                          },
                          "policy_name": {
                            "type": "string",
                            "description": "Escalation policy name."
                          },
                          "team_id": {
                            "type": "string",
                            "pattern": "^t[1-9][0-9]*$",
                            "description": "Team ID, such as `t123`."
                          },
                          "team_name": {
                            "type": "string",
                            "description": "Team name.",
                            "readOnly": true
                          }
                        }
                      },
                      {
                        "type": "string",
                        "enum": [
                          "current_team",
                          "unknown"
                        ]
                      }
                    ],
                    "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
                    "default": "current_team",
                    "examples": [
                      {
                        "policy_id": "456",
                        "policy_name": "Critical Policy"
                      }
                    ]
                  },
                  "incident_cause": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
                    "examples": [
                      "Error rate exceeded {{current_value}}"
                    ]
                  },
                  "incident_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
                    "examples": [
                      "High error rate on Checkout API"
                    ]
                  },
                  "incident_per_series": {
                    "type": "boolean",
                    "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
                    "default": false,
                    "examples": [
                      false
                    ]
                  },
                  "additional_conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alert_type": {
                          "type": "string",
                          "description": "The type of the condition, `threshold` or `relative`."
                        },
                        "operator": {
                          "type": "string",
                          "description": "The comparison the condition makes, from the same values as `operator`."
                        },
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Threshold value. `null` when the condition compares `string_value`."
                        },
                        "string_value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Threshold value for a string series. `null` when the condition compares `value`."
                        },
                        "series_names": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition is limited to. An empty list means every series."
                        },
                        "series_names_except": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition ignores while it watches every other series."
                        }
                      }
                    },
                    "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
                    "examples": [
                      [
                        {
                          "alert_type": "relative",
                          "operator": "increases_by",
                          "value": 10
                        }
                      ]
                    ]
                  },
                  "variable_values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of a variable on the alert's dashboard or exploration."
                        },
                        "selected_label": {
                          "type": "string",
                          "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The values the alert uses for the variable, as strings."
                        }
                      }
                    },
                    "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
                    "examples": [
                      [
                        {
                          "name": "environment",
                          "selected_label": "production",
                          "values": [
                            "production"
                          ]
                        }
                      ]
                    ]
                  },
                  "on_missing_data": {
                    "type": "string",
                    "enum": [
                      "treat_as_zero",
                      "dont_fire",
                      "treat_as_previous",
                      "start_incident"
                    ],
                    "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
                    "x-enum-descriptions": {
                      "treat_as_zero": "Checks the missing data as if the value were 0.",
                      "dont_fire": "Starts no incident for missing data.",
                      "treat_as_previous": "Checks the missing data as if it had the previous value.",
                      "start_incident": "Starts an incident when the query returns no data."
                    },
                    "examples": [
                      "dont_fire"
                    ]
                  },
                  "anomaly_sensitivity": {
                    "type": "number",
                    "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
                    "examples": [
                      5.0
                    ]
                  },
                  "anomaly_trigger": {
                    "type": "string",
                    "enum": [
                      "any",
                      "higher",
                      "lower"
                    ],
                    "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "x-enum-descriptions": {
                      "any": "Fires on values above or below the prediction.",
                      "higher": "Fires on values above the prediction.",
                      "lower": "Fires on values below the prediction."
                    },
                    "examples": [
                      "any"
                    ]
                  },
                  "shown_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.",
                    "examples": [
                      300
                    ]
                  },
                  "anomaly_training_range_days": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "examples": [
                      7
                    ]
                  },
                  "call": {
                    "type": "boolean",
                    "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "sms": {
                    "type": "boolean",
                    "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "email": {
                    "type": "boolean",
                    "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
                    "examples": [
                      true
                    ]
                  },
                  "push": {
                    "type": "boolean",
                    "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "critical_alert": {
                    "type": "boolean",
                    "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "metadata": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`.",
                    "examples": [
                      {
                        "runbook": [
                          "https://wiki.example.com/runbook"
                        ],
                        "env": [
                          "production"
                        ]
                      }
                    ]
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "threshold",
                            "relative"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": {
                          "default": "dont_fire"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "threshold",
                              "relative"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": false
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "anomaly_rrcf"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": {
                          "default": 5.0
                        },
                        "anomaly_trigger": {
                          "default": "any"
                        },
                        "anomaly_training_range_days": {
                          "default": 7
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "anomaly_rrcf"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": false,
                        "anomaly_trigger": false,
                        "anomaly_training_range_days": false
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        }
      }
    },
    "/api/v3/explorations/{id}": {
      "delete": {
        "operationId": "delete_exploration",
        "summary": "Delete a saved exploration permanently, along with its chart and alerts.",
        "tags": [
          "exploration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v3/explorations/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_an_exploration": {
                "summary": "Delete an exploration",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Deleting the last exploration in a group also deletes the group."
        ]
      },
      "get": {
        "operationId": "get_exploration",
        "summary": "Get an exploration with its chart, queries and variables.",
        "tags": [
          "exploration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v3/explorations/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_an_exploration": {
                "summary": "Get an exploration",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single exploration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplorationDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "exploration_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "date_range_from",
          "date_range_to",
          "exploration_group_id",
          "chart",
          "queries",
          "variables",
          "product",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.exploration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_exploration",
        "summary": "Update an exploration's name, chart, queries or variables, or a funnel's steps.",
        "description": "Send only the fields you want to change.",
        "tags": [
          "exploration"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v3/explorations/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_an_exploration": {
                "summary": "Update an exploration",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single exploration.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ExplorationDocument"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "funnel_preview": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "steps": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The step's name."
                                  },
                                  "count": {
                                    "type": "integer",
                                    "format": "int64",
                                    "description": "How many sessions reached the step."
                                  },
                                  "of_previous": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "description": "The step's count as a share of the previous step's, from 0 to 1. `null` for the first step."
                                  },
                                  "of_first": {
                                    "type": "number",
                                    "description": "The step's count as a share of the first step's, from 0 to 1."
                                  }
                                }
                              },
                              "description": "Each step, in journey order."
                            },
                            "breakdown": {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "description": "The field each step is split by."
                                },
                                "value_count": {
                                  "type": "integer",
                                  "format": "int64",
                                  "description": "How many distinct values the field has, which can be more than `values` lists."
                                },
                                "values": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "value": {
                                        "type": "string",
                                        "description": "A value of the breakdown field."
                                      },
                                      "counts": {
                                        "type": "array",
                                        "items": {
                                          "type": "integer",
                                          "format": "int64"
                                        },
                                        "description": "How many sessions with this value reached each step, in step order."
                                      }
                                    }
                                  },
                                  "description": "The top values of the field, each with its counts."
                                }
                              },
                              "description": "The counts per value of the breakdown field, for its top values. Present only when the funnel has a breakdown."
                            },
                            "error": {
                              "type": "string",
                              "description": "Why the funnel couldn't be counted. Present only when the count failed."
                            }
                          },
                          "description": "For a funnel, how many sessions reached each step over the saved range. When the count couldn't run, only `error` is set, and the funnel is still saved. `null` when nothing was counted, such as after a rename. Left out for other explorations.",
                          "examples": [
                            {
                              "steps": [
                                {
                                  "name": "Cart",
                                  "count": 200,
                                  "of_previous": null,
                                  "of_first": 1.0
                                },
                                {
                                  "name": "Purchase",
                                  "count": 50,
                                  "of_previous": 0.25,
                                  "of_first": 0.25
                                }
                              ]
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The exploration doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The new `chart_type` can't show the queries or doesn't support the exploration's alerts, or the request sends queries for an exploration with a read-only query type, such as PQL or query builder, without switching every such query to a writable type. A `rum` exploration's new `source` variable picks a source that isn't given as its web events, or `product` changes to `rum` for an exploration that doesn't read web events only. Reported in `invalid_values.variables` or `invalid_values.product`, and nothing is changed. The `product` attribute changes for an exploration in a group, and `exploration_group_id` doesn't name a group in the new Explore, or `0` for none. Each exploration group belongs to one Explore. Reported in `invalid_values.exploration_group_id`, and nothing is changed. A funnel's chart type changes to anything but the other funnel chart type, a `funnel_query` is sent for an exploration that isn't a funnel, `variables` are sent for a funnel, or the changed funnel is refused as on create. Nothing is changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplorationUpdate"
              },
              "examples": {
                "update_an_exploration": {
                  "summary": "Update an exploration",
                  "value": {
                    "name": "Updated Error Rate Analysis",
                    "queries": [
                      {
                        "name": "Updated Query",
                        "query_type": "sql_expression",
                        "sql_query": "SELECT {{time}} AS time, sum(errors) AS value FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} GROUP BY time",
                        "source_variable": "source"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "A funnel accepts `name`, `chart`, `queries` with one `funnel_query`, the date range, `exploration_group_id` and `product`. A changed funnel is counted before it's saved, and counted again after a change to its range or chart type. The response has the same `funnel_preview` as creating one, or `null` when nothing was counted, such as after a rename.",
          "To change a funnel's steps, send `queries` with its one `funnel_query` and the full `steps` list, written as on create. Check each step's count in `meta.funnel_preview` afterwards."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_name",
          "exploration_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "date_range_from",
          "date_range_to",
          "exploration_group_id",
          "chart",
          "queries",
          "variables",
          "product",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.exploration.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v3/query": {
      "post": {
        "operationId": "query",
        "summary": "Run a SQL query over a source's logs, spans, metrics, web events, or exceptions and return the matching rows.",
        "description": "Use a Telemetry API token, a global API token with **Query API** access, or an OAuth sign-in. To write the SQL, follow the [Query API guide](/docs/logs/query-api/connect-remotely/).",
        "tags": [
          "query"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v3/query",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "The `notes` and `windows` keys appear only when there is something to say.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "query": {
                              "type": "string",
                              "description": "The query as run, before the `LIMIT` is added and template variables such as `{{source}}` and `{{time}}` are filled in. A trailing `;` or `FORMAT` clause is removed. In a query with template variables, `GLOBAL` is added before each `IN` or `JOIN` subquery, and this shows it. With `raw`, nothing is added.",
                              "examples": [
                                "SELECT dt, raw FROM {{source}} WHERE dt >= {{start_time}} AND dt < {{end_time}} ORDER BY dt DESC"
                              ]
                            },
                            "rows": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              },
                              "description": "Result rows, one object per row, keyed by selected column name.",
                              "examples": [
                                [
                                  {
                                    "dt": "2026-11-16T10:00:01Z",
                                    "raw": "{\"message\":\"Payment accepted\",\"level\":\"info\"}"
                                  }
                                ]
                              ]
                            },
                            "notes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Notes about the result, one sentence or paragraph each. The notes say the time range a template query covered, how a long range was read in windows and where to continue, which recent rows `s3Cluster` doesn't hold yet, and where `GLOBAL` was added. Absent when there's nothing to say.",
                              "examples": [
                                [
                                  "This range holds about 182,000,000 rows in S3, more than one request reads (50,000,000), so the query ran newest first, one time window at a time: the newest 1 of 4 windows (2026-11-16 07:41:00 → 2026-11-16 10:00:00 UTC) held its 500 rows (the `LIMIT`), so the older ones were not read.",
                                  "Time window: 2026-11-09 10:00:00 → 2026-11-16 10:00:00 UTC (7d)."
                                ]
                              ]
                            },
                            "windows": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "description": "`rows` when the newest rows were read window by window until the `LIMIT`, or `merge` when every window's aggregates were merged into one result."
                                },
                                "estimated_rows": {
                                  "type": "integer",
                                  "format": "int64",
                                  "description": "About how many rows the whole range holds in S3."
                                },
                                "read": {
                                  "type": "integer",
                                  "format": "int64",
                                  "description": "How many windows were read, newest first."
                                },
                                "total": {
                                  "type": "integer",
                                  "format": "int64",
                                  "description": "How many windows the range splits into."
                                },
                                "stopped_by": {
                                  "type": "string",
                                  "description": "Why reading stopped. `limit` means the `LIMIT` rows were found, and `range` that every window was read. `windows` means all 12 windows a request can read were read, and `time` that the 45 seconds a windowed read is allowed ran out. `oversized` means the next window holds more than 50,000,000 rows in a single second, so add filters for it. `groups` means the merged result would pass 10,000 rows, and `error` that the next window failed."
                                },
                                "start_time": {
                                  "type": "string",
                                  "description": "Start of the time range the result covers, as an ISO 8601 timestamp in UTC."
                                },
                                "end_time": {
                                  "type": "string",
                                  "description": "End of the time range the result covers, as an ISO 8601 timestamp in UTC."
                                },
                                "continue_end_time": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Where to continue when reading stopped early. Run the same query with this as `end_time` and the same `start_time`. `null` when the result covers the whole range or holds its `LIMIT` rows."
                                }
                              },
                              "description": "How the query was read in time windows, when its range held more rows in S3 than one request reads. Absent when the query ran in one go.",
                              "examples": [
                                {
                                  "kind": "rows",
                                  "estimated_rows": 182000000,
                                  "read": 1,
                                  "total": 4,
                                  "stopped_by": "limit",
                                  "start_time": "2026-11-16T07:41:00Z",
                                  "end_time": "2026-11-16T10:00:00Z",
                                  "continue_end_time": null
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Running a query needs the **Live tail** permission in your role, since a query reads the same data Live tail shows. A global API token also needs **Query API** access for the product. A read-only token can run queries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request is invalid, the query failed, or it would read too many rows to run in one request. `errors` says what to change. A query that's too big doesn't run, and `refusal` lists the time windows to run it in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_id": {
                    "type": "string",
                    "description": "ID of the source to query, as a string, such as `\"123456\"`. Get it via [List sources](/docs/logs/api/list-all-existing-sources/).",
                    "examples": [
                      "123456"
                    ]
                  },
                  "query": {
                    "type": "string",
                    "description": "SQL query to run, for example `SELECT dt, raw FROM {{source}}`, as in [dashboard SQL queries](/docs/logs/dashboards/sql-queries/). `{{source}}` reads the source's data of `source_type`. `{{start_time}}` and `{{end_time}}` are filled from `start_time` and `end_time`. `{{time}}` buckets `dt` into intervals that suit the range. `{{source_id}}` is the ID in `source_id`. A `LIMIT` is added to a query that has neither `LIMIT` nor `GROUP BY`, unless it's over metrics.",
                    "examples": [
                      "SELECT dt, raw FROM {{source}} WHERE dt >= {{start_time}} AND dt < {{end_time}} ORDER BY dt DESC"
                    ]
                  },
                  "source_type": {
                    "type": "string",
                    "enum": [
                      "logs",
                      "spans",
                      "metrics",
                      "web_events",
                      "exceptions"
                    ],
                    "description": "Which of the source's data to query. Defaults to the source's own type for logs, spans and metrics sources, and to logs otherwise, so name it to query web events or exceptions.",
                    "x-enum-descriptions": {
                      "logs": "The source's logs.",
                      "spans": "The source's spans.",
                      "metrics": "The source's metrics.",
                      "web_events": "Web events of an application with the JavaScript tag. Pass the application's ID as `source_id`. Accepts the same SQL as logs.",
                      "exceptions": "Exceptions of an Errors application. Pass the application's ID as `source_id`. Accepts the same SQL as logs."
                    },
                    "examples": [
                      "logs"
                    ]
                  },
                  "start_time": {
                    "type": "string",
                    "description": "Start of the query window. Accepts a relative time like `now-1h` or `now-2h45m`, an ISO 8601 timestamp, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. An ISO 8601 timestamp without a time zone is read as UTC. Defaults to `now-1h`.",
                    "examples": [
                      "now-3h"
                    ]
                  },
                  "end_time": {
                    "type": "string",
                    "description": "End of the query window, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`.",
                    "examples": [
                      "now"
                    ]
                  },
                  "limit": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Maximum rows to return, 1 to 1000. Defaults to 500. Applies only to a query that has neither `LIMIT` nor `GROUP BY`, and never to metrics.",
                    "examples": [
                      100
                    ]
                  },
                  "raw": {
                    "type": "boolean",
                    "description": "Run the query as written, in one request, with no size check before it runs, no refusal, no time windows and no `GLOBAL` added. A query over a long range then reads every row it asks for, until the time limit stops it. Defaults to false.",
                    "examples": [
                      false
                    ]
                  }
                },
                "required": [
                  "source_id",
                  "query"
                ]
              },
              "examples": {
                "query_logs": {
                  "summary": "Query logs",
                  "value": {
                    "source_id": "123456",
                    "query": "SELECT dt, raw FROM {{source}} WHERE dt >= {{start_time}} AND dt < {{end_time}} ORDER BY dt DESC",
                    "source_type": "logs",
                    "start_time": "now-3h",
                    "limit": 100
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "Writing large queries A query can read at most 50,000,000 rows of logs, spans, web events or exceptions. A bigger query is refused with `422` and doesn't run.",
          "Split a refused query yourself A refused query comes back with the time windows to run it in. The windows are in `refusal.windows`, newest first, and each window fits under the limit. Run the query once per window and merge the results.",
          "Queries that split automatically Two kinds of query never need splitting by hand. The Query API splits them into windows and runs them for you. Both kinds need the time filter written exactly as `dt >= {{start_time}} AND dt < {{end_time}}`.\n- **Newest rows.** A query with `ORDER BY dt DESC` and no grouping reads windows until it has its `LIMIT` rows.\n- **Counts and totals.** A query that only counts, sums or finds a minimum or maximum per group merges every window into one result.\nThe `windows` object in the response lists which windows were read.",
          "Retrying a failed query A query that timed out or hit a busy server can be run again. When that happens, the `errors` list in the response may suggest smaller time windows to run the query in instead.",
          "When a query is refused The `refusal` object in a `422` response says why the query was refused and how to run it.\n- `reason` is `too_many_rows` for a query over the row limit, or `top_level_or` when the time filter after `FROM {{source}}` sits inside an `OR`. A `top_level_or` refusal has no other fields. Keep the time filter outside the `OR` and put the `OR` in parentheses, as in `WHERE dt >= {{start_time}} AND dt < {{end_time}} AND (a OR b)`, then run the query again.\n- `windows` lists up to 200 time ranges that each fit, newest first. Each window has `start_time`, `end_time` and `estimated_rows`, plus `oversized` when a single second holds more rows than the limit. `more_windows` counts the older windows left out of the list.\n- `window_arguments` says whether to pass each window as the `start_time` and `end_time` arguments, or to put it into the query's own `dt` filter.\n- `estimated_rows` and `budget_rows` are the query's estimated size and the row limit.\n- `server_timezone` is the time zone the database reads a plain date and time in. Window times are always in UTC."
        ],
        "x-cli-default-action": true,
        "x-response-envelope": {
          "item_path": [
            "data",
            "attributes"
          ],
          "list_path": [
            "data",
            "attributes",
            "rows"
          ],
          "attributes_path": []
        }
      }
    },
    "/api/v4/charts/{id}": {
      "get": {
        "operationId": "get_by_id_dashboard_chart",
        "summary": "Get a chart by its ID alone.",
        "description": "The chart's `dashboard_id` says which dashboard it's on.",
        "tags": [
          "dashboard_chart"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v4/charts/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "ID of the chart.",
            "x-path-wildcard": false,
            "examples": {
              "get_a_chart_by_its_id": {
                "summary": "Get a chart by its ID",
                "value": "567"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "No chart with this ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v4/collectors": {
      "get": {
        "operationId": "list_collector",
        "summary": "List your Better Stack Collectors.",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/collectors",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Production"
              ]
            },
            "description": "Return only collectors whose name contains this text, ignoring case.",
            "examples": {
              "filter_by_name": {
                "summary": "Filter by name",
                "value": "Production"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of collector objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "status",
          "team_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "note",
          "data_region",
          "logs_retention",
          "metrics_retention",
          "ingesting_paused",
          "collector_logs_transformation",
          "collector_metrics_transformation",
          "collector_traces_transformation",
          "ingestion_logs_transformation",
          "ingestion_traces_transformation",
          "source_group_id",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "blocked_metrics",
          "user_vector_config",
          "configuration",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "secret",
          "status",
          "source_id",
          "installation_guide_url",
          "pinged_at",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_collector",
        "summary": "Create a collector that sends logs, metrics and traces from a host or cluster.",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/collectors",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single collector.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `platform` attribute isn't `docker`, `swarm` or `kubernetes`, the `data_region` isn't available, `configuration.when_full` is unsupported, a VRL program is invalid, the plan doesn't offer the retention, the plan doesn't include custom buckets or the bucket can't be reached, a token with access to more than one team didn't name a team, or another validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "429": {
            "description": "Too many sources are being created right now. Try again in a moment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectorCreate"
              },
              "examples": {
                "kubernetes_with_configuration": {
                  "summary": "Kubernetes with configuration",
                  "value": {
                    "name": "Configured K8s Collector",
                    "platform": "kubernetes",
                    "configuration": {
                      "components": {
                        "ebpf_metrics": true,
                        "logs_kubernetes": true,
                        "metrics_cluster": false
                      },
                      "when_full": "block",
                      "log_line_length_limit_kb": 64
                    },
                    "collector_logs_transformation": "del(.password)"
                  }
                },
                "docker": {
                  "summary": "Docker",
                  "value": {
                    "name": "My Docker Collector",
                    "platform": "docker",
                    "note": "For staging environment services."
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "You install the collector on your host with the command from the guide at `installation_guide_url`, using the collector's `secret`."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "status",
          "team_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "note",
          "data_region",
          "logs_retention",
          "metrics_retention",
          "ingesting_paused",
          "collector_logs_transformation",
          "collector_metrics_transformation",
          "collector_traces_transformation",
          "ingestion_logs_transformation",
          "ingestion_traces_transformation",
          "source_group_id",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "blocked_metrics",
          "user_vector_config",
          "configuration",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "secret",
          "status",
          "source_id",
          "installation_guide_url",
          "pinged_at",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/collectors/{id}": {
      "delete": {
        "operationId": "delete_collector",
        "summary": "Delete a collector permanently.",
        "description": "The collector's source and all its data are deleted shortly after. Data from hosts still running the collector is no longer accepted.",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/collectors/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_collector": {
                "summary": "Delete a collector",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_collector",
        "summary": "Get a collector's settings and the secret it authenticates with.",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/collectors/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_collector": {
                "summary": "Get a collector",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single collector.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "status",
          "team_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "note",
          "data_region",
          "logs_retention",
          "metrics_retention",
          "ingesting_paused",
          "collector_logs_transformation",
          "collector_metrics_transformation",
          "collector_traces_transformation",
          "ingestion_logs_transformation",
          "ingestion_traces_transformation",
          "source_group_id",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "blocked_metrics",
          "user_vector_config",
          "configuration",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "secret",
          "status",
          "source_id",
          "installation_guide_url",
          "pinged_at",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_collector",
        "summary": "Update a collector.",
        "description": "Send only the fields you want to change. Renaming a collector also renames its source group.",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/collectors/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_collector": {
                "summary": "Update a collector",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single collector.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectorDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `data_region` attribute was sent, `custom_bucket` held anything but a new `access_key_id` and `secret_access_key` pair, a VRL program or an entry in `connected_source_ids` or `service_fields` is invalid, the plan doesn't offer the retention, or another validation failed. `data_region` can't be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectorUpdate"
              },
              "examples": {
                "update_a_collector": {
                  "summary": "Update a collector",
                  "value": {
                    "note": "Staging services, sampled at 50% since November.",
                    "configuration": {
                      "components": {
                        "ebpf_metrics": false
                      },
                      "logs_sample_rate": 50
                    }
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "status",
          "team_id"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "note",
          "data_region",
          "logs_retention",
          "metrics_retention",
          "ingesting_paused",
          "collector_logs_transformation",
          "collector_metrics_transformation",
          "collector_traces_transformation",
          "ingestion_logs_transformation",
          "ingestion_traces_transformation",
          "source_group_id",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "blocked_metrics",
          "user_vector_config",
          "configuration",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "secret",
          "status",
          "source_id",
          "installation_guide_url",
          "pinged_at",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/collectors/{id}/databases": {
      "get": {
        "operationId": "databases_collector",
        "summary": "List the databases this collector scrapes.",
        "description": "Add, update or remove them via [Collector targets](/docs/logs/api/list-collector-metrics-targets/).",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/collectors/:id/databases",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_collector_databases": {
                "summary": "List collector databases",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "Returns every database in one page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "service_type": {
                            "type": "string",
                            "description": "The database type, one of `postgres`, `pgcat`, `pgbouncer`, `mysql`, `redis`, `mongodb`, `memcached` or `elasticsearch`.",
                            "examples": [
                              "postgres"
                            ]
                          },
                          "host": {
                            "type": "string",
                            "description": "Database host.",
                            "examples": [
                              "db1.example.com"
                            ]
                          },
                          "port": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Database port.",
                            "examples": [
                              5432
                            ]
                          },
                          "username": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The username the collector signs in to the database with.",
                            "examples": [
                              "betterstack_user"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "The connection status, one of `pending`, `up`, `unreachable`, `down`, `invalid_credentials`, `configuration_required`, `disabled` or `removed`.",
                            "examples": [
                              "up"
                            ]
                          },
                          "ssl_mode": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The SSL mode for PostgreSQL and its connection poolers, `disable`, `require` or `verify-ca`.",
                            "examples": [
                              "require"
                            ]
                          },
                          "tls": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The TLS mode for MySQL, `false`, `true`, `skip-verify` or `preferred`.",
                            "examples": [
                              "preferred"
                            ]
                          },
                          "service": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Service name.",
                            "examples": [
                              "db1"
                            ]
                          },
                          "container": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Detected container.",
                            "examples": [
                              "postgres"
                            ]
                          },
                          "autogenerated": {
                            "type": "boolean",
                            "description": "Whether the collector discovered the database itself. `false` for a database someone added.",
                            "examples": [
                              false
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "service_type",
          "host",
          "port",
          "status"
        ],
        "x-cli-response-fields": [
          "service_type",
          "host",
          "port",
          "username",
          "status",
          "ssl_mode",
          "tls",
          "service",
          "container",
          "autogenerated"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector.databases"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": []
        }
      }
    },
    "/api/v4/collectors/{id}/hosts": {
      "get": {
        "operationId": "hosts_collector",
        "summary": "List the hosts currently reporting to this collector.",
        "tags": [
          "collector"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/collectors/:id/hosts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_collector_hosts": {
                "summary": "List collector hosts",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "Returns every host in one page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "hostname": {
                            "type": "string",
                            "description": "Reported hostname.",
                            "examples": [
                              "k8s-node-1.example.com"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "The host's status, one of `pending`, `up`, `degraded`, `unknown` or `down`. A host is `down` when it hasn't checked in for a minute or reported an error.",
                            "examples": [
                              "up"
                            ]
                          },
                          "installed_as": {
                            "type": "string",
                            "description": "The platform the host reported, `docker`, `swarm` or `kubernetes`, or an empty string before it reports one.",
                            "examples": [
                              "kubernetes"
                            ]
                          },
                          "collector_version": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Version of the collector running on the host, or `null` before it first checks in.",
                            "examples": [
                              "0.1.0"
                            ]
                          },
                          "last_error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The error the host reported when it last checked in, an empty string when there was none, or `null` before it first checks in.",
                            "examples": [
                              ""
                            ]
                          },
                          "system_information": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "Kernel and eBPF compatibility details the host reported, such as `kernel_version`, `architecture`, `distribution` and `ebpf_supported`.",
                            "examples": [
                              {
                                "ebpf_supported": true,
                                "kernel_version": "6.1.0-18-amd64",
                                "architecture": "x86_64",
                                "distribution": "Debian GNU/Linux 12 (bookworm)"
                              }
                            ]
                          },
                          "first_pinged_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the host first checked in, or `null` before it does.",
                            "examples": [
                              "2023-10-26T10:01:00.000Z"
                            ]
                          },
                          "pinged_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the host last checked in, or `null` before its first check-in.",
                            "examples": [
                              "2023-10-27T10:05:00.000Z"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The collector doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "hostname",
          "status",
          "installed_as",
          "collector_version",
          "pinged_at"
        ],
        "x-cli-response-fields": [
          "hostname",
          "status",
          "installed_as",
          "collector_version",
          "last_error",
          "system_information",
          "first_pinged_at",
          "pinged_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.collector.hosts"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": []
        }
      }
    },
    "/api/v4/dashboards": {
      "get": {
        "operationId": "list_dashboard",
        "summary": "List your dashboards.",
        "description": "To see a dashboard's charts, sections and variables, use [Get a dashboard](/docs/logs/api/dashboards/get/).",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "-updated_at"
              ]
            },
            "description": "Sort by `created_at`, `updated_at` or `name`. Add a `-` prefix for descending order, such as `-name`. Defaults to the oldest dashboards first. Any other value is ignored."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Sample"
              ]
            },
            "description": "Full-text search over dashboard names."
          },
          {
            "name": "dashboard_group_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "789"
              ]
            },
            "description": "Only dashboards in this group."
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "telemetry",
                "rum"
              ],
              "x-enum-descriptions": {
                "telemetry": "A dashboard over logs, metrics and traces.",
                "rum": "A Real User Monitoring dashboard."
              },
              "examples": [
                "rum"
              ]
            },
            "description": "Only dashboards of this product. Leave it out to list both."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `product` parameter is neither `telemetry` nor `rum`. Reported in `invalid_values.product`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "With an OAuth token, the list doesn't include dashboards in resource groups the user's role can't read."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_dashboard",
        "summary": "Create a dashboard, optionally from a dashboard template, a source or both.",
        "description": "Add charts with [Create a dashboard chart](/docs/logs/api/charts/create/).",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/dashboards",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role can't change dashboards in the chosen group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` attribute is blank, and `invalid_values` names it. Give the dashboard a `name` with text in it. The `name` attribute is missing, an attribute is unknown, `dashboard_group_id` isn't a dashboard group, a value is invalid, or the token reaches several teams and none was picked. An unknown variable key is reported as `variables[0].<key>`. With `template_id`, `source_id` or `resource_group_name`, the request also fails when the template or source doesn't exist, when both `dashboard_group_id` and `resource_group_name` are sent, or when `variables` is sent, and nothing is created. `invalid_values` names the attribute. The `product` attribute is neither `telemetry` nor `rum`. Reported in `invalid_values.product`, and nothing is created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardCreate"
              },
              "examples": {
                "create_a_dashboard": {
                  "summary": "Create a dashboard",
                  "value": {
                    "name": "Checkout service",
                    "dashboard_group_id": 789,
                    "refresh_interval": 60,
                    "date_range_from": "now-1h",
                    "date_range_to": "now",
                    "variables": [
                      {
                        "name": "environment",
                        "variable_type": "string",
                        "values": [
                          "production"
                        ],
                        "default_values": [
                          "production"
                        ]
                      },
                      {
                        "name": "service",
                        "variable_type": "select_with_sql",
                        "sql_definition": "JSONExtractString(raw, 'service')",
                        "allow_multiple_values": true
                      }
                    ]
                  }
                },
                "from_the_postgresql_template_for_a_source": {
                  "summary": "From the PostgreSQL template for a source",
                  "value": {
                    "name": "Orders database",
                    "template_id": "612064",
                    "source_id": "67",
                    "resource_group_name": "Databases"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/import": {
      "post": {
        "operationId": "import_dashboard",
        "summary": "Import an exported dashboard as a new dashboard.",
        "description": "The new dashboard has the same charts, sections and variables.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/dashboards/import",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `product` attribute is neither `telemetry` nor `rum`. Reported in `invalid_values.product`, and nothing is created. The `data` attribute is missing, blank, not valid JSON, not an object or not an exported dashboard, reported in `invalid_values.data`. Also returned when neither `data` nor `name` gives a name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": true
                      },
                      {
                        "type": "string"
                      }
                    ],
                    "description": "The `data` that [Export a dashboard](/docs/logs/api/dashboards/export/) returns, as a JSON object or a JSON string.",
                    "examples": [
                      {
                        "name": "Better Stack Collector Dashboard",
                        "refresh_interval": 30,
                        "date_range_from": "now-3h",
                        "date_range_to": "now",
                        "source_eligibility_sql": null,
                        "preset": {
                          "preset_type": "implicit",
                          "preset_variables": [
                            {
                              "name": "service",
                              "variable_type": "select_value",
                              "values": [
                                "web"
                              ],
                              "default_values": [
                                "web",
                                "api"
                              ]
                            }
                          ]
                        },
                        "charts": [
                          {
                            "chart_type": "line_chart",
                            "name": "CPU Usage",
                            "x": 0,
                            "y": 0,
                            "w": 6,
                            "h": 4,
                            "settings": {
                              "unit": "percent",
                              "y_axis_scale": "linear"
                            },
                            "chart_queries": [
                              {
                                "query_type": "sql_expression",
                                "sql_query": "SELECT {{time}} as time, avg(cpu_usage) as value FROM metrics WHERE service = '{{service}}' GROUP BY time",
                                "source_variable": "source"
                              }
                            ],
                            "chart_alerts": []
                          }
                        ],
                        "sections": [
                          {
                            "name": "System Metrics",
                            "y": 0,
                            "collapsed": false
                          }
                        ]
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "description": "Name for the created dashboard. Overrides the name in the exported document, and is required when the document has none.",
                    "examples": [
                      "My Imported Dashboard"
                    ]
                  },
                  "product": {
                    "type": "string",
                    "enum": [
                      "telemetry",
                      "rum"
                    ],
                    "description": "The product the created dashboard belongs to. Defaults to `telemetry`.",
                    "x-enum-descriptions": {
                      "telemetry": "A dashboard over logs, metrics and traces.",
                      "rum": "A Real User Monitoring dashboard."
                    },
                    "examples": [
                      "rum"
                    ]
                  }
                },
                "required": [
                  "data"
                ]
              },
              "examples": {
                "with_literal_json": {
                  "summary": "With literal JSON",
                  "value": {
                    "name": "My Imported Dashboard",
                    "data": {
                      "refresh_interval": 60,
                      "date_range_from": "now-24h",
                      "date_range_to": "now",
                      "preset": {
                        "preset_type": "implicit",
                        "preset_variables": [
                          {
                            "name": "source",
                            "variable_type": "source",
                            "values": []
                          }
                        ]
                      },
                      "charts": [
                        {
                          "chart_type": "line_chart",
                          "name": "Logs by level",
                          "description": null,
                          "x": 0,
                          "y": 0,
                          "w": 6,
                          "h": 8,
                          "transform_with": "async (existingDataByQuery, newDataByQuery, completed) => {\n  return Object.keys(newDataByQuery).reduce((result, queryIndex) => {\n    result[queryIndex] = result[queryIndex].concat(newDataByQuery[queryIndex]);\n    return result;\n  }, existingDataByQuery);\n}\n",
                          "settings": {
                            "unit": "shortened",
                            "fresh": true,
                            "label": "shown_below",
                            "legend": "shown_below",
                            "stacking": "dont_stack",
                            "time_column": "time",
                            "x_axis_type": "time",
                            "y_axis_scale": "linear",
                            "series_colors": {
                              "level = info": "#55bfc1",
                              "level = error": "#c03a5a"
                            },
                            "series_column": "series",
                            "value_columns": [
                              "value"
                            ],
                            "decimal_places": 2,
                            "point_size_column": "size",
                            "treat_missing_values": "connected"
                          },
                          "chart_queries": [
                            {
                              "name": null,
                              "query_type": "query_builder",
                              "sql_query": "SELECT\n  {{time}} AS time,\n  countMerge(events_count) AS value,\n  'level = ' || COALESCE(level, 'null') AS series\nFROM {{source}}\nWHERE\n  dt BETWEEN {{start_time}} AND {{end_time}}\nGROUP BY\n  time,\n  level",
                              "where_condition": null,
                              "static_text": null,
                              "y_axis": [
                                {
                                  "name": "events",
                                  "type": "integer",
                                  "value": "events",
                                  "measure": "count"
                                }
                              ],
                              "filters": [],
                              "group_by": [
                                {
                                  "name": "level",
                                  "type": "string",
                                  "value": "level"
                                }
                              ],
                              "source_variable": null
                            }
                          ],
                          "chart_alerts": [
                            {
                              "name": "Spike in errors",
                              "alert_type": "relative",
                              "operator": "increases_by",
                              "value": 50.0,
                              "query_period": 3600,
                              "confirmation_period": 0,
                              "recovery_period": 7200,
                              "escalation_target": "current_team",
                              "name_autogenerated": false,
                              "aggregation_interval": 300,
                              "source_mode": "source_variable",
                              "source_platforms": [],
                              "metadata": {},
                              "check_period": 600,
                              "incident_per_series": false,
                              "shown_interval": 86400
                            }
                          ]
                        }
                      ],
                      "sections": []
                    }
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "The dashboard is created outside any group, with all its charts, sections and variables.",
          "Drag & drop, PromQL, PQL and funnel queries that have an `sql_query` are imported as SQL queries with that SQL, on every chart type that can run one. The imported charts then show what that SQL returns. A Log filtering query is imported with the SQL of its filter. A `tail_query_builder` query, which is a Log filtering query built with query blocks, is refused with a 422.",
          "When something changed on import, such as a query imported as SQL, the response has a `warnings` list of strings next to `data`."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/templates": {
      "get": {
        "operationId": "list_dashboard_template",
        "summary": "List the available dashboard templates with their categories.",
        "description": "Pass a template's ID as `template_id` when you create a dashboard, or get its full document with [Export a dashboard](/docs/logs/api/dashboards/export/).",
        "tags": [
          "dashboard_template"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/templates",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard_template objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardTemplateList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard template doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter other than `page` and `per_page` was sent. `invalid_attributes` lists it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Templates are sorted by name, with the blank dashboard first.",
          "Lists every published dashboard template. With an OAuth token, the user needs the dashboards permission in at least one team."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "description"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "description",
          "categories"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_template.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/charts": {
      "get": {
        "operationId": "list_dashboard_chart",
        "summary": "List a dashboard's charts.",
        "tags": [
          "dashboard_chart"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/charts",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_dashboard_charts": {
                "summary": "List dashboard charts",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard_chart objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every chart in one page."
        ],
        "x-cli-default-fields": [
          "id",
          "chart_type",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_type",
          "name",
          "description",
          "x",
          "y",
          "w",
          "h",
          "settings",
          "queries",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_dashboard_chart",
        "summary": "Add a chart to a dashboard.",
        "description": "Give it one SQL `query` or several `queries`. Use the `{{source}}`, `{{time}}`, `{{start_time}}` and `{{end_time}}` template variables in its SQL so the dashboard's filters apply. Filter `dt` with `{{start_time}}` and `{{end_time}}` to keep the query to the dashboard's time range, since `{{time}}` only groups timestamps into buckets.",
        "tags": [
          "dashboard_chart"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/dashboards/:dashboard_id/charts",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "create_a_dashboard_chart": {
                "summary": "Create a dashboard chart",
                "value": "1234"
              },
              "error_count_red_above_100": {
                "summary": "Error count, red above 100",
                "value": "1234"
              },
              "runbook_link_as_text": {
                "summary": "Runbook link as text",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single dashboard_chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "With `query`, `chart_type` is missing, the `chart_type` can't be made from a query, the query's `FROM` names no source, a `source` variable the dashboard doesn't define or more than one source, or `queries`, `x` or `y` was also sent. `invalid_values` names the attribute. The `section` attribute was sent with `x` or `y`, or `section`, `query` or `chart_type` isn't a string. With `queries`, `chart_type` or `queries` is missing, `chart_type` names no known type, a query's `query_type` can't be written or doesn't fit this `chart_type`, no query was given for a chart other than `static_text_chart`, more than one query was given for a chart other than `line_chart`, an attribute is unknown, or `variables` was sent. An unknown query key is reported as `queries[0].<key>`. Variables belong to the dashboard, not the chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardChartCreate"
              },
              "examples": {
                "create_a_dashboard_chart": {
                  "summary": "Create a dashboard chart",
                  "value": {
                    "chart_type": "line_chart",
                    "name": "Log volume",
                    "x": 0,
                    "y": 4,
                    "queries": [
                      {
                        "query_type": "sql_expression",
                        "sql_query": "SELECT {{time}} as time, count(*) as value FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} GROUP BY time"
                      }
                    ]
                  }
                },
                "error_count_red_above_100": {
                  "summary": "Error count, red above 100",
                  "value": {
                    "chart_type": "number_chart",
                    "name": "Errors",
                    "w": 3,
                    "settings": {
                      "color_mode": "high_red",
                      "color_upper_threshold": 100,
                      "color_lower_threshold": 10
                    },
                    "queries": [
                      {
                        "query_type": "sql_expression",
                        "sql_query": "SELECT count(*) AS value FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} AND JSONExtract(raw, 'level', 'Nullable(String)') = 'error'"
                      }
                    ]
                  }
                },
                "runbook_link_as_text": {
                  "summary": "Runbook link as text",
                  "value": {
                    "chart_type": "static_text_chart",
                    "name": "Runbook",
                    "x": 0,
                    "y": 0,
                    "w": 12,
                    "h": 2,
                    "queries": [
                      {
                        "query_type": "static_text",
                        "static_text": "On call? Start with the [checkout runbook](https://wiki.example.com/runbooks/checkout)."
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "When the new chart overlaps other charts, the response has a `warnings` list of strings next to `data`.",
          "When the new chart overlaps other charts or sections, the dashboard rearranges its layout so nothing overlaps, about 5 minutes later.",
          "With `query`, the chart can be a `line_chart`, `bar_chart`, `number_chart`, `table_chart`, `pie_chart`, `heatmap_chart`, `scatter_chart`, `gauge_chart`, `map_chart`, `hierarchy_chart` or `static_text_chart`. `w` defaults to 6 and is kept between 1 and 12. `h` defaults to 8 and is kept between 1 and 20.",
          "The dashboard's version before the chart is added is kept, so the change can be rolled back."
        ],
        "x-cli-default-fields": [
          "id",
          "chart_type",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_type",
          "name",
          "description",
          "x",
          "y",
          "w",
          "h",
          "settings",
          "queries",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/charts/{chart_id}/alerts": {
      "get": {
        "operationId": "list_on_chart_alert",
        "summary": "List the alerts on one dashboard chart.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/charts/:chart_id/alerts",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123"
              ]
            },
            "description": "Dashboard the chart is on.",
            "x-path-wildcard": false
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "456"
              ]
            },
            "description": "Chart whose alerts are listed.",
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of alert objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every alert in one page."
        ]
      },
      "post": {
        "operationId": "create_on_chart_alert",
        "summary": "Create an alert on a chart.",
        "description": "The chart must be a line, bar, tail or table chart.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "POST /api/v4/dashboards/:dashboard_id/charts/:chart_id/alerts",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Sending `call`, `sms`, `push` or `critical_alert` as `true` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved. The `name` or `alert_type` attribute is missing, or `operator` is missing for a threshold or relative alert. Listed in `required_attributes`. The chart's type doesn't support alerts, a threshold or relative alert has neither `value` nor `string_value` or has no `check_period`, `series_names` and `series_names_except` were both sent, or `escalation_target`, `metadata` or `variable_values` is invalid. Listed in `invalid_values`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
                    "examples": [
                      "High Error Rate"
                    ]
                  },
                  "alert_type": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "relative",
                      "anomaly_rrcf"
                    ],
                    "description": "Alert type. An update can change it.",
                    "x-enum-descriptions": {
                      "threshold": "Fires when the value crosses a threshold.",
                      "relative": "Compares the value with the previous period as a percentage change.",
                      "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                    },
                    "examples": [
                      "threshold"
                    ]
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "equal",
                      "not_equal",
                      "higher_than",
                      "higher_than_or_equal",
                      "lower_than",
                      "lower_than_or_equal",
                      "increases_by",
                      "decreases_by",
                      "changes_by"
                    ],
                    "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
                    "x-enum-descriptions": {
                      "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                      "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                      "higher_than": "A `threshold` alert fires when the value is above `value`.",
                      "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                      "lower_than": "A `threshold` alert fires when the value is below `value`.",
                      "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                      "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                      "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                      "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                    },
                    "examples": [
                      "higher_than"
                    ]
                  },
                  "value": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
                    "examples": [
                      100.0
                    ]
                  },
                  "string_value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
                    "examples": [
                      "error"
                    ]
                  },
                  "paused": {
                    "type": "boolean",
                    "description": "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored.",
                    "default": false,
                    "examples": [
                      true
                    ]
                  },
                  "query_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60.",
                    "examples": [
                      600
                    ]
                  },
                  "confirmation_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
                    "default": 60,
                    "examples": [
                      120
                    ]
                  },
                  "recovery_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
                    "default": 60,
                    "examples": [
                      60
                    ]
                  },
                  "aggregation_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60.",
                    "examples": [
                      300
                    ]
                  },
                  "check_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert.",
                    "examples": [
                      300
                    ]
                  },
                  "series_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both.",
                    "examples": [
                      [
                        "error"
                      ]
                    ]
                  },
                  "series_names_except": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both.",
                    "examples": [
                      []
                    ]
                  },
                  "source_variable": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
                    "examples": [
                      "source:t123456_my_app"
                    ]
                  },
                  "source_mode": {
                    "type": "string",
                    "enum": [
                      "source_variable",
                      "platforms_single_source",
                      "platforms_all_sources"
                    ],
                    "description": "How the alert picks its sources.",
                    "x-enum-descriptions": {
                      "source_variable": "Runs on the sources in `source_variable`.",
                      "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                      "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                    },
                    "default": "source_variable",
                    "examples": [
                      "source_variable"
                    ]
                  },
                  "source_platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
                    "default": [],
                    "examples": [
                      [
                        "kubernetes"
                      ]
                    ]
                  },
                  "escalation_target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "policy_id": {
                            "type": "string",
                            "description": "Escalation policy ID."
                          },
                          "policy_name": {
                            "type": "string",
                            "description": "Escalation policy name."
                          },
                          "team_id": {
                            "type": "string",
                            "pattern": "^t[1-9][0-9]*$",
                            "description": "Team ID, such as `t123`."
                          },
                          "team_name": {
                            "type": "string",
                            "description": "Team name.",
                            "readOnly": true
                          }
                        }
                      },
                      {
                        "type": "string",
                        "enum": [
                          "current_team",
                          "unknown"
                        ]
                      }
                    ],
                    "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
                    "default": "current_team",
                    "examples": [
                      {
                        "policy_id": "456",
                        "policy_name": "Critical Policy"
                      }
                    ]
                  },
                  "incident_cause": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
                    "examples": [
                      "Error rate exceeded {{current_value}}"
                    ]
                  },
                  "incident_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
                    "examples": [
                      "High error rate on Checkout API"
                    ]
                  },
                  "incident_per_series": {
                    "type": "boolean",
                    "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
                    "default": false,
                    "examples": [
                      false
                    ]
                  },
                  "additional_conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alert_type": {
                          "type": "string",
                          "description": "The type of the condition, `threshold` or `relative`."
                        },
                        "operator": {
                          "type": "string",
                          "description": "The comparison the condition makes, from the same values as `operator`."
                        },
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Threshold value. `null` when the condition compares `string_value`."
                        },
                        "string_value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Threshold value for a string series. `null` when the condition compares `value`."
                        },
                        "series_names": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition is limited to. An empty list means every series."
                        },
                        "series_names_except": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition ignores while it watches every other series."
                        }
                      }
                    },
                    "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
                    "examples": [
                      [
                        {
                          "alert_type": "relative",
                          "operator": "increases_by",
                          "value": 10
                        }
                      ]
                    ]
                  },
                  "variable_values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of a variable on the alert's dashboard or exploration."
                        },
                        "selected_label": {
                          "type": "string",
                          "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The values the alert uses for the variable, as strings."
                        }
                      }
                    },
                    "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
                    "examples": [
                      [
                        {
                          "name": "environment",
                          "selected_label": "production",
                          "values": [
                            "production"
                          ]
                        }
                      ]
                    ]
                  },
                  "on_missing_data": {
                    "type": "string",
                    "enum": [
                      "treat_as_zero",
                      "dont_fire",
                      "treat_as_previous",
                      "start_incident"
                    ],
                    "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
                    "x-enum-descriptions": {
                      "treat_as_zero": "Checks the missing data as if the value were 0.",
                      "dont_fire": "Starts no incident for missing data.",
                      "treat_as_previous": "Checks the missing data as if it had the previous value.",
                      "start_incident": "Starts an incident when the query returns no data."
                    },
                    "examples": [
                      "dont_fire"
                    ]
                  },
                  "anomaly_sensitivity": {
                    "type": "number",
                    "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
                    "examples": [
                      5.0
                    ]
                  },
                  "anomaly_trigger": {
                    "type": "string",
                    "enum": [
                      "any",
                      "higher",
                      "lower"
                    ],
                    "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "x-enum-descriptions": {
                      "any": "Fires on values above or below the prediction.",
                      "higher": "Fires on values above the prediction.",
                      "lower": "Fires on values below the prediction."
                    },
                    "examples": [
                      "any"
                    ]
                  },
                  "shown_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.",
                    "examples": [
                      300
                    ]
                  },
                  "anomaly_training_range_days": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "examples": [
                      7
                    ]
                  },
                  "call": {
                    "type": "boolean",
                    "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "sms": {
                    "type": "boolean",
                    "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "email": {
                    "type": "boolean",
                    "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
                    "examples": [
                      true
                    ]
                  },
                  "push": {
                    "type": "boolean",
                    "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "critical_alert": {
                    "type": "boolean",
                    "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "metadata": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`.",
                    "examples": [
                      {
                        "runbook": [
                          "https://wiki.example.com/runbook"
                        ],
                        "env": [
                          "production"
                        ]
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "alert_type"
                ],
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "threshold",
                            "relative"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": {
                          "default": "dont_fire"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "threshold",
                              "relative"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": false
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "anomaly_rrcf"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": {
                          "default": 5.0
                        },
                        "anomaly_trigger": {
                          "default": "any"
                        },
                        "anomaly_training_range_days": {
                          "default": 7
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "anomaly_rrcf"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": false,
                        "anomaly_trigger": false,
                        "anomaly_training_range_days": false
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/charts/{chart_id}/alerts/{id}": {
      "delete": {
        "operationId": "delete_on_chart_alert",
        "summary": "Delete an alert of a dashboard chart permanently, along with its anomaly model.",
        "description": "The alert's open incidents are resolved.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "DELETE /api/v4/dashboards/:dashboard_id/charts/:chart_id/alerts/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_on_chart_alert",
        "summary": "Get one alert on a dashboard chart.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/charts/:chart_id/alerts/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_on_chart_alert",
        "summary": "Update an alert on a dashboard chart.",
        "description": "Send only the settings you want to change.",
        "tags": [
          "alert"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "PATCH /api/v4/dashboards/:dashboard_id/charts/:chart_id/alerts/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single alert.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The alert doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Switching on `call`, `sms`, `push` or `critical_alert` needs a plan that includes that channel. `errors` lists what the plan doesn't include and `invalid_attributes` names the attributes. Nothing is saved. Re-sending a channel the alert already has always works.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
                    "examples": [
                      "High Error Rate"
                    ]
                  },
                  "alert_type": {
                    "type": "string",
                    "enum": [
                      "threshold",
                      "relative",
                      "anomaly_rrcf"
                    ],
                    "description": "Alert type. An update can change it.",
                    "x-enum-descriptions": {
                      "threshold": "Fires when the value crosses a threshold.",
                      "relative": "Compares the value with the previous period as a percentage change.",
                      "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                    },
                    "examples": [
                      "threshold"
                    ]
                  },
                  "operator": {
                    "type": "string",
                    "enum": [
                      "equal",
                      "not_equal",
                      "higher_than",
                      "higher_than_or_equal",
                      "lower_than",
                      "lower_than_or_equal",
                      "increases_by",
                      "decreases_by",
                      "changes_by"
                    ],
                    "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
                    "x-enum-descriptions": {
                      "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                      "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                      "higher_than": "A `threshold` alert fires when the value is above `value`.",
                      "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                      "lower_than": "A `threshold` alert fires when the value is below `value`.",
                      "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                      "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                      "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                      "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                    },
                    "examples": [
                      "higher_than"
                    ]
                  },
                  "value": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
                    "examples": [
                      100.0
                    ]
                  },
                  "string_value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
                    "examples": [
                      "error"
                    ]
                  },
                  "paused": {
                    "type": "boolean",
                    "description": "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored.",
                    "default": false,
                    "examples": [
                      true
                    ]
                  },
                  "query_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60.",
                    "examples": [
                      600
                    ]
                  },
                  "confirmation_period": {
                    "type": "integer",
                    "format": "int64",
                    "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
                    "default": 60,
                    "examples": [
                      120
                    ]
                  },
                  "recovery_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
                    "default": 60,
                    "examples": [
                      60
                    ]
                  },
                  "aggregation_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60.",
                    "examples": [
                      300
                    ]
                  },
                  "check_period": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert.",
                    "examples": [
                      300
                    ]
                  },
                  "series_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both.",
                    "examples": [
                      [
                        "error"
                      ]
                    ]
                  },
                  "series_names_except": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both.",
                    "examples": [
                      []
                    ]
                  },
                  "source_variable": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
                    "examples": [
                      "source:t123456_my_app"
                    ]
                  },
                  "source_mode": {
                    "type": "string",
                    "enum": [
                      "source_variable",
                      "platforms_single_source",
                      "platforms_all_sources"
                    ],
                    "description": "How the alert picks its sources.",
                    "x-enum-descriptions": {
                      "source_variable": "Runs on the sources in `source_variable`.",
                      "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                      "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                    },
                    "default": "source_variable",
                    "examples": [
                      "source_variable"
                    ]
                  },
                  "source_platforms": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
                    "default": [],
                    "examples": [
                      [
                        "kubernetes"
                      ]
                    ]
                  },
                  "escalation_target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "policy_id": {
                            "type": "string",
                            "description": "Escalation policy ID."
                          },
                          "policy_name": {
                            "type": "string",
                            "description": "Escalation policy name."
                          },
                          "team_id": {
                            "type": "string",
                            "pattern": "^t[1-9][0-9]*$",
                            "description": "Team ID, such as `t123`."
                          },
                          "team_name": {
                            "type": "string",
                            "description": "Team name.",
                            "readOnly": true
                          }
                        }
                      },
                      {
                        "type": "string",
                        "enum": [
                          "current_team",
                          "unknown"
                        ]
                      }
                    ],
                    "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
                    "default": "current_team",
                    "examples": [
                      {
                        "policy_id": "456",
                        "policy_name": "Critical Policy"
                      }
                    ]
                  },
                  "incident_cause": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
                    "examples": [
                      "Error rate exceeded {{current_value}}"
                    ]
                  },
                  "incident_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
                    "examples": [
                      "High error rate on Checkout API"
                    ]
                  },
                  "incident_per_series": {
                    "type": "boolean",
                    "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
                    "default": false,
                    "examples": [
                      false
                    ]
                  },
                  "additional_conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "alert_type": {
                          "type": "string",
                          "description": "The type of the condition, `threshold` or `relative`."
                        },
                        "operator": {
                          "type": "string",
                          "description": "The comparison the condition makes, from the same values as `operator`."
                        },
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Threshold value. `null` when the condition compares `string_value`."
                        },
                        "string_value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Threshold value for a string series. `null` when the condition compares `value`."
                        },
                        "series_names": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition is limited to. An empty list means every series."
                        },
                        "series_names_except": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The series the condition ignores while it watches every other series."
                        }
                      }
                    },
                    "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
                    "examples": [
                      [
                        {
                          "alert_type": "relative",
                          "operator": "increases_by",
                          "value": 10
                        }
                      ]
                    ]
                  },
                  "variable_values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The name of a variable on the alert's dashboard or exploration."
                        },
                        "selected_label": {
                          "type": "string",
                          "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The values the alert uses for the variable, as strings."
                        }
                      }
                    },
                    "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
                    "examples": [
                      [
                        {
                          "name": "environment",
                          "selected_label": "production",
                          "values": [
                            "production"
                          ]
                        }
                      ]
                    ]
                  },
                  "on_missing_data": {
                    "type": "string",
                    "enum": [
                      "treat_as_zero",
                      "dont_fire",
                      "treat_as_previous",
                      "start_incident"
                    ],
                    "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
                    "x-enum-descriptions": {
                      "treat_as_zero": "Checks the missing data as if the value were 0.",
                      "dont_fire": "Starts no incident for missing data.",
                      "treat_as_previous": "Checks the missing data as if it had the previous value.",
                      "start_incident": "Starts an incident when the query returns no data."
                    },
                    "examples": [
                      "dont_fire"
                    ]
                  },
                  "anomaly_sensitivity": {
                    "type": "number",
                    "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
                    "examples": [
                      5.0
                    ]
                  },
                  "anomaly_trigger": {
                    "type": "string",
                    "enum": [
                      "any",
                      "higher",
                      "lower"
                    ],
                    "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "x-enum-descriptions": {
                      "any": "Fires on values above or below the prediction.",
                      "higher": "Fires on values above the prediction.",
                      "lower": "Fires on values below the prediction."
                    },
                    "examples": [
                      "any"
                    ]
                  },
                  "shown_interval": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "format": "int64",
                    "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.",
                    "examples": [
                      300
                    ]
                  },
                  "anomaly_training_range_days": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                    "examples": [
                      7
                    ]
                  },
                  "call": {
                    "type": "boolean",
                    "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "sms": {
                    "type": "boolean",
                    "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "email": {
                    "type": "boolean",
                    "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
                    "examples": [
                      true
                    ]
                  },
                  "push": {
                    "type": "boolean",
                    "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
                    "examples": [
                      true
                    ]
                  },
                  "critical_alert": {
                    "type": "boolean",
                    "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
                    "examples": [
                      false
                    ]
                  },
                  "metadata": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`.",
                    "examples": [
                      {
                        "runbook": [
                          "https://wiki.example.com/runbook"
                        ],
                        "env": [
                          "production"
                        ]
                      }
                    ]
                  }
                },
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "threshold",
                            "relative"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": {
                          "default": "dont_fire"
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "threshold",
                              "relative"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "on_missing_data": false
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "enum": [
                            "anomaly_rrcf"
                          ]
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": {
                          "default": 5.0
                        },
                        "anomaly_trigger": {
                          "default": "any"
                        },
                        "anomaly_training_range_days": {
                          "default": 7
                        }
                      }
                    }
                  },
                  {
                    "if": {
                      "properties": {
                        "alert_type": {
                          "not": {
                            "enum": [
                              "anomaly_rrcf"
                            ]
                          }
                        }
                      },
                      "required": [
                        "alert_type"
                      ]
                    },
                    "then": {
                      "properties": {
                        "anomaly_sensitivity": false,
                        "anomaly_trigger": false,
                        "anomaly_training_range_days": false
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/charts/{chart_id}/comments": {
      "get": {
        "operationId": "list_dashboard_chart_comment",
        "summary": "List the comments on a dashboard chart, in the order they appear on its time axis.",
        "tags": [
          "dashboard_chart_comment"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/charts/:chart_id/comments",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1712"
              ]
            },
            "description": "Dashboard the chart is on. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
            "x-path-wildcard": false,
            "examples": {
              "list_chart_comments": {
                "summary": "List chart comments",
                "value": "1234"
              }
            }
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "Chart the comment is on. Get the IDs via [List charts](/docs/logs/api/charts/list/).",
            "x-path-wildcard": false,
            "examples": {
              "list_chart_comments": {
                "summary": "List chart comments",
                "value": "18718"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard_chart_comment objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartCommentList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard or chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "dt",
          "plaintext_content",
          "user_email"
        ],
        "x-cli-name-fields": [
          "plaintext_content"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_id",
          "dt",
          "content",
          "plaintext_content",
          "user_email",
          "api_authored",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart_comment.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_dashboard_chart_comment",
        "summary": "Pin a comment to a point in time on a dashboard chart.",
        "description": "Only line charts can have comments.",
        "tags": [
          "dashboard_chart_comment"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/dashboards/:dashboard_id/charts/:chart_id/comments",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1712"
              ]
            },
            "description": "Dashboard the chart is on. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
            "x-path-wildcard": false,
            "examples": {
              "create_a_chart_comment": {
                "summary": "Create a chart comment",
                "value": "1234"
              }
            }
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "Chart the comment is on. Get the IDs via [List charts](/docs/logs/api/charts/list/).",
            "x-path-wildcard": false,
            "examples": {
              "create_a_chart_comment": {
                "summary": "Create a chart comment",
                "value": "18718"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single dashboard_chart_comment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartCommentDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard or chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `dt` or `content` attribute is missing, and `required_attributes` names it. The request is also refused when `dt` isn't a datetime, when `user_email` or a mention in `content` isn't a member of the dashboard's team or isn't given as a `u123` ID or e-mail, or when the chart isn't a line chart. `invalid_values` then names the attribute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Point on the chart's time axis to pin the comment to. A time without a zone is read as UTC.",
                    "examples": [
                      "2026-08-17T12:34:56.789Z"
                    ]
                  },
                  "content": {
                    "type": "string",
                    "description": "Comment text, in Markdown. To mention a team member, include `**M_START**{\"id\":\"u123\"}**M_END**`, with their user ID or e-mail as `id`. Get the user ID via [List team members](/docs/uptime/api/team-members/list/).",
                    "examples": [
                      "Deployed v2.4.0"
                    ]
                  },
                  "user_email": {
                    "type": "string",
                    "description": "Team member to mention at the start of the comment, as their e-mail or user ID, such as `u123`. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). The member must belong to the dashboard's team.",
                    "examples": [
                      "jane@example.com"
                    ]
                  }
                },
                "required": [
                  "dt",
                  "content"
                ]
              },
              "examples": {
                "create_a_chart_comment": {
                  "summary": "Create a chart comment",
                  "value": {
                    "dt": "2026-08-17T12:34:56.789Z",
                    "content": "Deployed v2.1.0",
                    "user_email": "sarah@example.com"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "With an API token, the comment is signed `Comment added using API`. With an OAuth token, the comment is the user's own."
        ],
        "x-cli-default-fields": [
          "id",
          "dt",
          "plaintext_content",
          "user_email"
        ],
        "x-cli-name-fields": [
          "plaintext_content"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_id",
          "dt",
          "content",
          "plaintext_content",
          "user_email",
          "api_authored",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart_comment.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/charts/{chart_id}/comments/{id}": {
      "delete": {
        "operationId": "delete_dashboard_chart_comment",
        "summary": "Delete a comment from a dashboard chart permanently.",
        "tags": [
          "dashboard_chart_comment"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/dashboards/:dashboard_id/charts/:chart_id/comments/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1712"
              ]
            },
            "description": "Dashboard the chart is on. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
            "x-path-wildcard": false,
            "examples": {
              "delete_a_chart_comment": {
                "summary": "Delete a chart comment",
                "value": "1234"
              }
            }
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "Chart the comment is on. Get the IDs via [List charts](/docs/logs/api/charts/list/).",
            "x-path-wildcard": false,
            "examples": {
              "delete_a_chart_comment": {
                "summary": "Delete a chart comment",
                "value": "18718"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_chart_comment": {
                "summary": "Delete a chart comment",
                "value": "1441"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The comment wasn't written through the API or, with an OAuth token, by that user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard chart comment doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_dashboard_chart_comment",
        "summary": "Get one comment on a dashboard chart, with its text and author.",
        "tags": [
          "dashboard_chart_comment"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/charts/:chart_id/comments/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1712"
              ]
            },
            "description": "Dashboard the chart is on. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
            "x-path-wildcard": false,
            "examples": {
              "get_a_chart_comment": {
                "summary": "Get a chart comment",
                "value": "1234"
              }
            }
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "Chart the comment is on. Get the IDs via [List charts](/docs/logs/api/charts/list/).",
            "x-path-wildcard": false,
            "examples": {
              "get_a_chart_comment": {
                "summary": "Get a chart comment",
                "value": "18718"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_chart_comment": {
                "summary": "Get a chart comment",
                "value": "1441"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_chart_comment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartCommentDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard chart comment doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "dt",
          "plaintext_content",
          "user_email"
        ],
        "x-cli-name-fields": [
          "plaintext_content"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_id",
          "dt",
          "content",
          "plaintext_content",
          "user_email",
          "api_authored",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart_comment.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_dashboard_chart_comment",
        "summary": "Update a comment's text or move it to another point in time.",
        "description": "Send `content` with its mention markup to keep a mention.",
        "tags": [
          "dashboard_chart_comment"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/dashboards/:dashboard_id/charts/:chart_id/comments/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1712"
              ]
            },
            "description": "Dashboard the chart is on. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
            "x-path-wildcard": false,
            "examples": {
              "update_a_chart_comment": {
                "summary": "Update a chart comment",
                "value": "1234"
              }
            }
          },
          {
            "name": "chart_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "Chart the comment is on. Get the IDs via [List charts](/docs/logs/api/charts/list/).",
            "x-path-wildcard": false,
            "examples": {
              "update_a_chart_comment": {
                "summary": "Update a chart comment",
                "value": "18718"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_chart_comment": {
                "summary": "Update a chart comment",
                "value": "1441"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_chart_comment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartCommentDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The comment wasn't written through the API or, with an OAuth token, by that user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard chart comment doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `dt` attribute isn't a datetime, a mention in `content` isn't a member of the dashboard's team or isn't named by a `u123` ID or e-mail, or an attribute other than `dt` and `content` was sent. `invalid_values` or `invalid_attributes` names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardChartCommentUpdate"
              },
              "examples": {
                "update_a_chart_comment": {
                  "summary": "Update a chart comment",
                  "value": {
                    "content": "Deployed v2.1.1",
                    "dt": "2026-08-17T13:00:00Z"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "dt",
          "plaintext_content",
          "user_email"
        ],
        "x-cli-name-fields": [
          "plaintext_content"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_id",
          "dt",
          "content",
          "plaintext_content",
          "user_email",
          "api_authored",
          "created_at",
          "updated_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart_comment.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/charts/{id}": {
      "delete": {
        "operationId": "delete_dashboard_chart",
        "summary": "Remove a chart from its dashboard, along with any alerts attached to it.",
        "description": "The dashboard's version before the removal is kept, so the chart can be brought back by rolling back the dashboard.",
        "tags": [
          "dashboard_chart"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/dashboards/:dashboard_id/charts/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_dashboard_chart": {
                "summary": "Delete a dashboard chart",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_dashboard_chart": {
                "summary": "Delete a dashboard chart",
                "value": "567"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_dashboard_chart",
        "summary": "Get a chart with its queries and settings.",
        "tags": [
          "dashboard_chart"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/charts/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_dashboard_chart": {
                "summary": "Get a dashboard chart",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_dashboard_chart": {
                "summary": "Get a dashboard chart",
                "value": "567"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "chart_type",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_type",
          "name",
          "description",
          "x",
          "y",
          "w",
          "h",
          "settings",
          "queries",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_dashboard_chart",
        "summary": "Update a chart.",
        "description": "Send one SQL `query` to replace the chart's queries with it.",
        "tags": [
          "dashboard_chart"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/dashboards/:dashboard_id/charts/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_dashboard_chart": {
                "summary": "Update a dashboard chart",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_dashboard_chart": {
                "summary": "Update a dashboard chart",
                "value": "567"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_chart.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardChartDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard chart doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The new `chart_type` doesn't work with the chart's existing queries or alerts, or a value is invalid. Send new `queries` with the new type, and delete the chart's alerts first or pick a type they work on. With `query`, the query is empty or its `FROM` names no source, the `chart_type` can't run it, `queries` was also sent, or the new place or size would overlap another chart or leave the grid. Nothing is changed. `invalid_values` names the attribute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardChartUpdate"
              },
              "examples": {
                "update_a_dashboard_chart": {
                  "summary": "Update a dashboard chart",
                  "value": {
                    "name": "Updated Chart Name",
                    "x": 6,
                    "y": 0,
                    "queries": [
                      {
                        "query_type": "sql_expression",
                        "sql_query": "SELECT {{time}}, sum(value) FROM metrics GROUP BY time"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "The `warnings` key is in this response only when `x`, `y`, `w` or `h` was sent without `query`.",
          "With `query`, a new place or size is checked against the other charts first, and charts then move up to fill any gaps. Leave out `query` to get a warning when charts overlap."
        ],
        "x-cli-default-fields": [
          "id",
          "chart_type",
          "name"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "chart_type",
          "name",
          "description",
          "x",
          "y",
          "w",
          "h",
          "settings",
          "queries",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_chart.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/sections": {
      "get": {
        "operationId": "list_dashboard_section",
        "summary": "List a dashboard's sections.",
        "tags": [
          "dashboard_section"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/sections",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "list_dashboard_sections": {
                "summary": "List dashboard sections",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard_section objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardSectionList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every section in one page."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "y",
          "collapsed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "y",
          "collapsed",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_section.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_dashboard_section",
        "summary": "Add a full-width section divider to a dashboard.",
        "description": "Charts and sections at or below the insertion point shift down to make room.",
        "tags": [
          "dashboard_section"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/dashboards/:dashboard_id/sections",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "create_a_dashboard_section": {
                "summary": "Create a dashboard section",
                "value": "1234"
              },
              "collapsed_below_the_last_chart": {
                "summary": "Collapsed below the last chart",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single dashboard_section.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardSectionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` attribute is missing, an attribute is unknown, or a value failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardSectionCreate"
              },
              "examples": {
                "create_a_dashboard_section": {
                  "summary": "Create a dashboard section",
                  "value": {
                    "name": "Errors",
                    "y": 10
                  }
                },
                "collapsed_below_the_last_chart": {
                  "summary": "Collapsed below the last chart",
                  "value": {
                    "name": "Background jobs",
                    "collapsed": true
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "When the new section overlaps charts or other sections, the response has a `warnings` list of strings next to `data`."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "y",
          "collapsed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "y",
          "collapsed",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_section.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{dashboard_id}/sections/{id}": {
      "delete": {
        "operationId": "delete_dashboard_section",
        "summary": "Remove a section from a dashboard.",
        "description": "The charts under it stay where they are.",
        "tags": [
          "dashboard_section"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/dashboards/:dashboard_id/sections/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_dashboard_section": {
                "summary": "Delete a dashboard section",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_dashboard_section": {
                "summary": "Delete a dashboard section",
                "value": "890"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard section doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_dashboard_section",
        "summary": "Get a dashboard section, the heading that groups charts on a dashboard.",
        "tags": [
          "dashboard_section"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:dashboard_id/sections/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_dashboard_section": {
                "summary": "Get a dashboard section",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_dashboard_section": {
                "summary": "Get a dashboard section",
                "value": "890"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_section.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardSectionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard section doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "y",
          "collapsed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "y",
          "collapsed",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_section.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_dashboard_section",
        "summary": "Rename, move, or collapse a dashboard section.",
        "tags": [
          "dashboard_section"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/dashboards/:dashboard_id/sections/:id",
        "parameters": [
          {
            "name": "dashboard_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_dashboard_section": {
                "summary": "Update a dashboard section",
                "value": "1234"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_dashboard_section": {
                "summary": "Update a dashboard section",
                "value": "890"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_section.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardSectionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard section doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardSectionUpdate"
              },
              "examples": {
                "update_a_dashboard_section": {
                  "summary": "Update a dashboard section",
                  "value": {
                    "name": "Updated Section Name",
                    "y": 12,
                    "collapsed": true,
                    "explanation": "What this section covers"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "The `warnings` key is in this response only when `y` was sent."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "y",
          "collapsed"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "y",
          "collapsed",
          "explanation",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_section.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{id}": {
      "delete": {
        "operationId": "delete_dashboard",
        "summary": "Delete a dashboard, its charts, and their alerts.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/dashboards/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_dashboard": {
                "summary": "Delete a dashboard",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The dashboard backs a dashboard template and can't be deleted. Reported in `invalid_values.id`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "The dashboard is gone from every list and get right away."
        ]
      },
      "get": {
        "operationId": "get_dashboard",
        "summary": "Get a dashboard with its charts, sections and variables.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_dashboard": {
                "summary": "Get a dashboard",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "patch": {
        "operationId": "update_dashboard",
        "summary": "Update a dashboard's settings and variables.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/dashboards/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "update_a_dashboard": {
                "summary": "Update a dashboard",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` attribute was sent blank, and `invalid_values` names it. Send a `name` with text in it, or leave `name` out to keep the current one. An attribute is unknown, `dashboard_group_id` isn't a dashboard group, or a value is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DashboardUpdate"
              },
              "examples": {
                "update_a_dashboard": {
                  "summary": "Update a dashboard",
                  "value": {
                    "name": "Updated API Dashboard",
                    "refresh_interval": 120,
                    "variables": [
                      {
                        "name": "environment",
                        "variable_type": "string",
                        "values": [
                          "staging"
                        ],
                        "default_values": [
                          "staging"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "Errors in variables are listed in `invalid_attributes`, not in `invalid_values`."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{id}/export": {
      "get": {
        "operationId": "export_dashboard",
        "summary": "Export a dashboard as a JSON document you can import again, with its charts, their queries and alerts, its sections and its variables.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:id/export",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "dashboard_export": {
                "summary": "Dashboard export",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the export as a plain JSON object.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The ID of the exported dashboard.",
                      "examples": [
                        "123456789"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "description": "The dashboard's name.",
                      "examples": [
                        "Better Stack Collector Dashboard"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The dashboard's name."
                        },
                        "refresh_interval": {
                          "type": "integer",
                          "format": "int64",
                          "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off."
                        },
                        "date_range_from": {
                          "type": "string",
                          "description": "Default range start, such as `now-3h`."
                        },
                        "date_range_to": {
                          "type": "string",
                          "description": "Default range end, such as `now`."
                        },
                        "source_eligibility_sql": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "SQL that decides which sources the dashboard's charts can read, or `null` when it has none."
                        },
                        "preset": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "description": "The preset's ID."
                            },
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The preset's name. An `explicit` preset always has one, and an `implicit` preset can be `null`."
                            },
                            "preset_type": {
                              "type": "string",
                              "enum": [
                                "implicit",
                                "explicit"
                              ],
                              "description": "The kind of preset.\n\n- `implicit`: Holds the dashboard's own variables.\n- `explicit`: A preset whose variables the team shares.",
                              "x-enum-descriptions": {
                                "implicit": "Holds the dashboard's own variables.",
                                "explicit": "A preset whose variables the team shares."
                              }
                            },
                            "preset_variables": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The variable's name, used as `{{name}}` in queries."
                                  },
                                  "variable_type": {
                                    "type": "string",
                                    "enum": [
                                      "source",
                                      "date",
                                      "datetime",
                                      "string",
                                      "number",
                                      "sql_expression",
                                      "select_value",
                                      "boolean",
                                      "select_with_sql",
                                      "multi_select_with_sql",
                                      "select_predefined_sql"
                                    ],
                                    "description": "The variable's type."
                                  },
                                  "values": {
                                    "type": [
                                      "array",
                                      "null"
                                    ],
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The variable's current values as strings. For a `source` variable, the IDs of the selected sources."
                                  },
                                  "default_values": {
                                    "type": [
                                      "array",
                                      "null"
                                    ],
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The variable's default values as strings."
                                  },
                                  "sql_definition": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The SQL query that lists the options of a `select_with_sql` or `multi_select_with_sql` variable, or `null` when not set."
                                  },
                                  "structured_value": {
                                    "type": [
                                      "object",
                                      "null"
                                    ],
                                    "additionalProperties": true,
                                    "description": "The variable's other settings as a JSON object, such as the sources a `source` variable selects in `sourceIds` and `canonicalSourceIds`, its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. `null` when not set."
                                  },
                                  "allow_multiple_values": {
                                    "type": "boolean",
                                    "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                                  }
                                }
                              },
                              "description": "The preset's variables, in the order they were added."
                            }
                          },
                          "description": "The variables the dashboard's charts use, with the preset that holds them."
                        },
                        "charts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "chart_type": {
                                "type": "string",
                                "enum": [
                                  "line_chart",
                                  "table_chart",
                                  "bar_chart",
                                  "number_chart",
                                  "heatmap_chart",
                                  "anomalies_chart",
                                  "pie_chart",
                                  "scatter_chart",
                                  "gauge_chart",
                                  "tail_chart",
                                  "static_text_chart",
                                  "map_chart",
                                  "text_chart",
                                  "funnel_chart",
                                  "funnel_trend_chart",
                                  "hierarchy_chart"
                                ],
                                "description": "The chart's type."
                              },
                              "name": {
                                "type": "string",
                                "description": "The chart's name."
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The chart's description, or `null` when it has none."
                              },
                              "x": {
                                "type": "integer",
                                "format": "int64",
                                "description": "The chart's horizontal position on the 12-column grid, from `0` at the left."
                              },
                              "y": {
                                "type": "integer",
                                "format": "int64",
                                "description": "The chart's vertical position on the grid, from `0` at the top."
                              },
                              "w": {
                                "type": "integer",
                                "format": "int64",
                                "description": "The chart's width in grid columns."
                              },
                              "h": {
                                "type": "integer",
                                "format": "int64",
                                "description": "The chart's height in grid rows."
                              },
                              "transform_with": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "JavaScript that transforms the chart's data before it's shown, as set in the chart's Transformation tab. `null` when not set."
                              },
                              "finalize_with": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "More JavaScript that transforms the chart's data, run after `transform_with`. `null` when not set."
                              },
                              "settings": {
                                "type": "object",
                                "additionalProperties": true,
                                "description": "The chart's display settings, with the keys [Get dashboard chart](/docs/logs/api/charts/get/) returns in `settings`, except `filtered_releases`."
                              },
                              "explanation": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Explanation of what the chart shows. AI SRE and the chart's AI summary use it. `null` when not set."
                              },
                              "explore_link_url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The link the chart's Explore icon opens, which can use variables such as `{{team_id}}`. `null` when the chart has none."
                              },
                              "chart_queries": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The query's name, or `null` when it has none."
                                    },
                                    "query_type": {
                                      "type": "string",
                                      "enum": [
                                        "sql_expression",
                                        "tail_query",
                                        "tail_query_builder",
                                        "promql_query",
                                        "promql_v2_query",
                                        "promql_via_llm",
                                        "query_builder",
                                        "static_text",
                                        "pql_expression",
                                        "funnel_query"
                                      ],
                                      "description": "The query's type."
                                    },
                                    "sql_query": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The SQL the query runs, or `null` for a query without SQL, such as a `tail_query` or `static_text` query."
                                    },
                                    "where_condition": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The filter of a `tail_query` or `tail_query_builder` query, or `null` when not set."
                                    },
                                    "static_text": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The Markdown text a `static_text` query shows, or `null` when not set."
                                    },
                                    "x_axis": {
                                      "type": "array",
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                                    },
                                    "y_axis": {
                                      "type": [
                                        "array",
                                        "null"
                                      ],
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set."
                                    },
                                    "point_size": {
                                      "type": [
                                        "array",
                                        "null"
                                      ],
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Point size blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set."
                                    },
                                    "coordinates": {
                                      "type": "array",
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                                    },
                                    "filters": {
                                      "type": [
                                        "array",
                                        "null"
                                      ],
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Filter blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set."
                                    },
                                    "where": {
                                      "type": "array",
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Where blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                                    },
                                    "group_by": {
                                      "type": [
                                        "array",
                                        "null"
                                      ],
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set."
                                    },
                                    "having": {
                                      "type": "array",
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Having blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                                    },
                                    "order_by": {
                                      "type": "array",
                                      "items": {
                                        "type": "object"
                                      },
                                      "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                                    },
                                    "source_variable": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The sources the query reads, as the name of a `source` variable, such as `source`, or a `source:` reference to specific sources."
                                    },
                                    "promql_query": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The PromQL of a PromQL query, or `null` when not set."
                                    },
                                    "pql_query": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The PQL of a `pql_expression` query, or `null` when not set."
                                    },
                                    "funnel_query": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "properties": {
                                        "session_field": {
                                          "type": "string",
                                          "description": "Field that ties one journey's events together, such as `session_id` or `user.id`."
                                        },
                                        "steps": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "description": "Step name shown on the chart."
                                              },
                                              "conditions": {
                                                "type": "string",
                                                "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                                              }
                                            }
                                          },
                                          "description": "The funnel's steps in journey order."
                                        },
                                        "breakdown": {
                                          "type": [
                                            "object",
                                            "null"
                                          ],
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "description": "The type of the breakdown field, always `string`."
                                            },
                                            "value": {
                                              "type": "string",
                                              "description": "The field each step is split by, such as `contexts.browser.name`."
                                            }
                                          },
                                          "description": "The field each step is split by, or `null` when the funnel has no breakdown."
                                        }
                                      },
                                      "description": "Funnel definition of a `funnel_query` query. `null` for other queries."
                                    },
                                    "mergeable_split_aggregations": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "additionalProperties": {
                                        "type": "string",
                                        "enum": [
                                          "sum",
                                          "min",
                                          "max"
                                        ]
                                      },
                                      "description": "How a `query_builder` query combines each result column when it runs in parts, as `sum`, `min` or `max` per column name. `null` when not set."
                                    }
                                  }
                                },
                                "description": "The chart's queries, in the order they were added."
                              },
                              "chart_alerts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "The alert's name."
                                    },
                                    "alert_type": {
                                      "type": "string",
                                      "enum": [
                                        "threshold",
                                        "relative",
                                        "anomaly_rrcf"
                                      ],
                                      "description": "The alert's type.\n\n- `threshold`: Fires when the value crosses a threshold.\n- `relative`: Compares the value with the previous period as a percentage change.\n- `anomaly_rrcf`: Uses machine learning anomaly detection. Table charts don't accept it.",
                                      "x-enum-descriptions": {
                                        "threshold": "Fires when the value crosses a threshold.",
                                        "relative": "Compares the value with the previous period as a percentage change.",
                                        "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                                      }
                                    },
                                    "operator": {
                                      "type": "string",
                                      "enum": [
                                        "equal",
                                        "not_equal",
                                        "higher_than",
                                        "higher_than_or_equal",
                                        "lower_than",
                                        "lower_than_or_equal",
                                        "increases_by",
                                        "decreases_by",
                                        "changes_by"
                                      ],
                                      "description": "How the value is compared.\n\n- `equal`: A `threshold` alert fires when the value equals `value` or `string_value`.\n- `not_equal`: A `threshold` alert fires when the value differs from `value` or `string_value`.\n- `higher_than`: A `threshold` alert fires when the value is above `value`.\n- `higher_than_or_equal`: A `threshold` alert fires when the value is at or above `value`.\n- `lower_than`: A `threshold` alert fires when the value is below `value`.\n- `lower_than_or_equal`: A `threshold` alert fires when the value is at or below `value`.\n- `increases_by`: A `relative` alert fires when the value rises by `value` percent or more.\n- `decreases_by`: A `relative` alert fires when the value falls by `value` percent or more.\n- `changes_by`: A `relative` alert fires when the value rises or falls by `value` percent or more.",
                                      "x-enum-descriptions": {
                                        "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                                        "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                                        "higher_than": "A `threshold` alert fires when the value is above `value`.",
                                        "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                                        "lower_than": "A `threshold` alert fires when the value is below `value`.",
                                        "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                                        "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                                        "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                                        "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                                      }
                                    },
                                    "value": {
                                      "type": [
                                        "number",
                                        "null"
                                      ],
                                      "description": "The threshold of a `threshold` alert, or the percentage change of a `relative` alert. `null` when the alert compares `string_value`."
                                    },
                                    "string_value": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "The exact text a `threshold` alert compares, or `null` when it compares `value`."
                                    },
                                    "query_period": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "format": "int64",
                                      "description": "The time window of data each check looks at, in seconds, or `null` when not set."
                                    },
                                    "confirmation_period": {
                                      "type": "integer",
                                      "format": "int64",
                                      "description": "How long the condition must hold before an incident starts, in seconds."
                                    },
                                    "recovery_period": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "format": "int64",
                                      "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically."
                                    },
                                    "escalation_target": {
                                      "type": "string",
                                      "description": "Who the alert notifies, `current_team` or an escalation policy or team written as `gid://uptime/Policy/123` or `gid://uptime/Team/456`."
                                    },
                                    "name_autogenerated": {
                                      "type": "boolean",
                                      "description": "Whether the alert's name follows the chart's name. `false` once the alert is renamed."
                                    },
                                    "aggregation_interval": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "format": "int64",
                                      "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds, or `null` when not set."
                                    },
                                    "source_mode": {
                                      "type": "string",
                                      "enum": [
                                        "source_variable",
                                        "platforms_single_source",
                                        "platforms_all_sources"
                                      ],
                                      "description": "How the alert picks its sources.\n\n- `source_variable`: Runs on the sources in `source_variable`.\n- `platforms_single_source`: Runs on the one source in `source_variable`, limited to `source_platforms`.\n- `platforms_all_sources`: Runs on every source that matches `source_platforms`.",
                                      "x-enum-descriptions": {
                                        "source_variable": "Runs on the sources in `source_variable`.",
                                        "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                                        "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                                      }
                                    },
                                    "source_platforms": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes."
                                    },
                                    "metadata": {
                                      "type": [
                                        "object",
                                        "null"
                                      ],
                                      "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "description": "Custom incident metadata, where each key holds a list of strings."
                                    },
                                    "check_period": {
                                      "type": "integer",
                                      "format": "int64",
                                      "description": "How often the alert is checked, in seconds."
                                    },
                                    "incident_per_series": {
                                      "type": "boolean",
                                      "description": "Whether each series that breaches the condition starts its own incident."
                                    },
                                    "shown_interval": {
                                      "type": [
                                        "integer",
                                        "null"
                                      ],
                                      "format": "int64",
                                      "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts. `null` on other alerts."
                                    },
                                    "anomaly_training_range_days": {
                                      "type": "integer",
                                      "format": "int64",
                                      "description": "Days of history the anomaly model is first trained on, for `anomaly_rrcf` alerts."
                                    },
                                    "incident_cause": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set."
                                    },
                                    "incident_name": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "A custom name for the incidents the alert starts, or `null` when none is set."
                                    },
                                    "on_missing_data": {
                                      "type": "string",
                                      "enum": [
                                        "treat_as_zero",
                                        "dont_fire",
                                        "treat_as_previous",
                                        "start_incident"
                                      ],
                                      "description": "What a check does when the query returns no data.\n\n- `treat_as_zero`: Checks the missing data as if the value were 0.\n- `dont_fire`: Starts no incident for missing data.\n- `treat_as_previous`: Checks the missing data as if it had the previous value.\n- `start_incident`: Starts an incident when the query returns no data.",
                                      "x-enum-descriptions": {
                                        "treat_as_zero": "Checks the missing data as if the value were 0.",
                                        "dont_fire": "Starts no incident for missing data.",
                                        "treat_as_previous": "Checks the missing data as if it had the previous value.",
                                        "start_incident": "Starts an incident when the query returns no data."
                                      }
                                    },
                                    "additional_conditions": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "alert_type": {
                                            "type": "string",
                                            "description": "The type of the condition, `threshold` or `relative`."
                                          },
                                          "operator": {
                                            "type": "string",
                                            "description": "The comparison the condition makes, from the same values as `operator`."
                                          },
                                          "value": {
                                            "type": [
                                              "number",
                                              "null"
                                            ],
                                            "description": "Threshold value. `null` when the condition compares `string_value`."
                                          },
                                          "string_value": {
                                            "type": [
                                              "string",
                                              "null"
                                            ],
                                            "description": "Threshold value for a string series. `null` when the condition compares `value`."
                                          },
                                          "series_names": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            },
                                            "description": "The series the condition is limited to. An empty list means every series."
                                          },
                                          "series_names_except": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            },
                                            "description": "The series the condition ignores while it watches every other series."
                                          }
                                        }
                                      },
                                      "description": "More conditions combined with the alert's own condition using `AND`, as an empty list when there are none."
                                    }
                                  }
                                },
                                "description": "The chart's alerts, in the order they were added."
                              }
                            }
                          },
                          "description": "The dashboard's charts, in the order they were added."
                        },
                        "sections": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The section's name."
                              },
                              "y": {
                                "type": "integer",
                                "format": "int64",
                                "description": "The section's vertical position on the grid, from `0` at the top. A section spans the full width."
                              },
                              "collapsed": {
                                "type": "boolean",
                                "description": "Whether the section starts collapsed."
                              },
                              "explanation": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Explanation of what the section groups, or `null` when not set."
                              }
                            }
                          },
                          "description": "The dashboard's sections, in the order they were added."
                        }
                      },
                      "description": "The exported document, ready to send as `data` to [Import a dashboard](/docs/logs/api/dashboards/import/).",
                      "examples": [
                        {
                          "name": "Better Stack Collector Dashboard",
                          "refresh_interval": 30,
                          "date_range_from": "now-3h",
                          "date_range_to": "now",
                          "source_eligibility_sql": null,
                          "preset": {
                            "id": 4567,
                            "name": null,
                            "preset_type": "implicit",
                            "preset_variables": [
                              {
                                "name": "service",
                                "variable_type": "select_value",
                                "values": [
                                  "web"
                                ],
                                "default_values": [
                                  "web",
                                  "api"
                                ],
                                "sql_definition": null,
                                "structured_value": null,
                                "allow_multiple_values": false
                              }
                            ]
                          },
                          "charts": [
                            {
                              "chart_type": "line_chart",
                              "name": "CPU Usage",
                              "description": null,
                              "x": 0,
                              "y": 1,
                              "w": 6,
                              "h": 4,
                              "transform_with": null,
                              "finalize_with": null,
                              "settings": {
                                "unit": "percent",
                                "y_axis_scale": "linear"
                              },
                              "explanation": null,
                              "explore_link_url": null,
                              "chart_queries": [
                                {
                                  "name": null,
                                  "query_type": "sql_expression",
                                  "sql_query": "SELECT {{time}} as time, avg(cpu_usage) as value FROM {{source}} WHERE service = '{{service}}' GROUP BY time",
                                  "where_condition": null,
                                  "static_text": null,
                                  "x_axis": [],
                                  "y_axis": null,
                                  "point_size": null,
                                  "coordinates": [],
                                  "filters": null,
                                  "where": [],
                                  "group_by": null,
                                  "having": [],
                                  "order_by": [],
                                  "source_variable": "source",
                                  "promql_query": null,
                                  "pql_query": null,
                                  "funnel_query": null,
                                  "mergeable_split_aggregations": null
                                }
                              ],
                              "chart_alerts": [
                                {
                                  "name": "High CPU",
                                  "alert_type": "threshold",
                                  "operator": "higher_than",
                                  "value": 90.0,
                                  "string_value": null,
                                  "query_period": 300,
                                  "confirmation_period": 60,
                                  "recovery_period": 60,
                                  "escalation_target": "current_team",
                                  "name_autogenerated": false,
                                  "aggregation_interval": 60,
                                  "source_mode": "source_variable",
                                  "source_platforms": [],
                                  "metadata": {},
                                  "check_period": 60,
                                  "incident_per_series": false,
                                  "shown_interval": null,
                                  "anomaly_training_range_days": 7,
                                  "incident_cause": null,
                                  "incident_name": null,
                                  "on_missing_data": "dont_fire",
                                  "additional_conditions": []
                                }
                              ]
                            }
                          ],
                          "sections": [
                            {
                              "name": "System Metrics",
                              "y": 0,
                              "collapsed": false,
                              "explanation": null
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "You can also export any dashboard template by its ID. In a template's export, the values of its `source`, `select_with_sql` and `select_predefined_sql` variables are empty, along with the sources and services a `source` variable selects, and every alert's `escalation_target` is `current_team`."
        ],
        "x-cli-response-fields": [
          "id",
          "name",
          "data"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.export"
        },
        "x-response-envelope": {
          "item_path": [],
          "attributes_path": []
        }
      }
    },
    "/api/v4/dashboards/{id}/layout": {
      "put": {
        "operationId": "layout_dashboard",
        "summary": "Move and resize several charts on a dashboard at once.",
        "description": "Every move is checked against the 12-column grid and against the final layout, so charts can swap places. The moves are applied together or not at all, and charts then move up to fill any gaps. Returns the full dashboard.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PUT /api/v4/dashboards/:id/layout",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "move_charts": {
                "summary": "Move charts",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The dashboard belongs to another team and is shared into this one, or, with an OAuth token, the user's role can't change it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Two charts would overlap, a chart would extend beyond the grid, a chart isn't on this dashboard, or no moves were sent. `invalid_values.charts` says which. The `charts` attribute is missing or isn't a list, an entry has a key other than `id`, `x`, `y`, `w` and `h`, or misses `id`, `x` or `y`, or a value isn't a whole number. The entry is named by its position, such as `charts[0].x`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "charts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the chart to move."
                        },
                        "x": {
                          "type": "integer",
                          "format": "int64",
                          "description": "New grid x position, from 0 to 11."
                        },
                        "y": {
                          "type": "integer",
                          "format": "int64",
                          "description": "New grid y position, from 0."
                        },
                        "w": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "format": "int64",
                          "description": "New width, from 1 to 12. Leave it out or send `null` to keep the chart's width."
                        },
                        "h": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "format": "int64",
                          "description": "New height, from 1 to 50. Leave it out or send `null` to keep the chart's height."
                        }
                      },
                      "required": [
                        "id",
                        "x",
                        "y"
                      ]
                    },
                    "description": "The charts to move, each with its new place. Values out of range are moved to the nearest allowed value.",
                    "examples": [
                      [
                        {
                          "id": "567",
                          "x": 6,
                          "y": 0
                        },
                        {
                          "id": "568",
                          "x": 0,
                          "y": 0,
                          "w": 6,
                          "h": 4
                        }
                      ]
                    ]
                  }
                },
                "required": [
                  "charts"
                ]
              },
              "examples": {
                "move_charts": {
                  "summary": "Move charts",
                  "value": {
                    "charts": [
                      {
                        "id": "18718",
                        "x": 6,
                        "y": 0
                      },
                      {
                        "id": "18719",
                        "x": 0,
                        "y": 0,
                        "w": 6,
                        "h": 4
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "The dashboard's version before the moves is kept, so the layout can be rolled back."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{id}/rollback": {
      "post": {
        "operationId": "rollback_dashboard",
        "summary": "Roll back a dashboard to one of its versions.",
        "description": "The whole dashboard goes back to how it was in that version, and every change since, by anyone, is rolled back. Charts and alerts added since are removed, and ones removed since come back. Returns the full dashboard.",
        "tags": [
          "dashboard"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/dashboards/:id/rollback",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "roll_back_a_dashboard": {
                "summary": "Roll back a dashboard",
                "value": "1234"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/DashboardDocument"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "rollback": {
                          "type": "object",
                          "properties": {
                            "version": {
                              "type": "integer",
                              "format": "int64",
                              "description": "The number of the version the dashboard went back to."
                            },
                            "version_created_at": {
                              "type": "string",
                              "format": "date-time",
                              "description": "When that version was saved."
                            },
                            "changes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Up to 25 of the changes the rollback made, in plain words."
                            },
                            "change_count": {
                              "type": "integer",
                              "format": "int64",
                              "description": "How many changes the rollback made."
                            }
                          },
                          "description": "What the rollback did, next to `data`.",
                          "examples": [
                            {
                              "version": 2,
                              "version_created_at": "2026-11-20T20:20:58.511Z",
                              "changes": [
                                "CPU renamed"
                              ],
                              "change_count": 1
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The dashboard belongs to another team and is shared into this one. Only your own teams' dashboards can be rolled back. Also returned when, with an OAuth token, the user's role can't change the dashboard or one of the alerts the rollback would change.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `version` attribute is missing or isn't a whole number, the version isn't in the dashboard's history, which keeps only the newest versions, or the dashboard already looks the way it did then, so nothing was changed. `invalid_values.version` says which, or `required_attributes` when `version` is missing. Any other attribute is listed in `invalid_attributes`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The `number` of the dashboard version to go back to. The dashboard goes back to how it was right before the change listed with that version. To roll back everything one person, token or AI SRE conversation changed, pass the version listed with their first change.",
                    "examples": [
                      2
                    ]
                  }
                },
                "required": [
                  "version"
                ]
              },
              "examples": {
                "roll_back_a_dashboard": {
                  "summary": "Roll back a dashboard",
                  "value": {
                    "version": 2
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-notes": [
          "An alert that still exists keeps its paused state. An alert that comes back starts checking at once and can open incidents.",
          "The rollback is itself kept as a new version, so it can be rolled back too."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "team_id",
          "dashboard_group_id",
          "updated_at"
        ],
        "x-cli-name-fields": [
          "name",
          "url"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "dashboard_group_id",
          "refresh_interval",
          "date_range_from",
          "date_range_to",
          "source_eligibility_sql",
          "variables",
          "charts",
          "sections",
          "has_overlaps",
          "product",
          "created_at",
          "updated_at",
          "url",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/dashboards/{id}/versions": {
      "get": {
        "operationId": "list_dashboard_version",
        "summary": "List a dashboard's versions, newest first.",
        "description": "Each version is the dashboard as it was right before one change. To go back to a version, roll back the dashboard.",
        "tags": [
          "dashboard_version"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/dashboards/:id/versions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "1712"
              ]
            },
            "description": "Dashboard whose versions are listed. Get the IDs via [List dashboards](/docs/logs/api/dashboards/list/).",
            "x-path-wildcard": false,
            "examples": {
              "list_dashboard_versions": {
                "summary": "List dashboard versions",
                "value": "1234"
              },
              "changes_to_one_chart": {
                "summary": "Changes to one chart",
                "value": "1234"
              }
            }
          },
          {
            "name": "chart_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "567"
              ]
            },
            "description": "Only the versions whose change touched this chart.",
            "examples": {
              "changes_to_one_chart": {
                "summary": "Changes to one chart",
                "value": "18718"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of dashboard_version objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardVersionList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The dashboard belongs to another team and is shared into this one. Versions are listed only for your own teams' dashboards.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The dashboard doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `chart_id` parameter isn't a whole number, listed in `invalid_values`, or a parameter other than `chart_id`, `page` and `per_page` was sent, listed in `invalid_attributes`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns 20 versions per page by default, not 50 like other lists, and 250 at most. With `chart_id`, `pagination.last` is `null`.",
          "The dashboard keeps only its newest versions."
        ],
        "x-cli-default-fields": [
          "id",
          "created_at",
          "changed_by",
          "source_name",
          "changed",
          "current"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "number",
          "created_at",
          "changed_by",
          "source",
          "source_name",
          "changed",
          "current"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.dashboard_version.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/data-regions": {
      "get": {
        "operationId": "list_data_region",
        "summary": "List the data regions and dedicated clusters available for a new source.",
        "description": "Pass an `id` as a source's `data_region` when creating it.",
        "tags": [
          "data_region"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/data-regions",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of data_region objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataRegionList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The data region doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every region and cluster in one page."
        ],
        "x-cli-default-fields": [
          "id",
          "name",
          "kind"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "kind"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.data_region.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/metrics": {
      "get": {
        "operationId": "list_metric",
        "summary": "List a source's or an application's ingested and user-defined metrics.",
        "tags": [
          "metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/metrics",
        "parameters": [
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose metrics are listed. Send this or `application_id`.",
            "examples": {
              "metrics_of_a_source": {
                "summary": "Metrics of a source",
                "value": "123456"
              },
              "filter_by_name": {
                "summary": "Filter by name",
                "value": "123456"
              }
            }
          },
          {
            "name": "application_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "123"
              ]
            },
            "description": "Error tracking application whose metrics are listed. Send this or `source_id`."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "cardinality",
                "catalog"
              ],
              "x-enum-descriptions": {
                "cardinality": "Lists the metrics with the highest `active_series` first.",
                "catalog": "Keeps the catalog's own order, with ingested metrics by name, then user-defined ones in the order they were created."
              },
              "default": "cardinality",
              "examples": [
                "catalog"
              ]
            },
            "description": "The order the metrics are listed in."
          },
          {
            "name": "name_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "http_*"
              ]
            },
            "description": "Only metrics whose name matches, ignoring letter case. Use `prefix*`, `*contains*`, `*suffix` or an exact name.",
            "examples": {
              "filter_by_name": {
                "summary": "Filter by name",
                "value": "http_*"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of metric objects.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/MetricList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_available": {
                          "type": "boolean",
                          "description": "Whether the usage of user-defined metrics was measured. `false` when it couldn't be measured in time, so their `data_points` and `active_series` show 0.",
                          "examples": [
                            true
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "No source or application with that ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Both or neither of `source_id` and `application_id` were sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "name",
          "type",
          "origin",
          "active_series",
          "data_points"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "origin",
          "layout",
          "aggregations",
          "data_points",
          "active_series",
          "sql_expression",
          "json_dot_notation",
          "query_examples",
          "labels"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.metric.list"
        },
        "x-cli-query-alternatives": [
          [
            "source_id"
          ],
          [
            "application_id"
          ]
        ],
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/metrics/{id}": {
      "get": {
        "operationId": "get_metric",
        "summary": "Get one metric of a source or an application, with the expressions to query it with.",
        "tags": [
          "metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/metrics/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "[^/]+",
              "examples": [
                "http_requests_total"
              ]
            },
            "description": "The metric name. Can contain dots.",
            "x-path-wildcard": false,
            "examples": {
              "get_a_metric": {
                "summary": "Get a metric",
                "value": "http_requests_total"
              }
            }
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source the metric belongs to. Send this or `application_id`.",
            "examples": {
              "get_a_metric": {
                "summary": "Get a metric",
                "value": "123456"
              }
            }
          },
          {
            "name": "application_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "123"
              ]
            },
            "description": "Error tracking application the metric belongs to. Send this or `source_id`."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single metric.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "No source or application with that ID, or no metric with that name in it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "Both or neither of `source_id` and `application_id` were sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "name",
          "type",
          "origin",
          "active_series",
          "data_points"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "origin",
          "layout",
          "aggregations",
          "data_points",
          "active_series",
          "sql_expression",
          "json_dot_notation",
          "query_examples",
          "labels"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.metric.list"
        },
        "x-cli-query-alternatives": [
          [
            "source_id"
          ],
          [
            "application_id"
          ]
        ],
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sections/{id}": {
      "get": {
        "operationId": "get_by_id_dashboard_section",
        "summary": "Get a dashboard section by its ID alone.",
        "description": "The section's `dashboard_id` says which dashboard it's on.",
        "tags": [
          "dashboard_section"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v4/sections/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "890"
              ]
            },
            "description": "ID of the section.",
            "x-path-wildcard": false,
            "examples": {
              "get_a_section_by_its_id": {
                "summary": "Get a section by its ID",
                "value": "890"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single dashboard_section.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardSectionDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "No section with this ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v4/sources": {
      "get": {
        "operationId": "list_source",
        "summary": "List your telemetry sources.",
        "tags": [
          "source"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "-name"
              ]
            },
            "description": "Sort by `created_at`, `updated_at`, `name` or `last_data_on`. Add a `-` prefix for descending order, such as `-name`. `-last_data_on` lists the sources that received data most recently first, and sources with no data in the last 30 days last. Sorts by `-last_data_on` by default, and sources that last received data on the same day by ID. The default order can change between pages as sources receive data, so sort by `created_at` to page through every source exactly once."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Nginx"
              ]
            },
            "description": "Return only sources whose name contains this text, ignoring case."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of source objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_data_on",
          "team_id",
          "source_group_id",
          "ingesting_paused"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "data_region",
          "cluster",
          "source_group_id",
          "ingesting_paused",
          "logs_retention",
          "metrics_retention",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "vrl_transformation_logs",
          "vrl_transformation_spans",
          "blocked_metrics",
          "scrape_urls",
          "scrape_frequency_secs",
          "scrape_request_headers",
          "scrape_request_basic_auth_user",
          "skip_ssl_verify",
          "aws_auto_sub_log_groups",
          "gcp_metrics_filters",
          "gcp_log_filter",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "source_types",
          "parent_source_id",
          "query_collections",
          "last_data_on",
          "token",
          "table_name",
          "ingesting_host",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        },
        "x-cli-credential-lists": {
          "source": [
            "scrape_request_headers"
          ]
        }
      },
      "post": {
        "operationId": "create_source",
        "summary": "Create a source to ingest logs, metrics, or traces.",
        "description": "Send data to the source's `ingesting_host` with its `token`.",
        "tags": [
          "source"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/sources",
        "parameters": [
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` or `platform` attribute is missing, `platform` is `collector`, the organization can't use the `data_region`, the plan doesn't include the retention or `custom_bucket` that was set, the bucket can't be reached, `connected_source_ids` or `service_fields` is invalid, only one of `aws_role_arn` and `aws_external_id` or of `gcp_project_id` and `gcp_project_number` was sent, AWS or Google Cloud refused the credentials, or a token with access to more than one team didn't name a team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "429": {
            "description": "Too many sources are being created right now. Try again in a moment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceCreate"
              },
              "examples": {
                "create_a_source": {
                  "summary": "Create a source",
                  "value": {
                    "name": "My new HTTP source",
                    "platform": "http",
                    "data_region": "us"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_data_on",
          "team_id",
          "source_group_id",
          "ingesting_paused"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "data_region",
          "cluster",
          "source_group_id",
          "ingesting_paused",
          "logs_retention",
          "metrics_retention",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "vrl_transformation_logs",
          "vrl_transformation_spans",
          "blocked_metrics",
          "scrape_urls",
          "scrape_frequency_secs",
          "scrape_request_headers",
          "scrape_request_basic_auth_user",
          "skip_ssl_verify",
          "aws_auto_sub_log_groups",
          "gcp_metrics_filters",
          "gcp_log_filter",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "source_types",
          "parent_source_id",
          "query_collections",
          "last_data_on",
          "token",
          "table_name",
          "ingesting_host",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        },
        "x-cli-credential-lists": {
          "source": [
            "scrape_request_headers"
          ]
        }
      }
    },
    "/api/v4/sources/{id}": {
      "delete": {
        "operationId": "delete_source",
        "summary": "Delete a source permanently.",
        "description": "Ingestion stops and its stored data is deleted shortly after. If the source has received data, add `force=true` to the query string, or the request fails with 409.",
        "tags": [
          "source"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/sources/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_a_source": {
                "summary": "Delete a source",
                "value": "123456"
              },
              "remove_with_its_data": {
                "summary": "Remove with its data",
                "value": "123456"
              }
            }
          },
          {
            "name": "force",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "examples": [
                true
              ]
            },
            "description": "Set to `true` to delete a source that has received data, with all of its data. Without it, deleting such a source returns 409. Defaults to `false`.",
            "examples": {
              "remove_with_its_data": {
                "summary": "Remove with its data",
                "value": true
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "409": {
            "description": "The source has received data and `force` wasn't `true`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `force` parameter wasn't `true` or `false`, or the source is managed by an integration and can't be deleted directly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_source",
        "summary": "Get a source, including the token and host to send its data to.",
        "tags": [
          "source"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "get_a_source": {
                "summary": "Get a source",
                "value": "123456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_data_on",
          "team_id",
          "source_group_id",
          "ingesting_paused"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "data_region",
          "cluster",
          "source_group_id",
          "ingesting_paused",
          "logs_retention",
          "metrics_retention",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "vrl_transformation_logs",
          "vrl_transformation_spans",
          "blocked_metrics",
          "scrape_urls",
          "scrape_frequency_secs",
          "scrape_request_headers",
          "scrape_request_basic_auth_user",
          "skip_ssl_verify",
          "aws_auto_sub_log_groups",
          "gcp_metrics_filters",
          "gcp_log_filter",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "source_types",
          "parent_source_id",
          "query_collections",
          "last_data_on",
          "token",
          "table_name",
          "ingesting_host",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        },
        "x-cli-credential-lists": {
          "source": [
            "scrape_request_headers"
          ]
        }
      },
      "patch": {
        "operationId": "update_source",
        "summary": "Update a source's settings.",
        "description": "Send only the fields you want to change.",
        "tags": [
          "source"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/sources/:id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "rename_a_source": {
                "summary": "Rename a source",
                "value": "123456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `platform` or `data_region` attribute was sent, `custom_bucket` held more than the key pair or the key pair was refused, a retention is outside the plan, `connected_source_ids` or `service_fields` is invalid, only one of `aws_role_arn` and `aws_external_id` or of `gcp_project_id` and `gcp_project_number` was sent, AWS or Google Cloud refused the credentials, `gcp_metrics_filters` is invalid, or Google Cloud refused `gcp_log_filter`. `platform` and `data_region` can only be set on create.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceUpdate"
              },
              "examples": {
                "rename_a_source": {
                  "summary": "Rename a source",
                  "value": {
                    "name": "My renamed HTTP source"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_data_on",
          "team_id",
          "source_group_id",
          "ingesting_paused"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "platform",
          "data_region",
          "cluster",
          "source_group_id",
          "ingesting_paused",
          "logs_retention",
          "metrics_retention",
          "live_tail_pattern",
          "live_tail_pattern_spans",
          "vrl_transformation_logs",
          "vrl_transformation_spans",
          "blocked_metrics",
          "scrape_urls",
          "scrape_frequency_secs",
          "scrape_request_headers",
          "scrape_request_basic_auth_user",
          "skip_ssl_verify",
          "aws_auto_sub_log_groups",
          "gcp_metrics_filters",
          "gcp_log_filter",
          "custom_bucket",
          "connected_source_ids",
          "service_fields",
          "source_types",
          "parent_source_id",
          "query_collections",
          "last_data_on",
          "token",
          "table_name",
          "ingesting_host",
          "created_at",
          "updated_at",
          "team_id",
          "team_name"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        },
        "x-cli-credential-lists": {
          "source": [
            "scrape_request_headers"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/extracted-metrics": {
      "get": {
        "operationId": "list_extracted_metric",
        "summary": "List a source's extracted metrics, the rules that turn logs into metrics.",
        "tags": [
          "extracted_metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/extracted-metrics",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123"
              ]
            },
            "description": "Source whose extracted metrics are listed.",
            "x-path-wildcard": false,
            "examples": {
              "list_extracted_metrics": {
                "summary": "List extracted metrics",
                "value": "123"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of extracted_metric objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractedMetricList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "type",
          "sql_expression"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sql_expression",
          "aggregations",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.extracted_metric.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      },
      "post": {
        "operationId": "create_extracted_metric",
        "summary": "Create an extracted metric on a source.",
        "description": "Pass `aggregations` such as `[\"avg\", \"count\"]` for a metric, or leave it out for a label.",
        "tags": [
          "extracted_metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "POST /api/v4/sources/:source_id/extracted-metrics",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "create_a_metric": {
                "summary": "Create a metric",
                "value": "123"
              },
              "create_a_label": {
                "summary": "Create a label",
                "value": "123"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "201": {
            "description": "A single extracted_metric.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractedMetricDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `name` or `sql_expression` attribute is missing or invalid, or `type`, `aggregations` or `build_type` is invalid. The response can include `sql_errors` next to `errors` and `invalid_attributes`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractedMetricCreate"
              },
              "examples": {
                "create_a_metric": {
                  "summary": "Create a metric",
                  "value": {
                    "name": "duration_ms",
                    "sql_expression": "JSONExtract(raw, 'message_json', 'duration_ms', 'Nullable(Float64)')",
                    "aggregations": [
                      "avg",
                      "histogram",
                      "min",
                      "max"
                    ]
                  }
                },
                "create_a_label": {
                  "summary": "Create a label",
                  "value": {
                    "name": "log_type",
                    "sql_expression": "JSONExtractString(raw, 'message_json', 'log_type')"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "type",
          "sql_expression"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sql_expression",
          "aggregations",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.extracted_metric.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/extracted-metrics/{id}": {
      "delete": {
        "operationId": "delete_extracted_metric",
        "summary": "Delete an extracted metric.",
        "description": "By default, the rule stops applying to new logs.",
        "tags": [
          "extracted_metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "DELETE /api/v4/sources/:source_id/extracted-metrics/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_an_extracted_metric": {
                "summary": "Delete an extracted metric",
                "value": "123"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "delete_an_extracted_metric": {
                "summary": "Delete an extracted metric",
                "value": "g-456"
              }
            }
          },
          {
            "name": "build_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "new_data",
                "historical_logs"
              ],
              "examples": [
                "new_data"
              ]
            },
            "description": "Whether removing this rule also rebuilds the stored metrics. Defaults to `new_data`."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The extracted metric doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `build_type` parameter was sent and isn't `new_data` or `historical_logs`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_extracted_metric",
        "summary": "Update an extracted metric's name, SQL, type or aggregations.",
        "description": "Send only the fields you want to change.",
        "tags": [
          "extracted_metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "write",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "PATCH /api/v4/sources/:source_id/extracted-metrics/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "rename_a_metric": {
                "summary": "Rename a metric",
                "value": "123"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-path-wildcard": false,
            "examples": {
              "rename_a_metric": {
                "summary": "Rename a metric",
                "value": "g-456"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single extracted_metric.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExtractedMetricDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "The token is read-only, or its scopes don't permit the action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The extracted metric doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "None of `name`, `sql_expression`, `type` or `aggregations` was sent, or a value is invalid. Sending only `build_type` isn't enough.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractedMetricUpdate"
              },
              "examples": {
                "rename_a_metric": {
                  "summary": "Rename a metric",
                  "value": {
                    "name": "log_type"
                  }
                }
              }
            }
          }
        },
        "x-request-envelope": {
          "attributes_path": []
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "type",
          "sql_expression"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "sql_expression",
          "aggregations",
          "team_id"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.extracted_metric.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/fields": {
      "get": {
        "operationId": "list_source_field",
        "summary": "List the fields a source's data can be queried by.",
        "description": "The list has the fields seen in the source's logs, spans, exceptions or web events in the last 6 hours.",
        "tags": [
          "source_field"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/fields",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose fields are listed. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "span_fields": {
                "summary": "Span fields",
                "value": "123456"
              },
              "list_source_fields": {
                "summary": "List source fields",
                "value": "123456"
              }
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "logs",
                "spans",
                "exceptions",
                "web_events"
              ],
              "default": "logs",
              "examples": [
                "logs"
              ]
            },
            "description": "Which of the source's data to list the fields of.",
            "examples": {
              "span_fields": {
                "summary": "Span fields",
                "value": "spans"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of source_field objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceFieldList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `source_type` parameter isn't `logs`, `spans`, `exceptions` or `web_events`, or the source has no data of that type. `invalid_values` names it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every field in one page. A source that received no data in the last 6 hours returns an empty list."
        ],
        "x-cli-default-fields": [
          "path",
          "type"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "path",
          "path_parts"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_field.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/fields/{field_id}/values": {
      "get": {
        "operationId": "list_source_field_value",
        "summary": "List the values one field of a source's logs or spans had in a time range, most frequent first.",
        "tags": [
          "source_field_value"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/fields/:field_id/values",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose data is read. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "routes_of_a_source_s_requests": {
                "summary": "Routes of a source's requests",
                "value": "123456"
              }
            }
          },
          {
            "name": "field_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "span.attributes.http\\.route"
              ]
            },
            "description": "The field's `path`, as listing the source's fields returns it, such as `span.attributes.http\\.route`. A dot inside a key is escaped with a backslash.",
            "x-path-wildcard": false,
            "examples": {
              "routes_of_a_source_s_requests": {
                "summary": "Routes of a source's requests",
                "value": "span.attributes.http\\.route"
              }
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "logs",
                "spans"
              ],
              "default": "logs",
              "examples": [
                "spans"
              ]
            },
            "description": "Whether the field is read from the source's logs or its spans.",
            "examples": {
              "routes_of_a_source_s_requests": {
                "summary": "Routes of a source's requests",
                "value": "spans"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-6h"
              ]
            },
            "description": "Start of the time range. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`.",
            "examples": {
              "routes_of_a_source_s_requests": {
                "summary": "Routes of a source's requests",
                "value": "now-6h"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "examples": [
                20
              ]
            },
            "description": "How many values to return, from 1 to 1000."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of source_field_value objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceFieldValueList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources. Find your sources via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is unknown, or a value is refused and `invalid_values` names it. `field_id` isn't a field path, `source_type` isn't `logs` or `spans`, `limit` isn't from 1 to 1000, `start_time` or `end_time` is invalid, `end_time` isn't after `start_time`, or the source doesn't hold that type of data. The time range holds too many logs or spans to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for each window with its `start_time` and `end_time`, or for a shorter time range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every value in one page. Only logs or spans that have the field are counted."
        ],
        "x-cli-default-fields": [
          "value",
          "occurrences"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "value",
          "occurrences"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.source_field_value.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/gcp-metrics": {
      "get": {
        "operationId": "list_gcp_metric",
        "summary": "List the Google Cloud metrics a GCP source can collect.",
        "description": "The list is empty until the source's GCP project is connected and has finished its first sync.",
        "tags": [
          "gcp_metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/gcp-metrics",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "GCP source whose metrics are listed. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "list_gcp_metrics": {
                "summary": "List GCP metrics",
                "value": "123456"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of gcp_metric objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GcpMetricList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, isn't a `gcp` source, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "metric_type",
          "service_name",
          "collected"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "metric_type",
          "display_name",
          "description",
          "kind",
          "service_name",
          "collected"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.gcp_metric.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/log-patterns": {
      "get": {
        "operationId": "list_log_pattern",
        "summary": "List the patterns of a source's logs in a time range, most frequent first.",
        "tags": [
          "log_pattern"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/log-patterns",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose logs are grouped. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "errors_of_one_service": {
                "summary": "Errors of one service",
                "value": "123456"
              },
              "errors_over_time": {
                "summary": "Errors over time",
                "value": "123456"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-6h"
              ]
            },
            "description": "Start of the time range. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`.",
            "examples": {
              "errors_of_one_service": {
                "summary": "Errors of one service",
                "value": "now-6h"
              },
              "errors_over_time": {
                "summary": "Errors over time",
                "value": "now-6h"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 30,
              "examples": [
                50
              ]
            },
            "description": "How many patterns to return, from 1 to 100."
          },
          {
            "name": "step",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "5m"
              ]
            },
            "description": "Length of each step to count each pattern in, returned as `samples`. Accepts a duration such as `30s`, `5m`, `1h` or `1d`. A number alone is seconds. The time range can hold at most 1000 steps.",
            "examples": {
              "errors_over_time": {
                "summary": "Errors over time",
                "value": "15m"
              }
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "error",
                "warn",
                "info",
                "debug",
                "all"
              ],
              "x-enum-descriptions": {
                "error": "Matches logs whose level is `error` or `err`.",
                "warn": "Matches logs whose level is `warn` or `warning`.",
                "info": "Matches logs whose level is `info`.",
                "debug": "Matches logs whose level is `debug`.",
                "all": "Matches logs of every level."
              },
              "default": "all",
              "examples": [
                "error"
              ]
            },
            "description": "Only logs of this level, read from the log's `level` field and ignoring letter case.",
            "examples": {
              "errors_of_one_service": {
                "summary": "Errors of one service",
                "value": "error"
              },
              "errors_over_time": {
                "summary": "Errors over time",
                "value": "error"
              }
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "checkout"
              ]
            },
            "description": "Only logs of this service, by its `name` from [List services](/docs/logs/api/services/list/).",
            "examples": {
              "errors_of_one_service": {
                "summary": "Errors of one service",
                "value": "checkout"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of log_pattern objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogPatternList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources. Find your sources via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is unknown, or a value is refused and `invalid_values` names it. `level` isn't one of the allowed values, `limit` isn't from 1 to 100, `step` isn't a duration or gives more than 1000 steps, `start_time` or `end_time` is invalid, `end_time` isn't after `start_time`, the source doesn't hold logs, or `service` is set on a source that has no service fields. Set up service fields in the source's settings under **Extract services**. The time range holds too many logs to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for each window with its `start_time` and `end_time`, or for a shorter time range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every pattern in one page. A source with no logs in the time range returns an empty list."
        ],
        "x-cli-default-fields": [
          "id",
          "occurrences",
          "last_seen_at",
          "message"
        ],
        "x-cli-name-fields": [
          "message"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "message",
          "occurrences",
          "first_seen_at",
          "last_seen_at",
          "samples",
          "logs"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.log_pattern.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/log-patterns/{id}": {
      "get": {
        "operationId": "get_log_pattern",
        "summary": "Get one pattern of a source's logs in a time range, with its newest logs.",
        "tags": [
          "log_pattern"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/log-patterns/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose logs are read. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "a_pattern_over_the_last_day": {
                "summary": "A pattern over the last day",
                "value": "123456"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "[\\w-]{1,128}",
              "examples": [
                "cb97bef4cd1cbd14afe4a7b9aa7b74a2"
              ]
            },
            "description": "The pattern's ID, as listing the source's log patterns returns it.",
            "x-path-wildcard": false,
            "examples": {
              "a_pattern_over_the_last_day": {
                "summary": "A pattern over the last day",
                "value": "cb97bef4cd1cbd14afe4a7b9aa7b74a2"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-6h"
              ]
            },
            "description": "Start of the time range. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`.",
            "examples": {
              "a_pattern_over_the_last_day": {
                "summary": "A pattern over the last day",
                "value": "now-1d"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "step",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "5m"
              ]
            },
            "description": "Length of each step to count the pattern in, returned as `samples`. Accepts a duration such as `30s`, `5m`, `1h` or `1d`. A number alone is seconds. The time range can hold at most 1000 steps.",
            "examples": {
              "a_pattern_over_the_last_day": {
                "summary": "A pattern over the last day",
                "value": "1h"
              }
            }
          },
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "error",
                "warn",
                "info",
                "debug",
                "all"
              ],
              "x-enum-descriptions": {
                "error": "Matches logs whose level is `error` or `err`.",
                "warn": "Matches logs whose level is `warn` or `warning`.",
                "info": "Matches logs whose level is `info`.",
                "debug": "Matches logs whose level is `debug`.",
                "all": "Matches logs of every level."
              },
              "default": "all",
              "examples": [
                "error"
              ]
            },
            "description": "Only logs of this level, read from the log's `level` field and ignoring letter case."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "checkout"
              ]
            },
            "description": "Only logs of this service, by its `name` from [List services](/docs/logs/api/services/list/)."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single log_pattern.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogPatternDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources, or the time range holds no log of the pattern. Set an earlier `start_time` for an older pattern.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is unknown, or a value is refused and `invalid_values` names it. `id` has characters other than letters, digits, `-` and `_`, `level` isn't one of the allowed values, `step` isn't a duration or gives more than 1000 steps, `start_time` or `end_time` is invalid, `end_time` isn't after `start_time`, or the source doesn't hold logs. The time range holds too many logs to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for each window with its `start_time` and `end_time`, or for a shorter time range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "occurrences",
          "last_seen_at",
          "message"
        ],
        "x-cli-name-fields": [
          "message"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "message",
          "occurrences",
          "first_seen_at",
          "last_seen_at",
          "samples",
          "logs"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.log_pattern.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/metrics": {
      "get": {
        "operationId": "list_on_source_metric",
        "summary": "List a source's ingested and user-defined metrics.",
        "tags": [
          "metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v4/sources/:source_id/metrics",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose metrics are listed.",
            "x-path-wildcard": false
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "cardinality",
                "catalog"
              ],
              "x-enum-descriptions": {
                "cardinality": "Lists the metrics with the highest `active_series` first.",
                "catalog": "Keeps the catalog's own order, with ingested metrics by name, then user-defined ones in the order they were created."
              },
              "default": "cardinality",
              "examples": [
                "catalog"
              ]
            },
            "description": "The order the metrics are listed in."
          },
          {
            "name": "name_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "http_*"
              ]
            },
            "description": "Only metrics whose name matches, ignoring letter case. Use `prefix*`, `*contains*`, `*suffix` or an exact name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of metric objects.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/MetricList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_available": {
                          "type": "boolean",
                          "description": "Whether the usage of user-defined metrics was measured. `false` when it couldn't be measured in time, so their `data_points` and `active_series` show 0.",
                          "examples": [
                            true
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The source doesn't exist, or the token can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v4/sources/{source_id}/metrics/{id}": {
      "get": {
        "operationId": "get_on_source_metric",
        "summary": "Get one metric of a source, with the expressions to query it with.",
        "tags": [
          "metric"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": false,
        "x-endpoint": "GET /api/v4/sources/:source_id/metrics/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source the metric belongs to.",
            "x-path-wildcard": false
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "[^/]+",
              "examples": [
                "http_requests_total"
              ]
            },
            "description": "The metric name. Can contain dots.",
            "x-path-wildcard": false
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single metric.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "No source with that ID, or no metric with that name in it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v4/sources/{source_id}/service-map": {
      "get": {
        "operationId": "get_service_map",
        "summary": "Get a source's service map for a time range, as the **Service map** page shows it.",
        "description": "The map is drawn from a collector source's metrics, or from a source's traces. Set `service` to get one node's callers and dependencies.",
        "tags": [
          "service_map"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/service-map",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose map is drawn. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "hosts_in_the_last_hour": {
                "summary": "Hosts in the last hour",
                "value": "123456"
              },
              "callers_and_dependencies_of_one_service": {
                "summary": "Callers and dependencies of one service",
                "value": "123456"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-1h"
              ]
            },
            "description": "Start of the time range. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`.",
            "examples": {
              "callers_and_dependencies_of_one_service": {
                "summary": "Callers and dependencies of one service",
                "value": "now-6h"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "display_mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "services",
                "hosts"
              ],
              "default": "services",
              "examples": [
                "hosts"
              ]
            },
            "description": "Whether the map's nodes are services or hosts, as the map's toggle sets them. A map drawn from traces accepts `services` only.",
            "examples": {
              "hosts_in_the_last_hour": {
                "summary": "Hosts in the last hour",
                "value": "hosts"
              }
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "examples": [
                2
              ]
            },
            "description": "How many connections away from `service` a node can be and stay on the map, from 1 to 3. Needs `service`. Defaults to `1`."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "checkout"
              ]
            },
            "description": "The `name` of the service or host to center the map on. The map then shows only that node and the nodes within `depth` connections of it, in either direction, and the connections between them.",
            "examples": {
              "callers_and_dependencies_of_one_service": {
                "summary": "Callers and dependencies of one service",
                "value": "checkout"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single service_map.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceMapDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources. Find your sources via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The source has no service map, a parameter is unknown, or a value is refused and `invalid_values` names it. A map needs a collector source, or a source whose traces have the labels the map uses. `display_mode` is refused when it isn't `services` or `hosts`, and `hosts` is refused on a map drawn from traces. `service` is refused when it isn't a node on the map in the time range, and `depth` when it isn't from 1 to 3 or comes without `service`. `start_time` or `end_time` is refused when it's invalid or `end_time` isn't after `start_time`. The time range holds too much data to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for a shorter time range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "display_mode"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "source_id",
          "display_mode",
          "nodes",
          "connections"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.service_map.get"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/services": {
      "get": {
        "operationId": "list_service",
        "summary": "List the services a source detected, most recently seen first, as the **Services** page lists them.",
        "tags": [
          "service"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/services",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source whose services are listed. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "list_services": {
                "summary": "List services",
                "value": "123456"
              }
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "check"
              ]
            },
            "description": "Only services whose name contains this text, ignoring letter case."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Page to return, starting at 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 50,
              "maximum": 250
            },
            "description": "Results per page."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of service objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The `page` value isn't a whole number, or the token can access several teams and `team_id` doesn't name one of them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_seen_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "source_id",
          "name",
          "namespace",
          "platform",
          "platform_title",
          "matching",
          "source_types",
          "name_fields",
          "kubernetes_labels",
          "created_at",
          "last_seen_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.service.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/services/{id}": {
      "get": {
        "operationId": "get_service",
        "summary": "Get one service a source detected in its traces or logs.",
        "tags": [
          "service"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/services/:id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source that detected the service. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "get_a_service": {
                "summary": "Get a service",
                "value": "123456"
              }
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "789"
              ]
            },
            "description": "The service's ID, as listing a source's services returns it.",
            "x-path-wildcard": false,
            "examples": {
              "get_a_service": {
                "summary": "Get a service",
                "value": "789"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single service.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "Your role doesn't allow viewing this, or the token can't be used for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources, or the source has no service with that ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "The request was understood but failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-cli-default-fields": [
          "id",
          "name",
          "platform",
          "source_types",
          "last_seen_at"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "source_id",
          "name",
          "namespace",
          "platform",
          "platform_title",
          "matching",
          "source_types",
          "name_fields",
          "kubernetes_labels",
          "created_at",
          "last_seen_at"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.service.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/services/{service_id}/operations": {
      "get": {
        "operationId": "list_service_operation",
        "summary": "List a service's operations in a time range, most called first.",
        "tags": [
          "service_operation"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/services/:service_id/operations",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Source that detected the service. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "incoming_requests_of_a_service": {
                "summary": "Incoming requests of a service",
                "value": "123456"
              }
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "789"
              ]
            },
            "description": "The service's ID. Get it via [List services](/docs/logs/api/services/list/).",
            "x-path-wildcard": false,
            "examples": {
              "incoming_requests_of_a_service": {
                "summary": "Incoming requests of a service",
                "value": "789"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-6h"
              ]
            },
            "description": "Start of the time range. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`.",
            "examples": {
              "incoming_requests_of_a_service": {
                "summary": "Incoming requests of a service",
                "value": "now-6h"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 100,
              "examples": [
                20
              ]
            },
            "description": "How many operations to return, from 1 to 1000."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "server",
                "client",
                "internal",
                "producer",
                "consumer"
              ],
              "x-enum-descriptions": {
                "server": "Matches spans that handle an incoming request.",
                "client": "Matches spans that make an outgoing request.",
                "internal": "Matches spans of work inside the service.",
                "producer": "Matches spans that send a message to a queue.",
                "consumer": "Matches spans that receive a message from a queue."
              },
              "examples": [
                "server"
              ]
            },
            "description": "Only spans of this kind.",
            "examples": {
              "incoming_requests_of_a_service": {
                "summary": "Incoming requests of a service",
                "value": "server"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of service_operation objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceOperationList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources, or the source has no service with that ID. Find the service via [List services](/docs/logs/api/services/list/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is unknown, or a value is refused and `invalid_values` names it. `kind` isn't one of the allowed values, `limit` isn't from 1 to 1000, `start_time` or `end_time` is invalid, `end_time` isn't after `start_time`, or the source doesn't hold spans. The time range holds too many spans to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for each window with its `start_time` and `end_time`, or for a shorter time range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every operation in one page. Use an operation's `name` as `operation` to find its traces."
        ],
        "x-cli-default-fields": [
          "name",
          "kind",
          "span_count",
          "error_count",
          "avg_duration_ms"
        ],
        "x-cli-name-fields": [
          "name"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "name",
          "kind",
          "span_count",
          "error_count",
          "avg_duration_ms",
          "max_duration_ms"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.service_operation.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/traces": {
      "get": {
        "operationId": "list_trace",
        "summary": "List a source's newest traces that have a span matching every filter.",
        "tags": [
          "trace"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/traces",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Spans source whose traces are listed. Get its ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "failed_checkouts": {
                "summary": "Failed checkouts",
                "value": "123456"
              },
              "slow_requests_to_one_route": {
                "summary": "Slow requests to one route",
                "value": "123456"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-6h"
              ]
            },
            "description": "Start of the time range. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`.",
            "examples": {
              "failed_checkouts": {
                "summary": "Failed checkouts",
                "value": "now-6h"
              },
              "slow_requests_to_one_route": {
                "summary": "Slow requests to one route",
                "value": "now-1h"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 20,
              "examples": [
                50
              ]
            },
            "description": "How many traces to return, from 1 to 100."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "checkout"
              ]
            },
            "description": "Only traces with a span of this service, by its `name` from [List services](/docs/logs/api/services/list/).",
            "examples": {
              "failed_checkouts": {
                "summary": "Failed checkouts",
                "value": "checkout"
              }
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "POST /api/checkout"
              ]
            },
            "description": "Only traces with a span of this name, such as a service operation's `name`."
          },
          {
            "name": "attributes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": true,
              "examples": [
                {
                  "http.route": "/api/checkout"
                }
              ]
            },
            "description": "Only traces with a span whose attributes have these values. Send each as `attributes[http.route]=/api/checkout`. A span's resource attributes match too. Accepts up to 10 attributes, and they must all match on the same span."
          },
          {
            "name": "min_duration_ms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "examples": [
                500
              ]
            },
            "description": "Only traces with a span that lasted at least this many milliseconds.",
            "examples": {
              "slow_requests_to_one_route": {
                "summary": "Slow requests to one route",
                "value": 1000
              }
            }
          },
          {
            "name": "max_duration_ms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "examples": [
                2000
              ]
            },
            "description": "Only traces with a span that lasted at most this many milliseconds."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "error",
                "ok"
              ],
              "x-enum-descriptions": {
                "error": "Matches a span that failed. A span failed when its status is an error, its HTTP response status is 400 or higher, or its gRPC status isn't `OK`.",
                "ok": "Matches a span that didn't fail."
              },
              "examples": [
                "error"
              ]
            },
            "description": "Only traces with a span of this status.",
            "examples": {
              "failed_checkouts": {
                "summary": "Failed checkouts",
                "value": "error"
              }
            }
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of trace objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceList"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources. Find your sources via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is unknown, or a value is refused and `invalid_values` names it. `status` isn't `error` or `ok`, `limit` isn't from 1 to 100, a duration isn't a number of 0 or more, `max_duration_ms` is below `min_duration_ms`, `attributes` isn't sent as `attributes[<name>]=<value>` or has more than 10 attributes, `start_time` or `end_time` is invalid, `end_time` isn't after `start_time`, or the source doesn't hold spans. The time range holds too many spans to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for each window with its `start_time` and `end_time`, or for a shorter time range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Returns every trace in one page, the trace with the newest matching span first. A source with no matching span in the time range returns an empty list."
        ],
        "x-cli-default-fields": [
          "id",
          "start_time",
          "duration_ms",
          "root_service",
          "root_operation",
          "span_count",
          "error_count"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "trace_id",
          "start_time",
          "duration_ms",
          "root_service",
          "root_operation",
          "span_count",
          "error_count",
          "services",
          "spans",
          "truncated_row_count",
          "orphaned_span_count",
          "warnings"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.trace.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    },
    "/api/v4/sources/{source_id}/traces/{trace_id}": {
      "get": {
        "operationId": "get_trace",
        "summary": "Get the spans of a trace from a source and its connected sources, as a compact tree.",
        "description": "Repeated sibling spans under one parent, such as the same query, route or call, are collapsed into one row.",
        "tags": [
          "trace"
        ],
        "security": [
          {
            "teamApiToken": []
          },
          {
            "globalApiToken": []
          },
          {
            "userOauth": []
          }
        ],
        "x-access": "read",
        "x-api": "telemetry",
        "x-cli": true,
        "x-endpoint": "GET /api/v4/sources/:source_id/traces/:trace_id",
        "parameters": [
          {
            "name": "source_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "123456"
              ]
            },
            "description": "Spans source the trace is read from, along with the source's connected sources. Get the source ID via [List sources](/docs/logs/api/list-all-existing-sources/).",
            "x-path-wildcard": false,
            "examples": {
              "a_trace_from_the_last_6_hours": {
                "summary": "A trace from the last 6 hours",
                "value": "123456"
              }
            }
          },
          {
            "name": "trace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "[\\w-]{1,128}",
              "examples": [
                "8260a352ac09d8099d76828730511db6"
              ]
            },
            "description": "The trace ID, such as `8260a352ac09d8099d76828730511db6`. Letters, digits, `-` and `_`, up to 128 characters.",
            "x-path-wildcard": false,
            "examples": {
              "a_trace_from_the_last_6_hours": {
                "summary": "A trace from the last 6 hours",
                "value": "8260a352ac09d8099d76828730511db6"
              }
            }
          },
          {
            "name": "start_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now-6h"
              ]
            },
            "description": "Start of the time range to look for the trace's spans in. Accepts an ISO 8601 timestamp, in UTC when it has no time zone, a relative time like `now-1h` or `now-2h45m`, or a Unix timestamp in seconds, milliseconds, microseconds or nanoseconds. Defaults to `now-1h`, so set it for an older trace.",
            "examples": {
              "a_trace_from_the_last_6_hours": {
                "summary": "A trace from the last 6 hours",
                "value": "now-6h"
              }
            }
          },
          {
            "name": "end_time",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "now"
              ]
            },
            "description": "End of the time range, in the same forms as `start_time`. Must be after `start_time`. Defaults to `now`."
          },
          {
            "name": "team_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."
          }
        ],
        "responses": {
          "200": {
            "description": "A single trace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceDocument"
                }
              }
            }
          },
          "401": {
            "description": "The API token is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "403": {
            "description": "With an OAuth token, the user's role doesn't grant Live tail in the source's team, or the API token's scopes don't include this product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "404": {
            "description": "The `source_id` value isn't one of your sources, or no span of the trace is in the time range. Set an earlier `start_time` for an older trace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is unknown, or a value is refused and `invalid_values` names it. `trace_id` has characters other than letters, digits, `-` and `_`, `start_time` or `end_time` is invalid, `end_time` isn't after `start_time`, or the source doesn't hold spans. The time range holds too many spans of the source to read. `errors` says why, and `refusal` lists time windows that each fit, the same way [Run a query](/docs/logs/api/query/) does. Ask for a shorter time range around the trace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryError"
                }
              }
            }
          }
        },
        "x-notes": [
          "Reads at most 5,000 spans of the trace from each source, the newest first. Connected sources are read too."
        ],
        "x-cli-default-fields": [
          "id",
          "start_time",
          "duration_ms",
          "span_count",
          "error_count",
          "services"
        ],
        "x-cli-response-fields": [
          "id",
          "type",
          "trace_id",
          "start_time",
          "duration_ms",
          "root_service",
          "root_operation",
          "span_count",
          "error_count",
          "services",
          "spans",
          "truncated_row_count",
          "orphaned_span_count",
          "warnings"
        ],
        "x-cli-response-schema": {
          "$ref": "#/components/schemas/CLIResponse.telemetry.trace.list"
        },
        "x-response-envelope": {
          "item_path": [
            "data"
          ],
          "list_path": [
            "data"
          ],
          "attributes_path": [
            "attributes"
          ],
          "id_path": [
            "id"
          ],
          "type_path": [
            "type"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "teamApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token scoped to one team."
      },
      "globalApiToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Organization-wide API token that can reach several teams."
      },
      "userOauth": {
        "type": "oauth2",
        "flows": {},
        "description": "OAuth access token bound to a signed-in user."
      }
    },
    "schemas": {
      "Alert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The alert's id."
          },
          "type": {
            "type": "string",
            "const": "alert"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "dashboard_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Dashboard of the chart this alert watches. `null` for an alert on an exploration.",
                "examples": [
                  "123"
                ]
              },
              "chart_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Chart this alert watches, on the dashboard in `dashboard_id`. `null` for an alert on an exploration.",
                "examples": [
                  "456"
                ]
              },
              "exploration_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Exploration this alert watches. `null` for an alert on a dashboard chart.",
                "examples": [
                  "789"
                ]
              },
              "name": {
                "type": "string",
                "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
                "examples": [
                  "High Error Rate"
                ]
              },
              "alert_type": {
                "type": "string",
                "enum": [
                  "threshold",
                  "relative",
                  "anomaly_rrcf"
                ],
                "description": "Alert type. An update can change it.",
                "x-enum-descriptions": {
                  "threshold": "Fires when the value crosses a threshold.",
                  "relative": "Compares the value with the previous period as a percentage change.",
                  "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                },
                "examples": [
                  "threshold"
                ]
              },
              "operator": {
                "type": "string",
                "enum": [
                  "equal",
                  "not_equal",
                  "higher_than",
                  "higher_than_or_equal",
                  "lower_than",
                  "lower_than_or_equal",
                  "increases_by",
                  "decreases_by",
                  "changes_by"
                ],
                "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
                "x-enum-descriptions": {
                  "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                  "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                  "higher_than": "A `threshold` alert fires when the value is above `value`.",
                  "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                  "lower_than": "A `threshold` alert fires when the value is below `value`.",
                  "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                  "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                  "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                  "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                },
                "examples": [
                  "higher_than"
                ]
              },
              "value": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
                "examples": [
                  100.0
                ]
              },
              "string_value": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
                "examples": [
                  "error"
                ]
              },
              "paused": {
                "type": "boolean",
                "description": "Whether the alert is paused.",
                "default": false,
                "examples": [
                  true
                ]
              },
              "paused_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the alert is paused. `Manually paused` for an alert paused by hand, or a sentence that says why Better Stack paused it. `null` when the alert isn't paused.",
                "readOnly": true,
                "examples": [
                  "Manually paused"
                ]
              },
              "query_period": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "The time window of data each check looks at, in seconds.",
                "examples": [
                  600
                ]
              },
              "confirmation_period": {
                "type": "integer",
                "format": "int64",
                "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
                "default": 60,
                "examples": [
                  120
                ]
              },
              "recovery_period": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
                "default": 60,
                "examples": [
                  60
                ]
              },
              "aggregation_interval": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds.",
                "examples": [
                  300
                ]
              },
              "check_period": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value.",
                "examples": [
                  300
                ]
              },
              "series_names": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`.",
                "examples": [
                  [
                    "error"
                  ]
                ]
              },
              "series_names_except": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used.",
                "examples": [
                  []
                ]
              },
              "source_variable": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
                "examples": [
                  "source:t123456_my_app"
                ]
              },
              "source_mode": {
                "type": "string",
                "enum": [
                  "source_variable",
                  "platforms_single_source",
                  "platforms_all_sources"
                ],
                "description": "How the alert picks its sources.",
                "x-enum-descriptions": {
                  "source_variable": "Runs on the sources in `source_variable`.",
                  "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                  "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                },
                "default": "source_variable",
                "examples": [
                  "source_variable"
                ]
              },
              "source_platforms": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
                "default": [],
                "examples": [
                  [
                    "kubernetes"
                  ]
                ]
              },
              "escalation_target": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "policy_id": {
                        "type": "string",
                        "description": "Escalation policy ID."
                      },
                      "policy_name": {
                        "type": "string",
                        "description": "Escalation policy name."
                      },
                      "team_id": {
                        "type": "string",
                        "pattern": "^t[1-9][0-9]*$",
                        "description": "Team ID, such as `t123`."
                      },
                      "team_name": {
                        "type": "string",
                        "description": "Team name.",
                        "readOnly": true
                      }
                    }
                  },
                  {
                    "type": "string",
                    "enum": [
                      "current_team",
                      "unknown"
                    ]
                  }
                ],
                "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
                "default": "current_team",
                "examples": [
                  {
                    "policy_id": "456",
                    "policy_name": "Critical Policy"
                  }
                ]
              },
              "incident_cause": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
                "examples": [
                  "Error rate exceeded {{current_value}}"
                ]
              },
              "incident_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
                "examples": [
                  "High error rate on Checkout API"
                ]
              },
              "incident_per_series": {
                "type": "boolean",
                "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "additional_conditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "alert_type": {
                      "type": "string",
                      "description": "The type of the condition, `threshold` or `relative`."
                    },
                    "operator": {
                      "type": "string",
                      "description": "The comparison the condition makes, from the same values as `operator`."
                    },
                    "value": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Threshold value. `null` when the condition compares `string_value`."
                    },
                    "string_value": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Threshold value for a string series. `null` when the condition compares `value`."
                    },
                    "series_names": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The series the condition is limited to. An empty list means every series."
                    },
                    "series_names_except": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The series the condition ignores while it watches every other series."
                    }
                  }
                },
                "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
                "examples": [
                  [
                    {
                      "alert_type": "relative",
                      "operator": "increases_by",
                      "value": 10
                    }
                  ]
                ]
              },
              "variable_values": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of a variable on the alert's dashboard or exploration."
                    },
                    "selected_label": {
                      "type": "string",
                      "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The values the alert uses for the variable, as strings."
                    }
                  }
                },
                "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
                "examples": [
                  [
                    {
                      "name": "environment",
                      "selected_label": "production",
                      "values": [
                        "production"
                      ]
                    }
                  ]
                ]
              },
              "on_missing_data": {
                "type": "string",
                "enum": [
                  "treat_as_zero",
                  "dont_fire",
                  "treat_as_previous",
                  "start_incident"
                ],
                "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
                "x-enum-descriptions": {
                  "treat_as_zero": "Checks the missing data as if the value were 0.",
                  "dont_fire": "Starts no incident for missing data.",
                  "treat_as_previous": "Checks the missing data as if it had the previous value.",
                  "start_incident": "Starts an incident when the query returns no data."
                },
                "examples": [
                  "dont_fire"
                ]
              },
              "anomaly_sensitivity": {
                "type": "number",
                "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
                "examples": [
                  5.0
                ]
              },
              "anomaly_trigger": {
                "type": "string",
                "enum": [
                  "any",
                  "higher",
                  "lower"
                ],
                "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                "x-enum-descriptions": {
                  "any": "Fires on values above or below the prediction.",
                  "higher": "Fires on values above the prediction.",
                  "lower": "Fires on values below the prediction."
                },
                "examples": [
                  "any"
                ]
              },
              "shown_interval": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts.",
                "examples": [
                  300
                ]
              },
              "anomaly_training_range_days": {
                "type": "integer",
                "format": "int64",
                "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
                "examples": [
                  7
                ]
              },
              "call": {
                "type": "boolean",
                "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
                "examples": [
                  true
                ]
              },
              "sms": {
                "type": "boolean",
                "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
                "examples": [
                  false
                ]
              },
              "email": {
                "type": "boolean",
                "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
                "examples": [
                  true
                ]
              },
              "push": {
                "type": "boolean",
                "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
                "examples": [
                  true
                ]
              },
              "critical_alert": {
                "type": "boolean",
                "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
                "examples": [
                  false
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the alert was created.",
                "readOnly": true,
                "examples": [
                  "2026-03-25T10:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the alert was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-03-25T10:00:00.000Z"
                ]
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata.",
                "examples": [
                  {
                    "runbook": [
                      "https://wiki.example.com/runbook"
                    ],
                    "env": [
                      "production"
                    ]
                  }
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the alert's dashboard or exploration, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "alert_type": {
                      "enum": [
                        "threshold",
                        "relative"
                      ]
                    }
                  },
                  "required": [
                    "alert_type"
                  ]
                },
                "then": {
                  "properties": {
                    "on_missing_data": {
                      "default": "dont_fire"
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "alert_type": {
                      "not": {
                        "enum": [
                          "threshold",
                          "relative"
                        ]
                      }
                    }
                  },
                  "required": [
                    "alert_type"
                  ]
                },
                "then": {
                  "properties": {
                    "on_missing_data": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "alert_type": {
                      "enum": [
                        "anomaly_rrcf"
                      ]
                    }
                  },
                  "required": [
                    "alert_type"
                  ]
                },
                "then": {
                  "properties": {
                    "anomaly_sensitivity": {
                      "default": 5.0
                    },
                    "anomaly_trigger": {
                      "default": "any"
                    },
                    "anomaly_training_range_days": {
                      "default": 7
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "alert_type": {
                      "not": {
                        "enum": [
                          "anomaly_rrcf"
                        ]
                      }
                    }
                  },
                  "required": [
                    "alert_type"
                  ]
                },
                "then": {
                  "properties": {
                    "anomaly_sensitivity": false,
                    "anomaly_trigger": false,
                    "anomaly_training_range_days": false
                  }
                }
              }
            ]
          }
        }
      },
      "AlertCreate": {
        "$ref": "#/components/schemas/AlertCreateAttributes"
      },
      "AlertCreateAttributes": {
        "type": "object",
        "properties": {
          "dashboard_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dashboard of the chart this alert watches. `null` for an alert on an exploration. Set it with `chart_id` for an alert on a dashboard chart, or set `exploration_id` instead. Can't be changed after the alert is created.",
            "examples": [
              "123"
            ]
          },
          "chart_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chart this alert watches, on the dashboard in `dashboard_id`. `null` for an alert on an exploration. Can't be changed after the alert is created.",
            "examples": [
              "456"
            ]
          },
          "exploration_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exploration this alert watches. `null` for an alert on a dashboard chart. Set it instead of `dashboard_id` and `chart_id` for an alert on an exploration. Can't be changed after the alert is created.",
            "examples": [
              "789"
            ]
          },
          "name": {
            "type": "string",
            "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
            "examples": [
              "High Error Rate"
            ]
          },
          "alert_type": {
            "type": "string",
            "enum": [
              "threshold",
              "relative",
              "anomaly_rrcf"
            ],
            "description": "Alert type. An update can change it.",
            "x-enum-descriptions": {
              "threshold": "Fires when the value crosses a threshold.",
              "relative": "Compares the value with the previous period as a percentage change.",
              "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
            },
            "examples": [
              "threshold"
            ]
          },
          "operator": {
            "type": "string",
            "enum": [
              "equal",
              "not_equal",
              "higher_than",
              "higher_than_or_equal",
              "lower_than",
              "lower_than_or_equal",
              "increases_by",
              "decreases_by",
              "changes_by"
            ],
            "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
            "x-enum-descriptions": {
              "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
              "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
              "higher_than": "A `threshold` alert fires when the value is above `value`.",
              "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
              "lower_than": "A `threshold` alert fires when the value is below `value`.",
              "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
              "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
              "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
              "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
            },
            "examples": [
              "higher_than"
            ]
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
            "examples": [
              100.0
            ]
          },
          "string_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
            "examples": [
              "error"
            ]
          },
          "paused": {
            "type": "boolean",
            "description": "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored.",
            "default": false,
            "examples": [
              true
            ]
          },
          "query_period": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60.",
            "examples": [
              600
            ]
          },
          "confirmation_period": {
            "type": "integer",
            "format": "int64",
            "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
            "default": 60,
            "examples": [
              120
            ]
          },
          "recovery_period": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
            "default": 60,
            "examples": [
              60
            ]
          },
          "aggregation_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60.",
            "examples": [
              300
            ]
          },
          "check_period": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert.",
            "examples": [
              300
            ]
          },
          "series_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both.",
            "examples": [
              [
                "error"
              ]
            ]
          },
          "series_names_except": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both.",
            "examples": [
              []
            ]
          },
          "source_variable": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
            "examples": [
              "source:t123456_my_app"
            ]
          },
          "source_mode": {
            "type": "string",
            "enum": [
              "source_variable",
              "platforms_single_source",
              "platforms_all_sources"
            ],
            "description": "How the alert picks its sources.",
            "x-enum-descriptions": {
              "source_variable": "Runs on the sources in `source_variable`.",
              "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
              "platforms_all_sources": "Runs on every source that matches `source_platforms`."
            },
            "default": "source_variable",
            "examples": [
              "source_variable"
            ]
          },
          "source_platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
            "default": [],
            "examples": [
              [
                "kubernetes"
              ]
            ]
          },
          "escalation_target": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string",
                    "description": "Escalation policy ID."
                  },
                  "policy_name": {
                    "type": "string",
                    "description": "Escalation policy name."
                  },
                  "team_id": {
                    "type": "string",
                    "pattern": "^t[1-9][0-9]*$",
                    "description": "Team ID, such as `t123`."
                  },
                  "team_name": {
                    "type": "string",
                    "description": "Team name.",
                    "readOnly": true
                  }
                }
              },
              {
                "type": "string",
                "enum": [
                  "current_team",
                  "unknown"
                ]
              }
            ],
            "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
            "default": "current_team",
            "examples": [
              {
                "policy_id": "456",
                "policy_name": "Critical Policy"
              }
            ]
          },
          "incident_cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
            "examples": [
              "Error rate exceeded {{current_value}}"
            ]
          },
          "incident_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
            "examples": [
              "High error rate on Checkout API"
            ]
          },
          "incident_per_series": {
            "type": "boolean",
            "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
            "default": false,
            "examples": [
              false
            ]
          },
          "additional_conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alert_type": {
                  "type": "string",
                  "description": "The type of the condition, `threshold` or `relative`."
                },
                "operator": {
                  "type": "string",
                  "description": "The comparison the condition makes, from the same values as `operator`."
                },
                "value": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Threshold value. `null` when the condition compares `string_value`."
                },
                "string_value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Threshold value for a string series. `null` when the condition compares `value`."
                },
                "series_names": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series the condition is limited to. An empty list means every series."
                },
                "series_names_except": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series the condition ignores while it watches every other series."
                }
              }
            },
            "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
            "examples": [
              [
                {
                  "alert_type": "relative",
                  "operator": "increases_by",
                  "value": 10
                }
              ]
            ]
          },
          "variable_values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of a variable on the alert's dashboard or exploration."
                },
                "selected_label": {
                  "type": "string",
                  "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The values the alert uses for the variable, as strings."
                }
              }
            },
            "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
            "examples": [
              [
                {
                  "name": "environment",
                  "selected_label": "production",
                  "values": [
                    "production"
                  ]
                }
              ]
            ]
          },
          "on_missing_data": {
            "type": "string",
            "enum": [
              "treat_as_zero",
              "dont_fire",
              "treat_as_previous",
              "start_incident"
            ],
            "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
            "x-enum-descriptions": {
              "treat_as_zero": "Checks the missing data as if the value were 0.",
              "dont_fire": "Starts no incident for missing data.",
              "treat_as_previous": "Checks the missing data as if it had the previous value.",
              "start_incident": "Starts an incident when the query returns no data."
            },
            "examples": [
              "dont_fire"
            ]
          },
          "anomaly_sensitivity": {
            "type": "number",
            "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
            "examples": [
              5.0
            ]
          },
          "anomaly_trigger": {
            "type": "string",
            "enum": [
              "any",
              "higher",
              "lower"
            ],
            "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
            "x-enum-descriptions": {
              "any": "Fires on values above or below the prediction.",
              "higher": "Fires on values above the prediction.",
              "lower": "Fires on values below the prediction."
            },
            "examples": [
              "any"
            ]
          },
          "shown_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.",
            "examples": [
              300
            ]
          },
          "anomaly_training_range_days": {
            "type": "integer",
            "format": "int64",
            "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
            "examples": [
              7
            ]
          },
          "call": {
            "type": "boolean",
            "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
            "examples": [
              true
            ]
          },
          "sms": {
            "type": "boolean",
            "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
            "examples": [
              false
            ]
          },
          "email": {
            "type": "boolean",
            "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
            "examples": [
              true
            ]
          },
          "push": {
            "type": "boolean",
            "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
            "examples": [
              true
            ]
          },
          "critical_alert": {
            "type": "boolean",
            "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
            "examples": [
              false
            ]
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`.",
            "examples": [
              {
                "runbook": [
                  "https://wiki.example.com/runbook"
                ],
                "env": [
                  "production"
                ]
              }
            ]
          }
        },
        "required": [
          "name",
          "alert_type"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "alert_type": {
                  "enum": [
                    "threshold",
                    "relative"
                  ]
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "on_missing_data": {
                  "default": "dont_fire"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "alert_type": {
                  "not": {
                    "enum": [
                      "threshold",
                      "relative"
                    ]
                  }
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "on_missing_data": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "alert_type": {
                  "enum": [
                    "anomaly_rrcf"
                  ]
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "anomaly_sensitivity": {
                  "default": 5.0
                },
                "anomaly_trigger": {
                  "default": "any"
                },
                "anomaly_training_range_days": {
                  "default": 7
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "alert_type": {
                  "not": {
                    "enum": [
                      "anomaly_rrcf"
                    ]
                  }
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "anomaly_sensitivity": false,
                "anomaly_trigger": false,
                "anomaly_training_range_days": false
              }
            }
          }
        ],
        "anyOf": [
          {
            "required": [
              "dashboard_id",
              "chart_id"
            ]
          },
          {
            "required": [
              "exploration_id"
            ]
          }
        ],
        "not": {
          "anyOf": [
            {
              "required": [
                "dashboard_id",
                "exploration_id"
              ]
            },
            {
              "required": [
                "chart_id",
                "exploration_id"
              ]
            }
          ]
        }
      },
      "AlertDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Alert"
          }
        }
      },
      "AlertList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Alert"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "AlertUpdate": {
        "$ref": "#/components/schemas/AlertUpdateAttributes"
      },
      "AlertUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
            "examples": [
              "High Error Rate"
            ]
          },
          "alert_type": {
            "type": "string",
            "enum": [
              "threshold",
              "relative",
              "anomaly_rrcf"
            ],
            "description": "Alert type. An update can change it.",
            "x-enum-descriptions": {
              "threshold": "Fires when the value crosses a threshold.",
              "relative": "Compares the value with the previous period as a percentage change.",
              "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
            },
            "examples": [
              "threshold"
            ]
          },
          "operator": {
            "type": "string",
            "enum": [
              "equal",
              "not_equal",
              "higher_than",
              "higher_than_or_equal",
              "lower_than",
              "lower_than_or_equal",
              "increases_by",
              "decreases_by",
              "changes_by"
            ],
            "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.",
            "x-enum-descriptions": {
              "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
              "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
              "higher_than": "A `threshold` alert fires when the value is above `value`.",
              "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
              "lower_than": "A `threshold` alert fires when the value is below `value`.",
              "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
              "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
              "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
              "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
            },
            "examples": [
              "higher_than"
            ]
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
            "examples": [
              100.0
            ]
          },
          "string_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
            "examples": [
              "error"
            ]
          },
          "paused": {
            "type": "boolean",
            "description": "Whether the alert is paused. Send it as a JSON boolean, because the string `\"true\"` is ignored.",
            "default": false,
            "examples": [
              true
            ]
          },
          "query_period": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The time window of data each check looks at, in seconds. Defaults to `aggregation_interval`, then `check_period`, then 60.",
            "examples": [
              600
            ]
          },
          "confirmation_period": {
            "type": "integer",
            "format": "int64",
            "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
            "default": 60,
            "examples": [
              120
            ]
          },
          "recovery_period": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
            "default": 60,
            "examples": [
              60
            ]
          },
          "aggregation_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds. Defaults to `query_period`, then `check_period`, then 60.",
            "examples": [
              300
            ]
          },
          "check_period": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value. Required when creating a threshold or relative alert.",
            "examples": [
              300
            ]
          },
          "series_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`. Setting either one replaces both.",
            "examples": [
              [
                "error"
              ]
            ]
          },
          "series_names_except": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used. Setting either one replaces both.",
            "examples": [
              []
            ]
          },
          "source_variable": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
            "examples": [
              "source:t123456_my_app"
            ]
          },
          "source_mode": {
            "type": "string",
            "enum": [
              "source_variable",
              "platforms_single_source",
              "platforms_all_sources"
            ],
            "description": "How the alert picks its sources.",
            "x-enum-descriptions": {
              "source_variable": "Runs on the sources in `source_variable`.",
              "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
              "platforms_all_sources": "Runs on every source that matches `source_platforms`."
            },
            "default": "source_variable",
            "examples": [
              "source_variable"
            ]
          },
          "source_platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
            "default": [],
            "examples": [
              [
                "kubernetes"
              ]
            ]
          },
          "escalation_target": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string",
                    "description": "Escalation policy ID."
                  },
                  "policy_name": {
                    "type": "string",
                    "description": "Escalation policy name."
                  },
                  "team_id": {
                    "type": "string",
                    "pattern": "^t[1-9][0-9]*$",
                    "description": "Team ID, such as `t123`."
                  },
                  "team_name": {
                    "type": "string",
                    "description": "Team name.",
                    "readOnly": true
                  }
                }
              },
              {
                "type": "string",
                "enum": [
                  "current_team",
                  "unknown"
                ]
              }
            ],
            "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
            "default": "current_team",
            "examples": [
              {
                "policy_id": "456",
                "policy_name": "Critical Policy"
              }
            ]
          },
          "incident_cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
            "examples": [
              "Error rate exceeded {{current_value}}"
            ]
          },
          "incident_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
            "examples": [
              "High error rate on Checkout API"
            ]
          },
          "incident_per_series": {
            "type": "boolean",
            "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
            "default": false,
            "examples": [
              false
            ]
          },
          "additional_conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alert_type": {
                  "type": "string",
                  "description": "The type of the condition, `threshold` or `relative`."
                },
                "operator": {
                  "type": "string",
                  "description": "The comparison the condition makes, from the same values as `operator`."
                },
                "value": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Threshold value. `null` when the condition compares `string_value`."
                },
                "string_value": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Threshold value for a string series. `null` when the condition compares `value`."
                },
                "series_names": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series the condition is limited to. An empty list means every series."
                },
                "series_names_except": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series the condition ignores while it watches every other series."
                }
              }
            },
            "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
            "examples": [
              [
                {
                  "alert_type": "relative",
                  "operator": "increases_by",
                  "value": 10
                }
              ]
            ]
          },
          "variable_values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of a variable on the alert's dashboard or exploration."
                },
                "selected_label": {
                  "type": "string",
                  "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The values the alert uses for the variable, as strings."
                }
              }
            },
            "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
            "examples": [
              [
                {
                  "name": "environment",
                  "selected_label": "production",
                  "values": [
                    "production"
                  ]
                }
              ]
            ]
          },
          "on_missing_data": {
            "type": "string",
            "enum": [
              "treat_as_zero",
              "dont_fire",
              "treat_as_previous",
              "start_incident"
            ],
            "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.",
            "x-enum-descriptions": {
              "treat_as_zero": "Checks the missing data as if the value were 0.",
              "dont_fire": "Starts no incident for missing data.",
              "treat_as_previous": "Checks the missing data as if it had the previous value.",
              "start_incident": "Starts an incident when the query returns no data."
            },
            "examples": [
              "dont_fire"
            ]
          },
          "anomaly_sensitivity": {
            "type": "number",
            "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
            "examples": [
              5.0
            ]
          },
          "anomaly_trigger": {
            "type": "string",
            "enum": [
              "any",
              "higher",
              "lower"
            ],
            "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
            "x-enum-descriptions": {
              "any": "Fires on values above or below the prediction.",
              "higher": "Fires on values above the prediction.",
              "lower": "Fires on values below the prediction."
            },
            "examples": [
              "any"
            ]
          },
          "shown_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts. Defaults to 10800 when an anomaly alert is created.",
            "examples": [
              300
            ]
          },
          "anomaly_training_range_days": {
            "type": "integer",
            "format": "int64",
            "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
            "examples": [
              7
            ]
          },
          "call": {
            "type": "boolean",
            "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
            "examples": [
              true
            ]
          },
          "sms": {
            "type": "boolean",
            "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
            "examples": [
              false
            ]
          },
          "email": {
            "type": "boolean",
            "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
            "examples": [
              true
            ]
          },
          "push": {
            "type": "boolean",
            "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
            "examples": [
              true
            ]
          },
          "critical_alert": {
            "type": "boolean",
            "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
            "examples": [
              false
            ]
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata. An empty object clears the metadata, which then reads back as `null`.",
            "examples": [
              {
                "runbook": [
                  "https://wiki.example.com/runbook"
                ],
                "env": [
                  "production"
                ]
              }
            ]
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "alert_type": {
                  "enum": [
                    "threshold",
                    "relative"
                  ]
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "on_missing_data": {
                  "default": "dont_fire"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "alert_type": {
                  "not": {
                    "enum": [
                      "threshold",
                      "relative"
                    ]
                  }
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "on_missing_data": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "alert_type": {
                  "enum": [
                    "anomaly_rrcf"
                  ]
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "anomaly_sensitivity": {
                  "default": 5.0
                },
                "anomaly_trigger": {
                  "default": "any"
                },
                "anomaly_training_range_days": {
                  "default": 7
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "alert_type": {
                  "not": {
                    "enum": [
                      "anomaly_rrcf"
                    ]
                  }
                }
              },
              "required": [
                "alert_type"
              ]
            },
            "then": {
              "properties": {
                "anomaly_sensitivity": false,
                "anomaly_trigger": false,
                "anomaly_training_range_days": false
              }
            }
          }
        ]
      },
      "AwsLogGroupSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The aws_log_group_subscription's id."
          },
          "type": {
            "type": "string",
            "const": "aws_log_group_subscription"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "region": {
                "type": "string",
                "description": "AWS region of the log group.",
                "examples": [
                  "us-east-1"
                ]
              },
              "name": {
                "type": "string",
                "description": "CloudWatch log-group name.",
                "examples": [
                  "/aws/lambda/checkout"
                ]
              },
              "subscribed": {
                "type": "boolean",
                "description": "`true` subscribes the log group. `false` keeps it unsubscribed, even when automatic subscription is on.",
                "examples": [
                  true
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the override was created.",
                "readOnly": true,
                "examples": [
                  "2026-08-19T12:30:41.695Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the override was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-08-19T12:30:41.695Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the source, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            }
          }
        }
      },
      "AwsLogGroupSubscriptionCreate": {
        "$ref": "#/components/schemas/AwsLogGroupSubscriptionCreateAttributes"
      },
      "AwsLogGroupSubscriptionCreateAttributes": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string",
            "description": "AWS region of the log group.",
            "examples": [
              "us-east-1"
            ]
          },
          "name": {
            "type": "string",
            "description": "CloudWatch log-group name.",
            "examples": [
              "/aws/lambda/checkout"
            ]
          },
          "subscribed": {
            "type": "boolean",
            "description": "`true` subscribes the log group. `false` keeps it unsubscribed, even when automatic subscription is on.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "region",
          "name",
          "subscribed"
        ]
      },
      "AwsLogGroupSubscriptionDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AwsLogGroupSubscription"
          }
        }
      },
      "AwsLogGroupSubscriptionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AwsLogGroupSubscription"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "AwsLogGroupSubscriptionUpdate": {
        "$ref": "#/components/schemas/AwsLogGroupSubscriptionUpdateAttributes"
      },
      "AwsLogGroupSubscriptionUpdateAttributes": {
        "type": "object",
        "properties": {
          "subscribed": {
            "type": "boolean",
            "description": "`true` subscribes the log group. `false` keeps it unsubscribed, even when automatic subscription is on.",
            "examples": [
              true
            ]
          }
        },
        "required": [
          "subscribed"
        ]
      },
      "CLIResponse.telemetry.alert.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "dashboard_id": {
            "type": "string",
            "description": "Dashboard of the chart this alert watches. `null` for an alert on an exploration.",
            "nullable": true,
            "sensitive": false
          },
          "chart_id": {
            "type": "string",
            "description": "Chart this alert watches, on the dashboard in `dashboard_id`. `null` for an alert on an exploration.",
            "nullable": true,
            "sensitive": false
          },
          "exploration_id": {
            "type": "string",
            "description": "Exploration this alert watches. `null` for an alert on a dashboard chart.",
            "nullable": true,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Alert name. Until you rename the alert, its name follows the chart's name.",
            "nullable": false,
            "sensitive": false
          },
          "alert_type": {
            "type": "string",
            "enum": [
              "threshold",
              "relative",
              "anomaly_rrcf"
            ],
            "description": "Alert type. An update can change it.\n\n- `threshold`: Fires when the value crosses a threshold.\n- `relative`: Compares the value with the previous period as a percentage change.\n- `anomaly_rrcf`: Uses machine learning anomaly detection. Table charts don't accept it.",
            "x-enum-descriptions": {
              "threshold": "Fires when the value crosses a threshold.",
              "relative": "Compares the value with the previous period as a percentage change.",
              "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
            },
            "nullable": false,
            "sensitive": false
          },
          "operator": {
            "type": "string",
            "enum": [
              "equal",
              "not_equal",
              "higher_than",
              "higher_than_or_equal",
              "lower_than",
              "lower_than_or_equal",
              "increases_by",
              "decreases_by",
              "changes_by"
            ],
            "description": "How the value is compared. Required for threshold and relative alerts. `anomaly_rrcf` alerts don't use it, and it's left out of their responses.\n\n- `equal`: A `threshold` alert fires when the value equals `value` or `string_value`.\n- `not_equal`: A `threshold` alert fires when the value differs from `value` or `string_value`.\n- `higher_than`: A `threshold` alert fires when the value is above `value`.\n- `higher_than_or_equal`: A `threshold` alert fires when the value is at or above `value`.\n- `lower_than`: A `threshold` alert fires when the value is below `value`.\n- `lower_than_or_equal`: A `threshold` alert fires when the value is at or below `value`.\n- `increases_by`: A `relative` alert fires when the value rises by `value` percent or more.\n- `decreases_by`: A `relative` alert fires when the value falls by `value` percent or more.\n- `changes_by`: A `relative` alert fires when the value rises or falls by `value` percent or more.",
            "x-enum-descriptions": {
              "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
              "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
              "higher_than": "A `threshold` alert fires when the value is above `value`.",
              "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
              "lower_than": "A `threshold` alert fires when the value is below `value`.",
              "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
              "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
              "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
              "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
            },
            "nullable": false,
            "sensitive": false
          },
          "value": {
            "type": "number",
            "description": "The threshold for `threshold` alerts, or the percentage change for `relative` alerts. `0` is a valid value. `null` when the alert compares `string_value`. Creating a threshold or relative alert needs `value` or `string_value`. Left out for `anomaly_rrcf` alerts.",
            "nullable": true,
            "sensitive": false
          },
          "string_value": {
            "type": "string",
            "description": "The exact text a `threshold` alert compares, instead of `value`, with `equal` or `not_equal` only. When it's set, `value` isn't needed and is `null`. Returned for threshold alerts only.",
            "nullable": true,
            "sensitive": false
          },
          "paused": {
            "type": "boolean",
            "description": "Whether the alert is paused.",
            "nullable": false,
            "sensitive": false
          },
          "paused_reason": {
            "type": "string",
            "description": "Why the alert is paused. `Manually paused` for an alert paused by hand, or a sentence that says why Better Stack paused it. `null` when the alert isn't paused.",
            "nullable": true,
            "sensitive": false
          },
          "query_period": {
            "type": "integer",
            "format": "int64",
            "description": "The time window of data each check looks at, in seconds.",
            "nullable": true,
            "sensitive": false
          },
          "confirmation_period": {
            "type": "integer",
            "format": "int64",
            "description": "How long the condition must hold before an incident starts, in seconds, from `0` to `86400`. `0` starts it at once.",
            "nullable": false,
            "sensitive": false
          },
          "recovery_period": {
            "type": "integer",
            "format": "int64",
            "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
            "nullable": true,
            "sensitive": false
          },
          "aggregation_interval": {
            "type": "integer",
            "format": "int64",
            "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds.",
            "nullable": true,
            "sensitive": false
          },
          "check_period": {
            "type": "integer",
            "format": "int64",
            "description": "How often the alert is checked, in seconds. Not returned for `anomaly_rrcf` alerts. An update that sends `check_period` without `query_period` or `aggregation_interval` sets both of them to the same value.",
            "nullable": true,
            "sensitive": false
          },
          "series_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The series the alert is limited to. An empty list means every series. Can't be combined with `series_names_except`.",
            "nullable": false,
            "sensitive": false
          },
          "series_names_except": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The series the alert ignores while it watches every other series. Can't be combined with `series_names`, so it's empty when `series_names` is used.",
            "nullable": false,
            "sensitive": false
          },
          "source_variable": {
            "type": "string",
            "description": "The sources the alert runs on, as `source:` followed by comma-separated source table names, or `null` when none is set. With the `source_variable` and `platforms_single_source` modes, the value must start with `source:`.",
            "nullable": true,
            "sensitive": false
          },
          "source_mode": {
            "type": "string",
            "enum": [
              "source_variable",
              "platforms_single_source",
              "platforms_all_sources"
            ],
            "description": "How the alert picks its sources.\n\n- `source_variable`: Runs on the sources in `source_variable`.\n- `platforms_single_source`: Runs on the one source in `source_variable`, limited to `source_platforms`.\n- `platforms_all_sources`: Runs on every source that matches `source_platforms`.",
            "x-enum-descriptions": {
              "source_variable": "Runs on the sources in `source_variable`.",
              "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
              "platforms_all_sources": "Runs on every source that matches `source_platforms`."
            },
            "nullable": false,
            "sensitive": false
          },
          "source_platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes.",
            "nullable": false,
            "sensitive": false
          },
          "escalation_target": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string",
                    "description": "Escalation policy ID."
                  },
                  "policy_name": {
                    "type": "string",
                    "description": "Escalation policy name."
                  },
                  "team_id": {
                    "type": "string",
                    "pattern": "^t[1-9][0-9]*$",
                    "description": "Team ID, such as `t123`."
                  },
                  "team_name": {
                    "type": "string",
                    "description": "Team name.",
                    "readOnly": true
                  }
                }
              },
              {
                "type": "string",
                "enum": [
                  "current_team",
                  "unknown"
                ]
              }
            ],
            "description": "Where the incident is routed. Can be the string `current_team`, which is the default, an object with `policy_id` and `policy_name`, or an object with `team_id` and `team_name`. The string `unknown` means the target can't be found or no longer exists. Name a policy by ID, by name or both, and a team by `team_id`. An empty object routes to the current team too. A request is refused when it names both a policy and a team, names one that doesn't exist, or gives a policy name several policies share without an ID.",
            "nullable": false,
            "sensitive": false
          },
          "incident_cause": {
            "type": "string",
            "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set. Accepts the same template variables as `incident_name`, such as `{{current_value}}` and `{{threshold_value}}`.",
            "nullable": true,
            "sensitive": false
          },
          "incident_name": {
            "type": "string",
            "description": "A custom name for the incidents the alert starts, in plain text, or `null` when none is set. Accepts template variables such as `{{alert_name}}`, `{{series_name}}`, `{{current_value}}`, `{{threshold_value}}`, `{{team_name}}`, the chart's variables and the columns its query returns.",
            "nullable": true,
            "sensitive": false
          },
          "incident_per_series": {
            "type": "boolean",
            "description": "Whether each series that breaches the condition starts its own incident, rather than one incident for the whole alert.",
            "nullable": false,
            "sensitive": false
          },
          "additional_conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "alert_type": {
                  "type": "string",
                  "description": "The type of the condition, `threshold` or `relative`."
                },
                "operator": {
                  "type": "string",
                  "description": "The comparison the condition makes, from the same values as `operator`."
                },
                "value": {
                  "type": "number",
                  "description": "Threshold value. `null` when the condition compares `string_value`.",
                  "nullable": true
                },
                "string_value": {
                  "type": "string",
                  "description": "Threshold value for a string series. `null` when the condition compares `value`.",
                  "nullable": true
                },
                "series_names": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series the condition is limited to. An empty list means every series."
                },
                "series_names_except": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series the condition ignores while it watches every other series."
                }
              }
            },
            "description": "Up to 4 more conditions on top of the alert's own. A series fires only when it breaches the alert's own condition and every other condition that covers it, in the same time bucket. A condition limited to other series counts as met when any of its own series breaches it. Anomaly detection can't be an additional condition. An empty list removes them all.",
            "nullable": false,
            "sensitive": false
          },
          "variable_values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of a variable on the alert's dashboard or exploration."
                },
                "selected_label": {
                  "type": "string",
                  "description": "For a `select_predefined_sql` variable, the label of the filter the alert uses."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The values the alert uses for the variable, as strings."
                }
              }
            },
            "description": "Values this alert sets for the template variables of its dashboard or exploration. Each `name` must be a variable defined there. Source variables aren't accepted, so use `source_mode` and `source_variable` instead.",
            "nullable": false,
            "sensitive": false
          },
          "on_missing_data": {
            "type": "string",
            "enum": [
              "treat_as_zero",
              "dont_fire",
              "treat_as_previous",
              "start_incident"
            ],
            "description": "What a check does when the query returns no data. Can't be sent for `anomaly_rrcf` alerts, and is left out of their responses.\n\n- `treat_as_zero`: Checks the missing data as if the value were 0.\n- `dont_fire`: Starts no incident for missing data.\n- `treat_as_previous`: Checks the missing data as if it had the previous value.\n- `start_incident`: Starts an incident when the query returns no data.",
            "x-enum-descriptions": {
              "treat_as_zero": "Checks the missing data as if the value were 0.",
              "dont_fire": "Starts no incident for missing data.",
              "treat_as_previous": "Checks the missing data as if it had the previous value.",
              "start_incident": "Starts an incident when the query returns no data."
            },
            "nullable": false,
            "sensitive": false
          },
          "anomaly_sensitivity": {
            "type": "number",
            "description": "How far a value must deviate from its prediction to trigger the alert, for `anomaly_rrcf` alerts only. Shown as **Significance** in the web app. A higher value needs a larger deviation, so the alert fires less often. Left out for threshold and relative alerts.",
            "nullable": false,
            "sensitive": false
          },
          "anomaly_trigger": {
            "type": "string",
            "enum": [
              "any",
              "higher",
              "lower"
            ],
            "description": "Which direction of anomaly fires the alert, for `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.\n\n- `any`: Fires on values above or below the prediction.\n- `higher`: Fires on values above the prediction.\n- `lower`: Fires on values below the prediction.",
            "x-enum-descriptions": {
              "any": "Fires on values above or below the prediction.",
              "higher": "Fires on values above the prediction.",
              "lower": "Fires on values below the prediction."
            },
            "nullable": false,
            "sensitive": false
          },
          "shown_interval": {
            "type": "integer",
            "format": "int64",
            "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts only. One of 30, 60, 120, 300, 600, 1800, 3600, 7200, 10800, 21600, 43200 or 86400. Left out of the response on threshold and relative alerts.",
            "nullable": true,
            "sensitive": false
          },
          "anomaly_training_range_days": {
            "type": "integer",
            "format": "int64",
            "description": "Days of history the anomaly model is first trained on, from 1 to 30. For `anomaly_rrcf` alerts only. Left out of the response on threshold and relative alerts.",
            "nullable": false,
            "sensitive": false
          },
          "call": {
            "type": "boolean",
            "description": "Trigger phone-call alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without phone call alerts, unless the alert already has them on.",
            "nullable": false,
            "sensitive": false
          },
          "sms": {
            "type": "boolean",
            "description": "Trigger SMS alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without SMS alerts, unless the alert already has them on.",
            "nullable": false,
            "sensitive": false
          },
          "email": {
            "type": "boolean",
            "description": "Trigger e-mail alerts. Left out of responses when the alert routes to an escalation policy.",
            "nullable": false,
            "sensitive": false
          },
          "push": {
            "type": "boolean",
            "description": "Trigger mobile push alerts. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without push notifications, unless the alert already has them on.",
            "nullable": false,
            "sensitive": false
          },
          "critical_alert": {
            "type": "boolean",
            "description": "Trigger critical push alerts that bypass silent mode. Left out of responses when the alert routes to an escalation policy. Sending `true` is refused on a plan without critical alerts, unless the alert already has them on.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the alert was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the alert was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Custom incident metadata, where each key you choose holds a list of strings. A single string is accepted too and saved as a one-item list. The metadata is added to the alert's incidents. An update replaces all the metadata.",
            "nullable": true,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the alert's dashboard or exploration, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.alert.preview": {
        "type": "object",
        "properties": {
          "chart": {
            "type": "object",
            "additionalProperties": true,
            "description": "The chart replayed, with its `id`, `name` and `chart_type`.",
            "nullable": false,
            "sensitive": false
          },
          "configuration": {
            "type": "object",
            "additionalProperties": true,
            "description": "The settings the replay used. For an existing alert, those are its own settings with the ones you sent on top.",
            "nullable": false,
            "sensitive": false
          },
          "window": {
            "type": "object",
            "additionalProperties": true,
            "description": "The window replayed, with its `from`, `to`, length in `seconds` and `interval_seconds` per data point. `requested_from` and `requested_to` are the window asked for.",
            "nullable": false,
            "sensitive": false
          },
          "totals": {
            "type": "object",
            "additionalProperties": true,
            "description": "Totals for the replay. `incidents` is how many incidents the alert would have opened, and `incidents_per_day` how many a day. `alerting_seconds` is how long the alert would have been alerting, and `alerting_share` that time as a fraction of the window. `alerting_points` counts the data points that alerted.",
            "nullable": false,
            "sensitive": false
          },
          "incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "started_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the incident would have started, once the condition held for `confirmation_period`."
                },
                "ended_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the incident would have ended. For an incident still open, it's the end of the window.",
                  "nullable": true
                },
                "duration_seconds": {
                  "type": "integer",
                  "format": "int64",
                  "description": "How long the incident would have lasted, in seconds."
                },
                "series_names": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The series that caused the incident."
                },
                "open": {
                  "type": "boolean",
                  "description": "Whether the incident was still open at the end of the window."
                }
              }
            },
            "description": "The incidents the alert would have opened, oldest first.",
            "nullable": false,
            "sensitive": false
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The series name."
                },
                "alerting_points": {
                  "type": "integer",
                  "format": "int64",
                  "description": "How many of the series' data points breached the condition."
                }
              }
            },
            "description": "Every series the replay checked.",
            "nullable": false,
            "sensitive": false
          },
          "unchecked_series": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Series the anomaly detection couldn't check.",
            "nullable": false,
            "sensitive": false
          },
          "omitted_series": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Series the replay skipped. A replay checks at most 50 series, or 10 for an anomaly alert.",
            "nullable": false,
            "sensitive": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "A code to check for, such as `range_clamped`, `range_shortened`, `series_omitted` or `series_error`."
                },
                "message": {
                  "type": "string",
                  "description": "What the warning means for the numbers, in a sentence."
                }
              }
            },
            "description": "Reasons the numbers may be incomplete, such as a shortened window or skipped series.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.aws_log_group_subscription.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "region": {
            "type": "string",
            "description": "AWS region of the log group.",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "CloudWatch log-group name.",
            "nullable": false,
            "sensitive": false
          },
          "subscribed": {
            "type": "boolean",
            "description": "`true` subscribes the log group. `false` keeps it unsubscribed, even when automatic subscription is on.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the override was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the override was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the source, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.collector.databases": {
        "type": "object",
        "properties": {
          "service_type": {
            "type": "string",
            "description": "The database type, one of `postgres`, `pgcat`, `pgbouncer`, `mysql`, `redis`, `mongodb`, `memcached` or `elasticsearch`.",
            "nullable": false,
            "sensitive": false
          },
          "host": {
            "type": "string",
            "description": "Database host.",
            "nullable": false,
            "sensitive": false
          },
          "port": {
            "type": "integer",
            "format": "int64",
            "description": "Database port.",
            "nullable": false,
            "sensitive": false
          },
          "username": {
            "type": "string",
            "description": "The username the collector signs in to the database with.",
            "nullable": true,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "description": "The connection status, one of `pending`, `up`, `unreachable`, `down`, `invalid_credentials`, `configuration_required`, `disabled` or `removed`.",
            "nullable": false,
            "sensitive": false
          },
          "ssl_mode": {
            "type": "string",
            "description": "The SSL mode for PostgreSQL and its connection poolers, `disable`, `require` or `verify-ca`.",
            "nullable": true,
            "sensitive": false
          },
          "tls": {
            "type": "string",
            "description": "The TLS mode for MySQL, `false`, `true`, `skip-verify` or `preferred`.",
            "nullable": true,
            "sensitive": false
          },
          "service": {
            "type": "string",
            "description": "Service name.",
            "nullable": true,
            "sensitive": false
          },
          "container": {
            "type": "string",
            "description": "Detected container.",
            "nullable": true,
            "sensitive": false
          },
          "autogenerated": {
            "type": "boolean",
            "description": "Whether the collector discovered the database itself. `false` for a database someone added.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.collector.hosts": {
        "type": "object",
        "properties": {
          "hostname": {
            "type": "string",
            "description": "Reported hostname.",
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "description": "The host's status, one of `pending`, `up`, `degraded`, `unknown` or `down`. A host is `down` when it hasn't checked in for a minute or reported an error.",
            "nullable": false,
            "sensitive": false
          },
          "installed_as": {
            "type": "string",
            "description": "The platform the host reported, `docker`, `swarm` or `kubernetes`, or an empty string before it reports one.",
            "nullable": false,
            "sensitive": false
          },
          "collector_version": {
            "type": "string",
            "description": "Version of the collector running on the host, or `null` before it first checks in.",
            "nullable": true,
            "sensitive": false
          },
          "last_error": {
            "type": "string",
            "description": "The error the host reported when it last checked in, an empty string when there was none, or `null` before it first checks in.",
            "nullable": true,
            "sensitive": false
          },
          "system_information": {
            "type": "object",
            "additionalProperties": true,
            "description": "Kernel and eBPF compatibility details the host reported, such as `kernel_version`, `architecture`, `distribution` and `ebpf_supported`.",
            "nullable": false,
            "sensitive": false
          },
          "first_pinged_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the host first checked in, or `null` before it does.",
            "nullable": true,
            "sensitive": false
          },
          "pinged_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the host last checked in, or `null` before its first check-in.",
            "nullable": true,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.collector.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Collector name.",
            "nullable": false,
            "sensitive": false
          },
          "platform": {
            "type": "string",
            "enum": [
              "docker",
              "swarm",
              "kubernetes"
            ],
            "description": "Where the collector runs.",
            "nullable": false,
            "sensitive": false
          },
          "note": {
            "type": "string",
            "description": "A note about the collector.",
            "nullable": true,
            "sensitive": false
          },
          "data_region": {
            "type": "string",
            "description": "The data region, `europe`, `us`, `singapore` or a dedicated cluster's name from [List data regions](/docs/logs/api/data-regions/). Returned as that name.",
            "nullable": false,
            "sensitive": false
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days logs are kept, one of the retention periods your plan offers.",
            "nullable": false,
            "sensitive": false
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days metrics are kept, one of the retention periods your plan offers.",
            "nullable": false,
            "sensitive": false
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this collector.",
            "nullable": false,
            "sensitive": false
          },
          "collector_logs_transformation": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program the collector runs on each log line on your hardware, before sending it to Better Stack.",
            "nullable": true,
            "sensitive": false
          },
          "collector_metrics_transformation": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program the collector runs on each metric on your hardware, before sending it to Better Stack.",
            "nullable": true,
            "sensitive": false
          },
          "collector_traces_transformation": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program the collector runs on each span on your hardware, before sending it to Better Stack.",
            "nullable": true,
            "sensitive": false
          },
          "ingestion_logs_transformation": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line from the collector as it's ingested.",
            "nullable": true,
            "sensitive": false
          },
          "ingestion_traces_transformation": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span from the collector as it's ingested.",
            "nullable": true,
            "sensitive": false
          },
          "source_group_id": {
            "type": "string",
            "description": "Source group the collector's source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/).",
            "nullable": true,
            "sensitive": false
          },
          "live_tail_pattern": {
            "type": "string",
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the collector's source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
            "nullable": true,
            "sensitive": false
          },
          "live_tail_pattern_spans": {
            "type": "string",
            "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the collector's source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
            "nullable": true,
            "sensitive": false
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
            "nullable": false,
            "sensitive": false
          },
          "user_vector_config": {
            "type": "string",
            "description": "Your own Vector configuration in YAML, merged into the configuration the collector runs with.",
            "nullable": true,
            "sensitive": false
          },
          "configuration": {
            "type": "object",
            "properties": {
              "components": {
                "type": "object",
                "properties": {
                  "logs_host": {
                    "type": "boolean",
                    "description": "Collect logs from the host's /var/log directory."
                  },
                  "logs_docker": {
                    "type": "boolean",
                    "description": "Collect logs of Docker containers that use the default json-file logging driver."
                  },
                  "logs_kubernetes": {
                    "type": "boolean",
                    "description": "Collect Kubernetes container logs and events."
                  },
                  "logs_collector_internals": {
                    "type": "boolean",
                    "description": "Collect the collector's own logs."
                  },
                  "metrics_cluster": {
                    "type": "boolean",
                    "description": "Collect Kubernetes object state metrics, such as pods, workloads, nodes and volumes."
                  },
                  "metrics_databases": {
                    "type": "boolean",
                    "description": "Always the same as `metrics_cluster`. Send `metrics_cluster` instead.",
                    "readOnly": true
                  },
                  "metrics_other_databases": {
                    "type": "boolean",
                    "description": "Collect Redis, MongoDB, Memcached and Kafka metrics."
                  },
                  "metrics_host_os": {
                    "type": "boolean",
                    "description": "Collect CPU, memory, disk, filesystem and network metrics of the host."
                  },
                  "metrics_postgres": {
                    "type": "boolean",
                    "description": "Collect PostgreSQL metrics."
                  },
                  "metrics_mysql": {
                    "type": "boolean",
                    "description": "Collect MySQL metrics."
                  },
                  "metrics_elasticsearch": {
                    "type": "boolean",
                    "description": "Collect Elasticsearch metrics."
                  },
                  "metrics_pgbouncer": {
                    "type": "boolean",
                    "description": "Collect PgBouncer metrics."
                  },
                  "metrics_nginx": {
                    "type": "boolean",
                    "description": "Collect Nginx metrics."
                  },
                  "metrics_apache": {
                    "type": "boolean",
                    "description": "Collect Apache metrics."
                  },
                  "metrics_traefik": {
                    "type": "boolean",
                    "description": "Collect Traefik metrics."
                  },
                  "ebpf_metrics": {
                    "type": "boolean",
                    "description": "Collect host metrics with eBPF."
                  },
                  "ebpf_tracing_basic": {
                    "type": "boolean",
                    "description": "Basic distributed tracing with eBPF."
                  },
                  "ebpf_tracing_full": {
                    "type": "boolean",
                    "description": "Full distributed tracing with eBPF."
                  },
                  "ebpf_java_agent": {
                    "type": "boolean",
                    "description": "Trace Java services with eBPF."
                  },
                  "traces_opentelemetry": {
                    "type": "boolean",
                    "description": "Accept OpenTelemetry traces from your SDKs over OTLP."
                  },
                  "ebpf_red_metrics": {
                    "type": "boolean",
                    "description": "Service map and request rate, error and duration metrics with eBPF."
                  },
                  "metrics_process_statistics": {
                    "type": "boolean",
                    "description": "Collect the host's process and thread counts. Counting them can use significant CPU on a host that runs very many processes."
                  }
                },
                "description": "Which components the collector runs, each `true` or `false`."
              },
              "logs_sample_rate": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of logs to keep, from 0 to 100. Defaults to 100."
              },
              "traces_sample_rate": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of traces to keep, from 0 to 100. Defaults to 100, and 0 drops every trace."
              },
              "merge_logs": {
                "type": "boolean",
                "description": "Whether the collector merges lines that continue a log entry, such as a stack trace, into the entry before them."
              },
              "merge_logs_config": {
                "type": "string",
                "description": "The VRL condition `merge_logs` uses to tell whether a line starts a new log entry. Any other line joins the entry before it."
              },
              "disk_batch_size_mb": {
                "type": "integer",
                "format": "int64",
                "description": "Size of the collector's disk buffer in MB, shown as **Batching on disk** in the web app. Defaults to 3000 and can't be less than 256."
              },
              "memory_batch_size_mb": {
                "type": "integer",
                "format": "int64",
                "description": "How much data the collector batches in memory before sending it, in MB, shown as **Batching in memory** in the web app. Defaults to 20."
              },
              "buffer_max_events": {
                "type": "integer",
                "format": "int64",
                "description": "How many events the collector's memory buffer holds before it moves them to disk. Defaults to 10000."
              },
              "when_full": {
                "type": "string",
                "description": "What the collector does when its disk buffer is full, `drop_newest` to drop new events or `block` to wait until there's room."
              },
              "log_line_length_limit_kb": {
                "type": "integer",
                "format": "int64",
                "description": "Maximum log line length in kB, from 4 to 128. Longer lines are dropped. Defaults to 8."
              },
              "namespaces_options": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "log_sampling": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Percentage of the namespace's logs to keep, from 0 to 100."
                    },
                    "ingest_traces": {
                      "type": "boolean",
                      "description": "Whether to ingest the namespace's traces."
                    }
                  }
                },
                "description": "Options per namespace, keyed by namespace name. Sending a map replaces the existing options, and an empty map clears them."
              },
              "services_options": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "log_sampling": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Percentage of the service's logs to keep, from 0 to 100."
                    },
                    "ingest_traces": {
                      "type": "boolean",
                      "description": "Whether to ingest the service's traces."
                    }
                  }
                },
                "description": "Options per service, keyed by service name. Sending a map replaces the existing options, and an empty map clears them."
              }
            },
            "description": "The collector's components, sampling rates, batching and buffering. An update changes only the components you send.",
            "nullable": false,
            "sensitive": false
          },
          "custom_bucket": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The bucket's name, taken from `endpoint`.",
                "readOnly": true
              },
              "endpoint": {
                "type": "string",
                "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
              },
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              },
              "keep_data_after_retention": {
                "type": "boolean",
                "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
              }
            },
            "description": "Your own S3-compatible bucket to archive data in, or `null` when the collector uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). Set it on create. To rotate the key pair, update only `access_key_id` and `secret_access_key`.",
            "nullable": true,
            "sensitive": false
          },
          "connected_source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the sources connected to the collector's source, so you can correlate their logs and traces. Connections go both ways. The collector's source is connected to each listed source and to every source those are already connected to. Sending a list adds connections without removing any. Send `[]` to disconnect the collector's source from all of them.",
            "nullable": false,
            "sensitive": false
          },
          "service_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name_key": {
                  "type": "string",
                  "description": "The field to extract the service name from, such as `service.name`."
                },
                "type_key": {
                  "type": "string",
                  "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                }
              }
            },
            "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. The list replaces the existing one, and `[]` removes them all.",
            "nullable": false,
            "sensitive": false
          },
          "secret": {
            "type": "string",
            "description": "Secret the deployed collector authenticates with. Returned in every response.",
            "nullable": false,
            "sensitive": true
          },
          "status": {
            "type": "string",
            "description": "The collector's status, worked out from its hosts, one of `pending`, `up`, `degraded`, `unknown`, `partially_up`, `unsupported_version` or `down`.",
            "nullable": false,
            "sensitive": false
          },
          "source_id": {
            "type": "string",
            "description": "ID of the source the collector sends data to.",
            "nullable": true,
            "sensitive": false
          },
          "installation_guide_url": {
            "type": "string",
            "description": "Link to the installation guide for the collector's platform, with the install command that uses its `secret`.",
            "nullable": false,
            "sensitive": false
          },
          "pinged_at": {
            "type": "string",
            "format": "date-time",
            "description": "When a host of the collector last checked in, or `null` when no host has checked in yet.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the collector was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the collector was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the collector, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the collector.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.collector_target.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "kind": {
            "type": "string",
            "enum": [
              "postgres",
              "pgbouncer",
              "mysql",
              "redis",
              "mongodb",
              "memcached",
              "elasticsearch",
              "nginx",
              "apache",
              "kafka",
              "prometheus",
              "traefik"
            ],
            "description": "Target type. Responses can also hold `pgcat`, `node_exporter` and `kube_state_metrics`, targets the collector finds by itself. You can't create those.",
            "nullable": false,
            "sensitive": false
          },
          "host": {
            "type": "string",
            "description": "Target host. For a process target such as `nginx` or `prometheus`, the host the collector runs on.",
            "nullable": false,
            "sensitive": false
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the collector scrapes this target. A new target is enabled unless it's set to `false`. Disabling it sets `status` to `disabled`, and enabling it again checks the target again.",
            "nullable": false,
            "sensitive": false
          },
          "port": {
            "type": "integer",
            "format": "int64",
            "description": "The target's port. `null` when a target is found by its `listen_ip` or `service` instead.",
            "nullable": true,
            "sensitive": false
          },
          "service": {
            "type": "string",
            "description": "The service name. Required for `nginx`, `apache`, `kafka`, `prometheus` and `traefik` targets, and accepted and returned only for those.",
            "nullable": false,
            "sensitive": false
          },
          "listen_ip": {
            "type": "string",
            "description": "The IP address the process listens on. Accepted and returned only for `nginx`, `apache`, `kafka` and `traefik`, and `null` when not set.",
            "nullable": true,
            "sensitive": false
          },
          "endpoint": {
            "type": "string",
            "description": "The full scrape URL, like `http://10.0.0.5:9090/metrics`. Required for `prometheus` targets and returned only for them.",
            "nullable": false,
            "sensitive": false
          },
          "scheme": {
            "type": "string",
            "enum": [
              "http",
              "https"
            ],
            "description": "The connection scheme. Accepted and returned only for `elasticsearch`.",
            "nullable": false,
            "sensitive": false
          },
          "username": {
            "type": "string",
            "description": "The username used to connect, or `null` when not set. Accepted and returned only for `postgres`, `pgbouncer`, `mysql`, `redis`, `mongodb`, `memcached` and `elasticsearch`.",
            "nullable": true,
            "sensitive": false
          },
          "ssl_mode": {
            "type": "string",
            "enum": [
              "disable",
              "require",
              "verify-ca"
            ],
            "description": "The SSL mode for the connection. Required for `postgres` and `pgbouncer`, and accepted and returned only for those.\n\n- `disable`: Connects without SSL.\n- `require`: Connects over SSL without verifying the server's certificate.\n- `verify-ca`: Connects over SSL and checks that a trusted certificate authority signed the server's certificate.",
            "x-enum-descriptions": {
              "disable": "Connects without SSL.",
              "require": "Connects over SSL without verifying the server's certificate.",
              "verify-ca": "Connects over SSL and checks that a trusted certificate authority signed the server's certificate."
            },
            "nullable": false,
            "sensitive": false
          },
          "tls": {
            "type": "string",
            "enum": [
              "false",
              "true",
              "skip-verify",
              "preferred"
            ],
            "description": "The TLS mode for the connection. Required for `mysql`, and accepted and returned only for it.\n\n- `false`: Connects without TLS.\n- `true`: Connects over TLS and verifies the server's certificate.\n- `skip-verify`: Connects over TLS without verifying the server's certificate.\n- `preferred`: Uses TLS when the server supports it, without verifying the server's certificate.",
            "x-enum-descriptions": {
              "false": "Connects without TLS.",
              "true": "Connects over TLS and verifies the server's certificate.",
              "skip-verify": "Connects over TLS without verifying the server's certificate.",
              "preferred": "Uses TLS when the server supports it, without verifying the server's certificate."
            },
            "nullable": false,
            "sensitive": false
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "up",
              "unreachable",
              "down",
              "invalid_credentials",
              "configuration_required",
              "disabled",
              "removed"
            ],
            "description": "The connection status. An update that includes `host`, `port`, `service`, `listen_ip`, `endpoint`, `scheme`, `username`, `password`, `api_key`, `ssl_mode` or `tls` sets it back to `pending`.\n\n- `pending`: The collector hasn't reported on the target yet.\n- `up`: The collector collects metrics from the target.\n- `unreachable`: The collector can't connect to the target or hasn't seen it lately.\n- `down`: The collector reaches the target, but its check fails.\n- `invalid_credentials`: The target rejects the credentials.\n- `configuration_required`: Metrics are collected, but the database needs more setup, such as the `pg_stat_statements` extension.\n- `disabled`: The target is paused and the collector doesn't check it.\n- `removed`: The collector no longer finds the target.",
            "x-enum-descriptions": {
              "pending": "The collector hasn't reported on the target yet.",
              "up": "The collector collects metrics from the target.",
              "unreachable": "The collector can't connect to the target or hasn't seen it lately.",
              "down": "The collector reaches the target, but its check fails.",
              "invalid_credentials": "The target rejects the credentials.",
              "configuration_required": "Metrics are collected, but the database needs more setup, such as the `pg_stat_statements` extension.",
              "disabled": "The target is paused and the collector doesn't check it.",
              "removed": "The collector no longer finds the target."
            },
            "nullable": false,
            "sensitive": false
          },
          "container": {
            "type": "string",
            "description": "Detected container.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the target was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the target was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the collector's source, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "password": {
            "type": "string",
            "description": "Password for database and `elasticsearch` targets.",
            "nullable": true,
            "sensitive": true,
            "writeonly": true
          },
          "api_key": {
            "type": "string",
            "description": "API key for `elasticsearch` targets.",
            "nullable": true,
            "sensitive": true,
            "writeonly": true
          }
        }
      },
      "CLIResponse.telemetry.connection.list": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "id": {
            "type": "string",
            "description": "The connection's ID, the same value as the top-level `id`.",
            "nullable": false,
            "sensitive": false
          },
          "client_type": {
            "type": "string",
            "enum": [
              "clickhouse",
              "grafana"
            ],
            "description": "Client protocol.",
            "nullable": false,
            "sensitive": false
          },
          "cluster": {
            "type": "string",
            "description": "The one cluster the connection points at, by its name. [Get a source](/docs/logs/api/get-a-single-source/) returns the `cluster` its data is stored on.",
            "nullable": true,
            "sensitive": false
          },
          "clusters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The cluster's name."
                },
                "host": {
                  "type": "string",
                  "description": "Host to connect to the cluster on."
                }
              }
            },
            "description": "Every cluster the connection reaches.",
            "nullable": false,
            "sensitive": false
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Teams whose data this connection reaches, as `t`-prefixed team IDs such as `t123`. Get the IDs via [List teams](/docs/uptime/api/teams/list/).",
            "nullable": false,
            "sensitive": false
          },
          "team_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the teams whose data this connection reaches.",
            "nullable": false,
            "sensitive": false
          },
          "ip_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowed source IPs or CIDRs.",
            "nullable": false,
            "sensitive": false
          },
          "valid_until": {
            "type": "string",
            "format": "date-time",
            "description": "When the credential expires, or `null` if it never does.",
            "nullable": true,
            "sensitive": false
          },
          "note": {
            "type": "string",
            "description": "Free-form note.",
            "nullable": true,
            "sensitive": false
          },
          "host": {
            "type": "string",
            "description": "Connection host.",
            "nullable": true,
            "sensitive": false
          },
          "port": {
            "type": "integer",
            "format": "int64",
            "description": "Connection port.",
            "nullable": false,
            "sensitive": false
          },
          "username": {
            "type": "string",
            "description": "The username to connect with.",
            "nullable": false,
            "sensitive": false
          },
          "password": {
            "type": "string",
            "description": "Connection password. Returned only when the connection is created and never again, so save it then.",
            "nullable": false,
            "sensitive": true
          },
          "created_by": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^u[1-9][0-9]*$",
                "description": "The creator's user ID, such as `u123`."
              },
              "email": {
                "type": "string",
                "description": "The creator's e-mail."
              }
            },
            "description": "User who created the connection in the web UI. Always `null` for a connection created through the API or MCP.",
            "nullable": true,
            "sensitive": false
          },
          "sample_query": {
            "type": "string",
            "description": "An example `curl` query to get started. When you create the connection, the query includes the password. Later responses show `INSERT_PASSWORD` in its place. Not returned when listing connections.",
            "nullable": false,
            "sensitive": true
          },
          "data_sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source_id": {
                  "type": "string",
                  "description": "The source's ID."
                },
                "source_name": {
                  "type": "string",
                  "description": "The source's name."
                },
                "team_name": {
                  "type": "string",
                  "description": "The name of the team the source belongs to."
                },
                "connection_url": {
                  "type": "string",
                  "description": "The URL to connect to for this source's data."
                },
                "data_sources": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "ClickHouse collection names you can query for this source."
                }
              }
            },
            "description": "Sources this connection can query. Not returned when listing connections.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the connection was created.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard.export": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the exported dashboard.",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The dashboard's name.",
            "nullable": false,
            "sensitive": false
          },
          "data": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The dashboard's name."
              },
              "refresh_interval": {
                "type": "integer",
                "format": "int64",
                "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off."
              },
              "date_range_from": {
                "type": "string",
                "description": "Default range start, such as `now-3h`."
              },
              "date_range_to": {
                "type": "string",
                "description": "Default range end, such as `now`."
              },
              "source_eligibility_sql": {
                "type": "string",
                "description": "SQL that decides which sources the dashboard's charts can read, or `null` when it has none.",
                "nullable": true
              },
              "preset": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "The preset's ID."
                  },
                  "name": {
                    "type": "string",
                    "description": "The preset's name. An `explicit` preset always has one, and an `implicit` preset can be `null`.",
                    "nullable": true
                  },
                  "preset_type": {
                    "type": "string",
                    "enum": [
                      "implicit",
                      "explicit"
                    ],
                    "description": "The kind of preset.\n\n- `implicit`: Holds the dashboard's own variables.\n- `explicit`: A preset whose variables the team shares.",
                    "x-enum-descriptions": {
                      "implicit": "Holds the dashboard's own variables.",
                      "explicit": "A preset whose variables the team shares."
                    }
                  },
                  "preset_variables": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "The variable's name, used as `{{name}}` in queries."
                        },
                        "variable_type": {
                          "type": "string",
                          "enum": [
                            "source",
                            "date",
                            "datetime",
                            "string",
                            "number",
                            "sql_expression",
                            "select_value",
                            "boolean",
                            "select_with_sql",
                            "multi_select_with_sql",
                            "select_predefined_sql"
                          ],
                          "description": "The variable's type."
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The variable's current values as strings. For a `source` variable, the IDs of the selected sources.",
                          "nullable": true
                        },
                        "default_values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The variable's default values as strings.",
                          "nullable": true
                        },
                        "sql_definition": {
                          "type": "string",
                          "description": "The SQL query that lists the options of a `select_with_sql` or `multi_select_with_sql` variable, or `null` when not set.",
                          "nullable": true
                        },
                        "structured_value": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The variable's other settings as a JSON object, such as the sources a `source` variable selects in `sourceIds` and `canonicalSourceIds`, its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. `null` when not set.",
                          "nullable": true
                        },
                        "allow_multiple_values": {
                          "type": "boolean",
                          "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                        }
                      }
                    },
                    "description": "The preset's variables, in the order they were added."
                  }
                },
                "description": "The variables the dashboard's charts use, with the preset that holds them."
              },
              "charts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "chart_type": {
                      "type": "string",
                      "enum": [
                        "line_chart",
                        "table_chart",
                        "bar_chart",
                        "number_chart",
                        "heatmap_chart",
                        "anomalies_chart",
                        "pie_chart",
                        "scatter_chart",
                        "gauge_chart",
                        "tail_chart",
                        "static_text_chart",
                        "map_chart",
                        "text_chart",
                        "funnel_chart",
                        "funnel_trend_chart",
                        "hierarchy_chart"
                      ],
                      "description": "The chart's type."
                    },
                    "name": {
                      "type": "string",
                      "description": "The chart's name."
                    },
                    "description": {
                      "type": "string",
                      "description": "The chart's description, or `null` when it has none.",
                      "nullable": true
                    },
                    "x": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's horizontal position on the 12-column grid, from `0` at the left."
                    },
                    "y": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's vertical position on the grid, from `0` at the top."
                    },
                    "w": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's width in grid columns."
                    },
                    "h": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's height in grid rows."
                    },
                    "transform_with": {
                      "type": "string",
                      "description": "JavaScript that transforms the chart's data before it's shown, as set in the chart's Transformation tab. `null` when not set.",
                      "nullable": true
                    },
                    "finalize_with": {
                      "type": "string",
                      "description": "More JavaScript that transforms the chart's data, run after `transform_with`. `null` when not set.",
                      "nullable": true
                    },
                    "settings": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "The chart's display settings, with the keys [Get dashboard chart](/docs/logs/api/charts/get/) returns in `settings`, except `filtered_releases`."
                    },
                    "explanation": {
                      "type": "string",
                      "description": "Explanation of what the chart shows. AI SRE and the chart's AI summary use it. `null` when not set.",
                      "nullable": true
                    },
                    "explore_link_url": {
                      "type": "string",
                      "description": "The link the chart's Explore icon opens, which can use variables such as `{{team_id}}`. `null` when the chart has none.",
                      "nullable": true
                    },
                    "chart_queries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The query's name, or `null` when it has none.",
                            "nullable": true
                          },
                          "query_type": {
                            "type": "string",
                            "enum": [
                              "sql_expression",
                              "tail_query",
                              "tail_query_builder",
                              "promql_query",
                              "promql_v2_query",
                              "promql_via_llm",
                              "query_builder",
                              "static_text",
                              "pql_expression",
                              "funnel_query"
                            ],
                            "description": "The query's type."
                          },
                          "sql_query": {
                            "type": "string",
                            "description": "The SQL the query runs, or `null` for a query without SQL, such as a `tail_query` or `static_text` query.",
                            "nullable": true
                          },
                          "where_condition": {
                            "type": "string",
                            "description": "The filter of a `tail_query` or `tail_query_builder` query, or `null` when not set.",
                            "nullable": true
                          },
                          "static_text": {
                            "type": "string",
                            "description": "The Markdown text a `static_text` query shows, or `null` when not set.",
                            "nullable": true
                          },
                          "x_axis": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                          },
                          "y_axis": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set.",
                            "nullable": true
                          },
                          "point_size": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Point size blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set.",
                            "nullable": true
                          },
                          "coordinates": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                          },
                          "filters": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Filter blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set.",
                            "nullable": true
                          },
                          "where": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Where blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                          },
                          "group_by": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, or `null` when not set.",
                            "nullable": true
                          },
                          "having": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Having blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                          },
                          "order_by": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query, each in the form [Get dashboard chart](/docs/logs/api/charts/get/) returns, as an empty list when there are none."
                          },
                          "source_variable": {
                            "type": "string",
                            "description": "The sources the query reads, as the name of a `source` variable, such as `source`, or a `source:` reference to specific sources.",
                            "nullable": true
                          },
                          "promql_query": {
                            "type": "string",
                            "description": "The PromQL of a PromQL query, or `null` when not set.",
                            "nullable": true
                          },
                          "pql_query": {
                            "type": "string",
                            "description": "The PQL of a `pql_expression` query, or `null` when not set.",
                            "nullable": true
                          },
                          "funnel_query": {
                            "type": "object",
                            "properties": {
                              "session_field": {
                                "type": "string",
                                "description": "Field that ties one journey's events together, such as `session_id` or `user.id`."
                              },
                              "steps": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Step name shown on the chart."
                                    },
                                    "conditions": {
                                      "type": "string",
                                      "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                                    }
                                  }
                                },
                                "description": "The funnel's steps in journey order."
                              },
                              "breakdown": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The type of the breakdown field, always `string`."
                                  },
                                  "value": {
                                    "type": "string",
                                    "description": "The field each step is split by, such as `contexts.browser.name`."
                                  }
                                },
                                "description": "The field each step is split by, or `null` when the funnel has no breakdown.",
                                "nullable": true
                              }
                            },
                            "description": "Funnel definition of a `funnel_query` query. `null` for other queries.",
                            "nullable": true
                          },
                          "mergeable_split_aggregations": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string",
                              "enum": [
                                "sum",
                                "min",
                                "max"
                              ]
                            },
                            "description": "How a `query_builder` query combines each result column when it runs in parts, as `sum`, `min` or `max` per column name. `null` when not set.",
                            "nullable": true
                          }
                        }
                      },
                      "description": "The chart's queries, in the order they were added."
                    },
                    "chart_alerts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The alert's name."
                          },
                          "alert_type": {
                            "type": "string",
                            "enum": [
                              "threshold",
                              "relative",
                              "anomaly_rrcf"
                            ],
                            "description": "The alert's type.\n\n- `threshold`: Fires when the value crosses a threshold.\n- `relative`: Compares the value with the previous period as a percentage change.\n- `anomaly_rrcf`: Uses machine learning anomaly detection. Table charts don't accept it.",
                            "x-enum-descriptions": {
                              "threshold": "Fires when the value crosses a threshold.",
                              "relative": "Compares the value with the previous period as a percentage change.",
                              "anomaly_rrcf": "Uses machine learning anomaly detection. Table charts don't accept it."
                            }
                          },
                          "operator": {
                            "type": "string",
                            "enum": [
                              "equal",
                              "not_equal",
                              "higher_than",
                              "higher_than_or_equal",
                              "lower_than",
                              "lower_than_or_equal",
                              "increases_by",
                              "decreases_by",
                              "changes_by"
                            ],
                            "description": "How the value is compared.\n\n- `equal`: A `threshold` alert fires when the value equals `value` or `string_value`.\n- `not_equal`: A `threshold` alert fires when the value differs from `value` or `string_value`.\n- `higher_than`: A `threshold` alert fires when the value is above `value`.\n- `higher_than_or_equal`: A `threshold` alert fires when the value is at or above `value`.\n- `lower_than`: A `threshold` alert fires when the value is below `value`.\n- `lower_than_or_equal`: A `threshold` alert fires when the value is at or below `value`.\n- `increases_by`: A `relative` alert fires when the value rises by `value` percent or more.\n- `decreases_by`: A `relative` alert fires when the value falls by `value` percent or more.\n- `changes_by`: A `relative` alert fires when the value rises or falls by `value` percent or more.",
                            "x-enum-descriptions": {
                              "equal": "A `threshold` alert fires when the value equals `value` or `string_value`.",
                              "not_equal": "A `threshold` alert fires when the value differs from `value` or `string_value`.",
                              "higher_than": "A `threshold` alert fires when the value is above `value`.",
                              "higher_than_or_equal": "A `threshold` alert fires when the value is at or above `value`.",
                              "lower_than": "A `threshold` alert fires when the value is below `value`.",
                              "lower_than_or_equal": "A `threshold` alert fires when the value is at or below `value`.",
                              "increases_by": "A `relative` alert fires when the value rises by `value` percent or more.",
                              "decreases_by": "A `relative` alert fires when the value falls by `value` percent or more.",
                              "changes_by": "A `relative` alert fires when the value rises or falls by `value` percent or more."
                            }
                          },
                          "value": {
                            "type": "number",
                            "description": "The threshold of a `threshold` alert, or the percentage change of a `relative` alert. `null` when the alert compares `string_value`.",
                            "nullable": true
                          },
                          "string_value": {
                            "type": "string",
                            "description": "The exact text a `threshold` alert compares, or `null` when it compares `value`.",
                            "nullable": true
                          },
                          "query_period": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time window of data each check looks at, in seconds, or `null` when not set.",
                            "nullable": true
                          },
                          "confirmation_period": {
                            "type": "integer",
                            "format": "int64",
                            "description": "How long the condition must hold before an incident starts, in seconds."
                          },
                          "recovery_period": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Seconds the value must stay recovered before the incident resolves on its own, or `null` to never resolve it automatically.",
                            "nullable": true
                          },
                          "escalation_target": {
                            "type": "string",
                            "description": "Who the alert notifies, `current_team` or an escalation policy or team written as `gid://uptime/Policy/123` or `gid://uptime/Team/456`."
                          },
                          "name_autogenerated": {
                            "type": "boolean",
                            "description": "Whether the alert's name follows the chart's name. `false` once the alert is renamed."
                          },
                          "aggregation_interval": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The size of the buckets the data is aggregated into before each bucket is evaluated, in seconds, or `null` when not set.",
                            "nullable": true
                          },
                          "source_mode": {
                            "type": "string",
                            "enum": [
                              "source_variable",
                              "platforms_single_source",
                              "platforms_all_sources"
                            ],
                            "description": "How the alert picks its sources.\n\n- `source_variable`: Runs on the sources in `source_variable`.\n- `platforms_single_source`: Runs on the one source in `source_variable`, limited to `source_platforms`.\n- `platforms_all_sources`: Runs on every source that matches `source_platforms`.",
                            "x-enum-descriptions": {
                              "source_variable": "Runs on the sources in `source_variable`.",
                              "platforms_single_source": "Runs on the one source in `source_variable`, limited to `source_platforms`.",
                              "platforms_all_sources": "Runs on every source that matches `source_platforms`."
                            }
                          },
                          "source_platforms": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Platforms that limit the sources and services the alert runs on, for the `platforms_single_source` and `platforms_all_sources` source modes."
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "description": "Custom incident metadata, where each key holds a list of strings.",
                            "nullable": true
                          },
                          "check_period": {
                            "type": "integer",
                            "format": "int64",
                            "description": "How often the alert is checked, in seconds."
                          },
                          "incident_per_series": {
                            "type": "boolean",
                            "description": "Whether each series that breaches the condition starts its own incident."
                          },
                          "shown_interval": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Interval in seconds the anomaly chart shows, for `anomaly_rrcf` alerts. `null` on other alerts.",
                            "nullable": true
                          },
                          "anomaly_training_range_days": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Days of history the anomaly model is first trained on, for `anomaly_rrcf` alerts."
                          },
                          "incident_cause": {
                            "type": "string",
                            "description": "A custom description for the incidents the alert starts, in Markdown, or `null` when none is set.",
                            "nullable": true
                          },
                          "incident_name": {
                            "type": "string",
                            "description": "A custom name for the incidents the alert starts, or `null` when none is set.",
                            "nullable": true
                          },
                          "on_missing_data": {
                            "type": "string",
                            "enum": [
                              "treat_as_zero",
                              "dont_fire",
                              "treat_as_previous",
                              "start_incident"
                            ],
                            "description": "What a check does when the query returns no data.\n\n- `treat_as_zero`: Checks the missing data as if the value were 0.\n- `dont_fire`: Starts no incident for missing data.\n- `treat_as_previous`: Checks the missing data as if it had the previous value.\n- `start_incident`: Starts an incident when the query returns no data.",
                            "x-enum-descriptions": {
                              "treat_as_zero": "Checks the missing data as if the value were 0.",
                              "dont_fire": "Starts no incident for missing data.",
                              "treat_as_previous": "Checks the missing data as if it had the previous value.",
                              "start_incident": "Starts an incident when the query returns no data."
                            }
                          },
                          "additional_conditions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "alert_type": {
                                  "type": "string",
                                  "description": "The type of the condition, `threshold` or `relative`."
                                },
                                "operator": {
                                  "type": "string",
                                  "description": "The comparison the condition makes, from the same values as `operator`."
                                },
                                "value": {
                                  "type": "number",
                                  "description": "Threshold value. `null` when the condition compares `string_value`.",
                                  "nullable": true
                                },
                                "string_value": {
                                  "type": "string",
                                  "description": "Threshold value for a string series. `null` when the condition compares `value`.",
                                  "nullable": true
                                },
                                "series_names": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "The series the condition is limited to. An empty list means every series."
                                },
                                "series_names_except": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "The series the condition ignores while it watches every other series."
                                }
                              }
                            },
                            "description": "More conditions combined with the alert's own condition using `AND`, as an empty list when there are none."
                          }
                        }
                      },
                      "description": "The chart's alerts, in the order they were added."
                    }
                  }
                },
                "description": "The dashboard's charts, in the order they were added."
              },
              "sections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The section's name.",
                      "nullable": true
                    },
                    "y": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The section's vertical position on the grid, from `0` at the top. A section spans the full width."
                    },
                    "collapsed": {
                      "type": "boolean",
                      "description": "Whether the section starts collapsed."
                    },
                    "explanation": {
                      "type": "string",
                      "description": "Explanation of what the section groups, or `null` when not set.",
                      "nullable": true
                    }
                  }
                },
                "description": "The dashboard's sections, in the order they were added."
              }
            },
            "description": "The exported document, ready to send as `data` to [Import a dashboard](/docs/logs/api/dashboards/import/).",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Dashboard name.",
            "nullable": false,
            "sensitive": false
          },
          "dashboard_group_id": {
            "type": "string",
            "description": "Group this dashboard belongs to.",
            "nullable": true,
            "sensitive": false
          },
          "refresh_interval": {
            "type": "integer",
            "format": "int64",
            "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_from": {
            "type": "string",
            "description": "Default range start, for example now-3h.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_to": {
            "type": "string",
            "description": "Default range end, for example now.",
            "nullable": false,
            "sensitive": false
          },
          "source_eligibility_sql": {
            "type": "string",
            "description": "SQL that decides which sources this dashboard's charts can read. Returned when you get one dashboard.",
            "nullable": true,
            "sensitive": false
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the variable, used as `{{name}}` in queries."
                },
                "variable_type": {
                  "type": "string",
                  "description": "The type of the variable, `source`, `date`, `datetime`, `string`, `number`, `sql_expression`, `select_value`, `boolean`, `select_with_sql` or `select_predefined_sql`."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's current values as strings, or an empty list when it has none. For a `source` variable, the IDs of the selected sources."
                },
                "default_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's default values as strings, or an empty list when it has none."
                },
                "sql_definition": {
                  "type": "string",
                  "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                },
                "structured_value": {
                  "type": "object",
                  "properties": {
                    "selected_label": {
                      "type": "string",
                      "description": "Label of the selected value."
                    },
                    "canonicalSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected sources of a source variable. Source IDs in `values` set them."
                    },
                    "serviceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected services of a source variable."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "Saved filters, each a label and the SQL that lists its values."
                    }
                  },
                  "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                },
                "allow_multiple_values": {
                  "type": "boolean",
                  "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The filter's label, shown in the variable's menu."
                      },
                      "sql": {
                        "type": "string",
                        "description": "A complete query that returns one column with the filter's options."
                      }
                    }
                  },
                  "description": "The saved filters of a `select_predefined_sql` variable."
                },
                "selected_label": {
                  "type": "string",
                  "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                }
              }
            },
            "description": "The dashboard's variables, which chart queries use by name, such as `{{source}}`. Returned when you get one dashboard. See [Query variables](/docs/logs/dashboards/variables/). Every dashboard has the built-in `time`, `start_time`, `end_time` and `source` variables, which are added when you leave them out and keep their own type. An update replaces all variables, so a variable you leave out is removed, except the built-in ones. For a variable that already exists, any of `variable_type`, `default_values`, `sql_definition`, `structured_value` and `allow_multiple_values` you leave out keeps its value, and `null` clears any of them except `variable_type`. A variable's `values` aren't kept between updates, so send them again. A `source` variable keeps its sources when you leave out both `values` and `structured_value`. Changing `variable_type` clears the old `default_values`, `sql_definition` and `structured_value`. `sql_definition` is accepted only on `select_with_sql` and `multi_select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails.",
            "nullable": false,
            "sensitive": false
          },
          "charts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The chart's ID."
                },
                "chart_type": {
                  "type": "string",
                  "description": "The chart's type, `line_chart`, `table_chart`, `bar_chart`, `number_chart`, `heatmap_chart`, `anomalies_chart`, `pie_chart`, `scatter_chart`, `gauge_chart`, `tail_chart`, `static_text_chart`, `map_chart`, `text_chart`, `funnel_chart`, `funnel_trend_chart` or `hierarchy_chart`."
                },
                "name": {
                  "type": "string",
                  "description": "The chart's name."
                },
                "x": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The chart's horizontal position on the 12-column grid, from `0` at the left."
                },
                "y": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The chart's vertical position on the grid, from `0` at the top."
                },
                "w": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The chart's width in grid columns, from `1` to `12`."
                },
                "h": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The chart's height in grid rows."
                }
              }
            },
            "description": "A summary of each chart on the dashboard, ordered top to bottom, then left to right. Returned when you get one dashboard. Use [Get dashboard chart](/docs/logs/api/charts/get/) for a chart's queries and settings.",
            "nullable": false,
            "sensitive": false
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The section's ID."
                },
                "name": {
                  "type": "string",
                  "description": "The section's name.",
                  "nullable": true
                },
                "y": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The section's vertical position on the grid, from `0` at the top. A section spans the full width."
                },
                "collapsed": {
                  "type": "boolean",
                  "description": "Whether the section is collapsed."
                }
              }
            },
            "description": "Sections on the dashboard. Returned when you get one dashboard.",
            "nullable": false,
            "sensitive": false
          },
          "has_overlaps": {
            "type": "boolean",
            "description": "Whether any charts overlap on the grid. Returned when you get one dashboard.",
            "nullable": false,
            "sensitive": false
          },
          "product": {
            "type": "string",
            "enum": [
              "telemetry",
              "rum"
            ],
            "description": "The product the dashboard belongs to. Defaults to `telemetry`, and it can't be changed after create.\n\n- `telemetry`: A dashboard over logs, metrics and traces.\n- `rum`: A Real User Monitoring dashboard.",
            "x-enum-descriptions": {
              "telemetry": "A dashboard over logs, metrics and traces.",
              "rum": "A Real User Monitoring dashboard."
            },
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the dashboard was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the dashboard was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "url": {
            "type": "string",
            "description": "Link to this dashboard's page in the Better Stack web app.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the dashboard, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the dashboard.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_chart.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "chart_type": {
            "type": "string",
            "enum": [
              "line_chart",
              "bar_chart",
              "pie_chart",
              "scatter_chart",
              "gauge_chart",
              "number_chart",
              "heatmap_chart",
              "table_chart",
              "map_chart",
              "text_chart",
              "tail_chart",
              "static_text_chart",
              "funnel_chart",
              "funnel_trend_chart",
              "anomalies_chart",
              "hierarchy_chart"
            ],
            "description": "Chart type. Only a `line_chart` can have more than one query. An update can't change it to a type the chart's existing queries or alerts don't work with. Changing it in an update without `queries` turns Drag & drop queries into `sql_expression` queries with the same SQL.\n\n- `line_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `bar_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `pie_chart`: Accepts `sql_expression` queries.\n- `scatter_chart`: Accepts `sql_expression` queries.\n- `gauge_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `number_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `heatmap_chart`: Accepts `sql_expression` queries.\n- `table_chart`: Accepts `sql_expression` queries.\n- `map_chart`: Accepts `sql_expression` queries.\n- `text_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `tail_chart`: Accepts `tail_query` queries.\n- `static_text_chart`: Accepts a `static_text` query.\n- `funnel_chart`: Holds a `funnel_query` query made in the app.\n- `funnel_trend_chart`: Holds a `funnel_query` query made in the app.\n- `anomalies_chart`: Accepts `tail_query` queries.\n- `hierarchy_chart`: Accepts `sql_expression` queries.",
            "x-enum-descriptions": {
              "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "pie_chart": "Accepts `sql_expression` queries.",
              "scatter_chart": "Accepts `sql_expression` queries.",
              "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "heatmap_chart": "Accepts `sql_expression` queries.",
              "table_chart": "Accepts `sql_expression` queries.",
              "map_chart": "Accepts `sql_expression` queries.",
              "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "tail_chart": "Accepts `tail_query` queries.",
              "static_text_chart": "Accepts a `static_text` query.",
              "funnel_chart": "Holds a `funnel_query` query made in the app.",
              "funnel_trend_chart": "Holds a `funnel_query` query made in the app.",
              "anomalies_chart": "Accepts `tail_query` queries.",
              "hierarchy_chart": "Accepts `sql_expression` queries."
            },
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Chart name.",
            "nullable": false,
            "sensitive": false
          },
          "description": {
            "type": "string",
            "description": "Chart description.",
            "nullable": true,
            "sensitive": false
          },
          "x": {
            "type": "integer",
            "format": "int64",
            "description": "The chart's horizontal position on the 12-column grid, from `0` at the left.",
            "nullable": false,
            "sensitive": false
          },
          "y": {
            "type": "integer",
            "format": "int64",
            "description": "The chart's vertical position on the grid, from `0` at the top.",
            "nullable": false,
            "sensitive": false
          },
          "w": {
            "type": "integer",
            "format": "int64",
            "description": "Grid width.",
            "nullable": false,
            "sensitive": false
          },
          "h": {
            "type": "integer",
            "format": "int64",
            "description": "Grid height.",
            "nullable": false,
            "sensitive": false
          },
          "settings": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
              },
              "custom_unit": {
                "type": "boolean",
                "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
              },
              "decimal_places": {
                "type": "integer",
                "format": "int64",
                "description": "Number of decimal places shown."
              },
              "time_column": {
                "type": "string",
                "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
              },
              "x_axis_type": {
                "type": "string",
                "description": "How the X axis is read. Usually `time`, `value` or `category`."
              },
              "y_axis_type": {
                "type": "string",
                "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
              },
              "series_column": {
                "type": "string",
                "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
              },
              "value_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Result columns that hold the values to chart."
              },
              "point_size_column": {
                "type": "string",
                "description": "Column that sets each point's size on a scatter chart."
              },
              "location_column": {
                "type": "string",
                "description": "Column holding the location on a map chart."
              },
              "location_label": {
                "type": "string",
                "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
              },
              "label_column": {
                "type": "string",
                "description": "Column that names each hexagon on a hierarchy chart."
              },
              "group_by_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Up to two columns a hierarchy chart groups its hexagons by."
              },
              "palette": {
                "type": "string",
                "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
              },
              "min_value": {
                "type": "number",
                "description": "Lowest value of a hierarchy chart's color scale."
              },
              "max_value": {
                "type": "number",
                "description": "Highest value of a hierarchy chart's color scale."
              },
              "link_template": {
                "type": "string",
                "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
              },
              "y_axis_min": {
                "type": "number",
                "description": "Lowest value on the Y axis."
              },
              "y_axis_max": {
                "type": "number",
                "description": "Highest value on the Y axis."
              },
              "y_axis_auto_range": {
                "type": "string",
                "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
              },
              "y_axis_scale": {
                "type": "string",
                "description": "Scale of the Y axis. Usually `linear` or `log`."
              },
              "min": {
                "type": "number",
                "description": "Lower bound of a gauge."
              },
              "max": {
                "type": "number",
                "description": "Upper bound of a gauge, the goal value."
              },
              "treat_missing_values": {
                "type": "string",
                "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
              },
              "stacking": {
                "type": "string",
                "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
              },
              "orientation": {
                "type": "string",
                "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
              },
              "legend": {
                "type": "string",
                "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
              },
              "series_colors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
              },
              "series_order": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Order the series are shown in, by name."
              },
              "show_previous_period": {
                "type": "boolean",
                "description": "Whether a line chart also shows the previous period."
              },
              "color_mode": {
                "type": "string",
                "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
              },
              "color_upper_threshold": {
                "type": "number",
                "description": "Upper threshold of a number chart's colors."
              },
              "color_lower_threshold": {
                "type": "number",
                "description": "Lower threshold of a number chart's colors."
              },
              "color_green_words": {
                "type": "string",
                "description": "Values a number chart shows in green, separated by commas."
              },
              "color_yellow_words": {
                "type": "string",
                "description": "Values a number chart shows in yellow, separated by commas."
              },
              "color_red_words": {
                "type": "string",
                "description": "Values a number chart shows in red, separated by commas."
              },
              "column_units": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "string",
                      "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                    },
                    "custom_unit": {
                      "type": "boolean",
                      "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                    }
                  }
                },
                "description": "Unit of each table column, by column name."
              },
              "percentage_highlight_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Table columns holding ratios from 0 to 1, shown with a bar."
              },
              "series_unit": {
                "type": "string",
                "description": "Unit of a heatmap's Y axis labels."
              },
              "series_custom_unit": {
                "type": "boolean",
                "description": "Whether `series_unit` is your own suffix."
              },
              "heatmap_color_mode": {
                "type": "string",
                "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
              },
              "value_categories": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "description": "Text shown for the value."
                    },
                    "color": {
                      "type": "string",
                      "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                    }
                  }
                },
                "description": "Label and color of each cell value of a categorized heatmap."
              },
              "column_widths": {
                "type": "object",
                "additionalProperties": {
                  "type": "number"
                },
                "description": "Width of each table column, by column name, as the chart editor saves it."
              },
              "table_width": {
                "type": "integer",
                "format": "int64",
                "description": "Width of the table the `column_widths` were saved for."
              },
              "guessed_series_colors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Colors the chart picked for its series, keyed by `series_name`."
              },
              "label": {
                "type": "string",
                "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
              },
              "text": {
                "type": "string",
                "description": "Markdown text of a text chart."
              },
              "rowTemplates": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Live tail row format of each source, by source ID."
              },
              "sampling": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of data the chart samples."
              },
              "fresh": {
                "type": "boolean",
                "description": "Whether the chart skips cached results."
              },
              "funnel_unit_name": {
                "type": "string",
                "description": "Word a funnel chart counts in, such as `people`."
              },
              "filtered_series": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Series the chart shows, by name."
              },
              "filtered_releases": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Releases the chart shows."
              },
              "force_source_series": {
                "type": "boolean",
                "description": "Whether the chart shows one series per source."
              },
              "treat_zero_values": {
                "type": "string",
                "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
              },
              "projection": {
                "type": "string",
                "description": "Map projection of a map chart, such as `mercator`."
              },
              "published_format": {
                "type": "string",
                "description": "Format a published chart is served in, `json` by default."
              },
              "published_cache_for": {
                "type": "integer",
                "format": "int64",
                "description": "Seconds a published chart's results are cached, 3 by default."
              },
              "y_axis_annotations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "The Y axis value the line is drawn at."
                    },
                    "label": {
                      "type": "string",
                      "description": "Text shown next to the line."
                    },
                    "color": {
                      "type": "string",
                      "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                    }
                  }
                },
                "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
              },
              "x_axis_annotations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "description": "The X axis value the line is drawn at, a time or a number."
                    },
                    "label": {
                      "type": "string",
                      "description": "Text shown next to the line."
                    },
                    "color": {
                      "type": "string",
                      "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                    }
                  }
                },
                "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
              }
            },
            "description": "Display settings for the `chart_type`, such as unit, axes, legend, stacking and decimal places. An update replaces all of them. Switching `x_axis_type` to or from `category` in an update without `queries` turns the chart's Drag & drop queries into `sql_expression` queries with the same SQL.",
            "nullable": false,
            "sensitive": false
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The query's ID.",
                  "readOnly": true
                },
                "query_type": {
                  "type": "string",
                  "description": "The query's type. You can write `sql_expression`, `tail_query` and `static_text` queries. Queries built in the web app's editor can also be `pql_expression`, `query_builder`, `tail_query_builder`, `funnel_query`, `promql_query`, `promql_v2_query` or `promql_via_llm`, and can't be written."
                },
                "name": {
                  "type": "string",
                  "description": "The query's name. Left out when the query has none."
                },
                "source_variable": {
                  "type": "string",
                  "description": "The sources the query reads, as the name of a `source` variable, such as `source`, or a `source:` reference to specific sources. Defaults to `source`."
                },
                "sql_query": {
                  "type": "string",
                  "description": "The SQL the query runs. Returned for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries."
                },
                "pql_query": {
                  "type": "string",
                  "description": "PQL source of a `pql_expression` query. Read-only."
                },
                "where_condition": {
                  "type": "string",
                  "description": "The filter of a `tail_query` or `tail_query_builder` query. Left out when not set."
                },
                "static_text": {
                  "type": "string",
                  "description": "The Markdown text a `static_text` query shows. Left out when not set."
                },
                "funnel_query": {
                  "type": "object",
                  "properties": {
                    "session_field": {
                      "type": "string",
                      "description": "Field that ties one journey's events together, such as `session_id` or `user.id`."
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Step name shown on the chart."
                          },
                          "conditions": {
                            "type": "string",
                            "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                          }
                        }
                      },
                      "description": "The funnel's steps in journey order."
                    },
                    "breakdown": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the breakdown field, always `string`."
                        },
                        "value": {
                          "type": "string",
                          "description": "The field each step is split by, such as `contexts.browser.name`."
                        }
                      },
                      "description": "The field each step is split by, or `null` when the funnel has no breakdown.",
                      "nullable": true
                    }
                  },
                  "description": "Funnel definition of a `funnel_query` query. Read-only."
                },
                "x_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "y_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "point_size": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "coordinates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "where": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Where blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "group_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "having": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Having blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "order_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                }
              }
            },
            "description": "The chart's queries. You can write `sql_expression`, `tail_query` and `static_text` queries. Other types, such as `query_builder`, `pql_expression` and PromQL, are returned but can't be written. Updating a chart replaces all of its queries. A chart created or updated with `query` gets a single query built from it. A chart other than `static_text_chart` needs at least one query, and only a `line_chart` can have more than one.",
            "nullable": false,
            "sensitive": false
          },
          "explanation": {
            "type": "string",
            "description": "Explanation of what the chart shows. AI SRE and the chart's AI summary use it.",
            "nullable": true,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the chart's dashboard, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_chart_comment.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "chart_id": {
            "type": "string",
            "description": "Chart the comment is on.",
            "nullable": false,
            "sensitive": false
          },
          "dt": {
            "type": "string",
            "format": "date-time",
            "description": "Point on the chart's time axis the comment is pinned to, in UTC to the millisecond. A time you send without a zone is read as UTC.",
            "nullable": false,
            "sensitive": false
          },
          "content": {
            "type": "string",
            "description": "Comment text, in Markdown. To mention a team member, include `**M_START**{\"id\":\"u123\"}**M_END**`, with their user ID or e-mail as `id`. Get the user ID via [List team members](/docs/uptime/api/team-members/list/).",
            "nullable": false,
            "sensitive": false
          },
          "plaintext_content": {
            "type": "string",
            "description": "Comment text as people read it, with each mention as `@` and the member's name. Use it to display the comment.",
            "nullable": false,
            "sensitive": false
          },
          "user_email": {
            "type": "string",
            "description": "E-mail of the team member who wrote the comment. Left out when no team member wrote it, such as for a comment written with an API token or synced from an incident.",
            "nullable": false,
            "sensitive": false
          },
          "api_authored": {
            "type": "boolean",
            "description": "Whether the comment was written through the API, so an API token can update or delete it.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the comment was written.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the comment was last updated.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_group.dashboards": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Dashboard name.",
            "nullable": false,
            "sensitive": false
          },
          "dashboard_group_id": {
            "type": "integer",
            "format": "int64",
            "description": "Group this dashboard belongs to.",
            "nullable": true,
            "sensitive": false
          },
          "refresh_interval": {
            "type": "integer",
            "format": "int64",
            "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_from": {
            "type": "string",
            "description": "Default range start, for example now-3h.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_to": {
            "type": "string",
            "description": "Default range end, for example now.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the dashboard was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the dashboard was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Team that owns the dashboard, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the dashboard.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_group.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Group name.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the group, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the group.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_section.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Section name.",
            "nullable": true,
            "sensitive": false
          },
          "y": {
            "type": "integer",
            "format": "int64",
            "description": "Vertical position on the dashboard grid, from `0` at the top. When an update moves the section onto a chart, the dashboard rearranges its layout shortly after so nothing overlaps.",
            "nullable": false,
            "sensitive": false
          },
          "collapsed": {
            "type": "boolean",
            "description": "Whether the section starts collapsed.",
            "nullable": false,
            "sensitive": false
          },
          "explanation": {
            "type": "string",
            "description": "Explanation of what the section groups.",
            "nullable": true,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the section's dashboard, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_template.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Template name.",
            "nullable": false,
            "sensitive": false
          },
          "description": {
            "type": "string",
            "description": "What the template visualizes.",
            "nullable": true,
            "sensitive": false
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories the template is filed under.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.dashboard_version.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "number": {
            "type": "integer",
            "format": "int64",
            "description": "Version number, which you pass to a rollback as `version`. Same as the version's ID.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the version was saved, right before the change.",
            "nullable": false,
            "sensitive": false
          },
          "changed_by": {
            "type": "string",
            "description": "Who made the change, a team member, `the <name> API token`, `AI SRE`, `a former team member` or `Unknown`. A change made in an AI SRE conversation names it as `AI SRE in conversation \"<title>\"` when you can open AI SRE conversations.",
            "nullable": false,
            "sensitive": false
          },
          "source": {
            "type": "string",
            "enum": [
              "app",
              "ai_sre",
              "mcp",
              "api",
              "mobile",
              "uptime",
              "templates_admin"
            ],
            "description": "Where the change was made.",
            "nullable": false,
            "sensitive": false
          },
          "source_name": {
            "type": "string",
            "description": "Where the change was made, `Better Stack app`, `AI SRE`, `MCP`, `API`, `Mobile app`, `Incidents app` or `Template editor`.",
            "nullable": false,
            "sensitive": false
          },
          "changed": {
            "type": "string",
            "description": "What the change touched, the names of the changed charts, `dashboard settings`, `alert paused or resumed` or `no visible change`. A rollback's version starts with `rollback: `.",
            "nullable": false,
            "sensitive": false
          },
          "current": {
            "type": "boolean",
            "description": "Whether the dashboard looks the same now as in this version.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.data_region.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The region's or cluster's name.",
            "nullable": false,
            "sensitive": false
          },
          "kind": {
            "type": "string",
            "enum": [
              "region",
              "dedicated_cluster"
            ],
            "description": "The kind of place the data is stored in.\n\n- `region`: A shared data region.\n- `dedicated_cluster`: A cluster only your organization stores data on.",
            "x-enum-descriptions": {
              "region": "A shared data region.",
              "dedicated_cluster": "A cluster only your organization stores data on."
            },
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.exploration.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_from": {
            "type": "string",
            "description": "Start of the default date range, such as `now-3h`. A funnel's range starts at `now-7d` by default. Once set, it can't be cleared.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_to": {
            "type": "string",
            "description": "End of the default date range, such as `now`. Once set, it can't be cleared.",
            "nullable": false,
            "sensitive": false
          },
          "exploration_group_id": {
            "type": "string",
            "description": "Group this exploration belongs to.",
            "nullable": true,
            "sensitive": false
          },
          "chart": {
            "type": "object",
            "properties": {
              "chart_type": {
                "type": "string",
                "enum": [
                  "line_chart",
                  "table_chart",
                  "bar_chart",
                  "number_chart",
                  "heatmap_chart",
                  "anomalies_chart",
                  "pie_chart",
                  "scatter_chart",
                  "gauge_chart",
                  "tail_chart",
                  "static_text_chart",
                  "map_chart",
                  "text_chart",
                  "funnel_chart",
                  "funnel_trend_chart",
                  "hierarchy_chart"
                ],
                "description": "Chart type. A funnel chart can only be switched to a funnel trend chart, which shows the funnel over time, and back.\n\n- `line_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `table_chart`: Accepts `sql_expression` queries.\n- `bar_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `number_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `heatmap_chart`: Accepts `sql_expression` queries.\n- `anomalies_chart`: Accepts `tail_query` queries.\n- `pie_chart`: Accepts `sql_expression` queries.\n- `scatter_chart`: Accepts `sql_expression` queries.\n- `gauge_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `tail_chart`: Accepts `tail_query` queries.\n- `static_text_chart`: Accepts a `static_text` query.\n- `map_chart`: Accepts `sql_expression` queries.\n- `text_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `funnel_chart`: Accepts a `funnel_query` query.\n- `funnel_trend_chart`: Accepts a `funnel_query` query.\n- `hierarchy_chart`: Accepts `sql_expression` queries.",
                "x-enum-descriptions": {
                  "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "table_chart": "Accepts `sql_expression` queries.",
                  "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "heatmap_chart": "Accepts `sql_expression` queries.",
                  "anomalies_chart": "Accepts `tail_query` queries.",
                  "pie_chart": "Accepts `sql_expression` queries.",
                  "scatter_chart": "Accepts `sql_expression` queries.",
                  "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "tail_chart": "Accepts `tail_query` queries.",
                  "static_text_chart": "Accepts a `static_text` query.",
                  "map_chart": "Accepts `sql_expression` queries.",
                  "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "funnel_chart": "Accepts a `funnel_query` query.",
                  "funnel_trend_chart": "Accepts a `funnel_query` query.",
                  "hierarchy_chart": "Accepts `sql_expression` queries."
                }
              },
              "name": {
                "type": "string",
                "description": "The chart's name. Until you name the exploration, `name` holds a generated name instead.",
                "readOnly": true
              },
              "description": {
                "type": "string",
                "description": "The chart's description, or `null` when it has none.",
                "nullable": true
              },
              "settings": {
                "type": "object",
                "properties": {
                  "unit": {
                    "type": "string",
                    "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
                  },
                  "custom_unit": {
                    "type": "boolean",
                    "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                  },
                  "decimal_places": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Number of decimal places shown."
                  },
                  "time_column": {
                    "type": "string",
                    "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
                  },
                  "x_axis_type": {
                    "type": "string",
                    "description": "How the X axis is read. Usually `time`, `value` or `category`."
                  },
                  "y_axis_type": {
                    "type": "string",
                    "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
                  },
                  "series_column": {
                    "type": "string",
                    "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
                  },
                  "value_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Result columns that hold the values to chart."
                  },
                  "point_size_column": {
                    "type": "string",
                    "description": "Column that sets each point's size on a scatter chart."
                  },
                  "location_column": {
                    "type": "string",
                    "description": "Column holding the location on a map chart."
                  },
                  "location_label": {
                    "type": "string",
                    "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
                  },
                  "label_column": {
                    "type": "string",
                    "description": "Column that names each hexagon on a hierarchy chart."
                  },
                  "group_by_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Up to two columns a hierarchy chart groups its hexagons by."
                  },
                  "palette": {
                    "type": "string",
                    "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
                  },
                  "min_value": {
                    "type": "number",
                    "description": "Lowest value of a hierarchy chart's color scale."
                  },
                  "max_value": {
                    "type": "number",
                    "description": "Highest value of a hierarchy chart's color scale."
                  },
                  "link_template": {
                    "type": "string",
                    "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
                  },
                  "y_axis_min": {
                    "type": "number",
                    "description": "Lowest value on the Y axis."
                  },
                  "y_axis_max": {
                    "type": "number",
                    "description": "Highest value on the Y axis."
                  },
                  "y_axis_auto_range": {
                    "type": "string",
                    "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
                  },
                  "y_axis_scale": {
                    "type": "string",
                    "description": "Scale of the Y axis. Usually `linear` or `log`."
                  },
                  "min": {
                    "type": "number",
                    "description": "Lower bound of a gauge."
                  },
                  "max": {
                    "type": "number",
                    "description": "Upper bound of a gauge, the goal value."
                  },
                  "treat_missing_values": {
                    "type": "string",
                    "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
                  },
                  "stacking": {
                    "type": "string",
                    "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
                  },
                  "orientation": {
                    "type": "string",
                    "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
                  },
                  "legend": {
                    "type": "string",
                    "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
                  },
                  "series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
                  },
                  "series_order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Order the series are shown in, by name."
                  },
                  "show_previous_period": {
                    "type": "boolean",
                    "description": "Whether a line chart also shows the previous period."
                  },
                  "color_mode": {
                    "type": "string",
                    "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
                  },
                  "color_upper_threshold": {
                    "type": "number",
                    "description": "Upper threshold of a number chart's colors."
                  },
                  "color_lower_threshold": {
                    "type": "number",
                    "description": "Lower threshold of a number chart's colors."
                  },
                  "color_green_words": {
                    "type": "string",
                    "description": "Values a number chart shows in green, separated by commas."
                  },
                  "color_yellow_words": {
                    "type": "string",
                    "description": "Values a number chart shows in yellow, separated by commas."
                  },
                  "color_red_words": {
                    "type": "string",
                    "description": "Values a number chart shows in red, separated by commas."
                  },
                  "column_units": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "unit": {
                          "type": "string",
                          "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                        },
                        "custom_unit": {
                          "type": "boolean",
                          "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                        }
                      }
                    },
                    "description": "Unit of each table column, by column name."
                  },
                  "percentage_highlight_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Table columns holding ratios from 0 to 1, shown with a bar."
                  },
                  "series_unit": {
                    "type": "string",
                    "description": "Unit of a heatmap's Y axis labels."
                  },
                  "series_custom_unit": {
                    "type": "boolean",
                    "description": "Whether `series_unit` is your own suffix."
                  },
                  "heatmap_color_mode": {
                    "type": "string",
                    "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
                  },
                  "value_categories": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "Text shown for the value."
                        },
                        "color": {
                          "type": "string",
                          "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                        }
                      }
                    },
                    "description": "Label and color of each cell value of a categorized heatmap."
                  },
                  "column_widths": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Width of each table column, by column name, as the chart editor saves it."
                  },
                  "table_width": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Width of the table the `column_widths` were saved for."
                  },
                  "guessed_series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Colors the chart picked for its series, keyed by `series_name`."
                  },
                  "label": {
                    "type": "string",
                    "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
                  },
                  "text": {
                    "type": "string",
                    "description": "Markdown text of a text chart."
                  },
                  "rowTemplates": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Live tail row format of each source, by source ID."
                  },
                  "sampling": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Percentage of data the chart samples."
                  },
                  "fresh": {
                    "type": "boolean",
                    "description": "Whether the chart skips cached results."
                  },
                  "funnel_unit_name": {
                    "type": "string",
                    "description": "Word a funnel chart counts in, such as `people`."
                  },
                  "filtered_series": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Series the chart shows, by name."
                  },
                  "filtered_releases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Releases the chart shows."
                  },
                  "force_source_series": {
                    "type": "boolean",
                    "description": "Whether the chart shows one series per source."
                  },
                  "treat_zero_values": {
                    "type": "string",
                    "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
                  },
                  "projection": {
                    "type": "string",
                    "description": "Map projection of a map chart, such as `mercator`."
                  },
                  "published_format": {
                    "type": "string",
                    "description": "Format a published chart is served in, `json` by default."
                  },
                  "published_cache_for": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds a published chart's results are cached, 3 by default."
                  },
                  "y_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "description": "The Y axis value the line is drawn at."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
                  },
                  "x_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The X axis value the line is drawn at, a time or a number."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
                  }
                },
                "description": "Display settings for the chart type, such as unit, axes, legend, stacking and decimal places. An update replaces all of them."
              }
            },
            "description": "Chart settings. `chart_type` is required on create. A funnel's `settings` accept `funnel_unit_name`, the word the chart counts in. The chart is always placed at `x: 0, y: 0, w: 12, h: 10`, and its name comes from the exploration's name. Returned without an `id`.",
            "nullable": false,
            "sensitive": false
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The query's ID.",
                  "readOnly": true
                },
                "query_type": {
                  "type": "string",
                  "enum": [
                    "sql_expression",
                    "tail_query",
                    "static_text",
                    "pql_expression",
                    "tail_query_builder",
                    "query_builder",
                    "funnel_query"
                  ],
                  "description": "Query type. A read-only query can't be edited, only replaced with a writable one. Responses can also hold `promql_query`, `promql_v2_query` and `promql_via_llm` for queries made in the web app.\n\n- `sql_expression`: A query written in SQL. You can write it through the API.\n- `tail_query`: The filter of a tail chart. You can write it through the API.\n- `static_text`: The text of a `static_text_chart`. You can write it through the API.\n- `pql_expression`: A query written in PQL. Read-only.\n- `tail_query_builder`: A tail chart's query made in the query builder. Read-only.\n- `query_builder`: A query made in the query builder. Read-only.\n- `funnel_query`: A funnel's one query. You can write it through the API.",
                  "x-enum-descriptions": {
                    "sql_expression": "A query written in SQL. You can write it through the API.",
                    "tail_query": "The filter of a tail chart. You can write it through the API.",
                    "static_text": "The text of a `static_text_chart`. You can write it through the API.",
                    "pql_expression": "A query written in PQL. Read-only.",
                    "tail_query_builder": "A tail chart's query made in the query builder. Read-only.",
                    "query_builder": "A query made in the query builder. Read-only.",
                    "funnel_query": "A funnel's one query. You can write it through the API."
                  }
                },
                "name": {
                  "type": "string",
                  "description": "The query's name."
                },
                "sql_query": {
                  "type": "string",
                  "description": "The SQL the query runs. Present for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries, and omitted when not set. Read-only except for `sql_expression`."
                },
                "pql_query": {
                  "type": "string",
                  "description": "The PQL the query is written in. Present only for `pql_expression` queries."
                },
                "where_condition": {
                  "type": "string",
                  "description": "The query's filter. Present only for `tail_query` and `tail_query_builder` queries, and omitted when not set."
                },
                "static_text": {
                  "type": "string",
                  "description": "The query's Markdown content. Present only for `static_text` queries, and omitted when not set."
                },
                "source_variable": {
                  "type": "string",
                  "description": "The sources the query reads, either the name of a `source` variable, such as `source`, or `source:` followed by specific sources. Defaults to `source` on create. Omitted when not set."
                },
                "x_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "y_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "point_size": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "coordinates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "where": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Where blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "group_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "having": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Having blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "order_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "funnel_query": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Step name shown on the chart. Defaults to `Step <n>`."
                          },
                          "conditions": {
                            "type": "string",
                            "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                          }
                        },
                        "required": [
                          "conditions"
                        ]
                      },
                      "description": "The funnel's steps in journey order, 2 to 32. An update with `steps` replaces every step."
                    },
                    "session_field": {
                      "type": "string",
                      "description": "Field that ties one journey's events together. Defaults to `session_id`. Use `user.id` to follow an identified user. An empty value resets it to `session_id`."
                    },
                    "breakdown_field": {
                      "type": "string",
                      "description": "Field each step is split by, such as `contexts.browser.name`. An empty value removes the breakdown."
                    },
                    "breakdown": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The field each step is split by, such as `contexts.browser.name`."
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of the breakdown field, always `string`."
                        }
                      },
                      "description": "The breakdown the funnel is split by, with its field in `value`.",
                      "readOnly": true
                    }
                  },
                  "description": "A funnel's steps, session field and breakdown. Present only for `funnel_query` queries. An update changes only the fields you send."
                }
              }
            },
            "description": "The chart's queries, in ID order. Updating an exploration replaces all of its queries. Each query accepts only the keys its `query_type` uses. A `sql_expression` query uses `sql_query` and `source_variable`. A `tail_query` uses `where_condition` and `source_variable`. A `static_text` query uses `static_text`, and a `funnel_query` uses `funnel_query`. A key another type uses, or more than one query on a chart other than `line_chart`, is refused.",
            "nullable": false,
            "sensitive": false
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The variable's name, used as `{{name}}` in queries."
                },
                "variable_type": {
                  "type": "string",
                  "enum": [
                    "source",
                    "date",
                    "datetime",
                    "string",
                    "number",
                    "sql_expression",
                    "select_value",
                    "boolean",
                    "select_with_sql",
                    "multi_select_with_sql",
                    "select_predefined_sql"
                  ],
                  "description": "Variable kind."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's current values as strings, or an empty array when it has none. For a `source` variable, these are the IDs of the selected sources."
                },
                "default_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's default values as strings, or an empty array when it has none."
                },
                "sql_definition": {
                  "type": "string",
                  "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                },
                "structured_value": {
                  "type": "object",
                  "properties": {
                    "selected_label": {
                      "type": "string",
                      "description": "Label of the selected value."
                    },
                    "canonicalSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected sources of a `source` variable. Source IDs in `values` set them."
                    },
                    "serviceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected services of a `source` variable."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "Saved filters, each a label and the SQL that lists its values."
                    }
                  },
                  "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                },
                "allow_multiple_values": {
                  "type": "boolean",
                  "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The filter's label, shown in the variable's menu."
                      },
                      "sql": {
                        "type": "string",
                        "description": "A complete query that returns one column with the filter's options."
                      }
                    }
                  },
                  "description": "The saved filters of a `select_predefined_sql` variable."
                },
                "selected_label": {
                  "type": "string",
                  "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                }
              }
            },
            "description": "Template variables, which the queries use by name. See [Query variables](/docs/logs/dashboards/variables/). An update replaces all variables, so a variable you leave out is removed, except the built-in `time`, `start_time`, `end_time` and `source` variables, which always exist. For a variable that already exists, any of `default_values`, `sql_definition` and `structured_value` you leave out keeps its value, unless `variable_type` changes, which clears them. `allow_multiple_values` you leave out keeps its value too. A variable sent without `values` gets empty `values`, except a `source` variable, which keeps its sources when you leave out both `values` and `structured_value`. `sql_definition` applies only to `select_with_sql` and `multi_select_with_sql` variables. `allow_multiple_values` is saved only for `select_value` and `select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails. A `source` variable's values are the IDs of your sources. In a `rum` exploration, pick each source as its web events, `<table_name>:web_events`. A funnel can't have variables, and its source is set in `source_id`.",
            "nullable": false,
            "sensitive": false
          },
          "product": {
            "type": "string",
            "enum": [
              "telemetry",
              "rum"
            ],
            "description": "The Explore the exploration lives in. Leave it out on create to put the exploration in Telemetry's Explore. A funnel over web events goes in RUM's Explore instead. Changing it moves the exploration to the other Explore.\n\n- `telemetry`: Telemetry's Explore.\n- `rum`: RUM's Explore, which reads an application's web events only.",
            "x-enum-descriptions": {
              "telemetry": "Telemetry's Explore.",
              "rum": "RUM's Explore, which reads an application's web events only."
            },
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the exploration was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the exploration was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the exploration, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the exploration.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.exploration_group.explorations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_from": {
            "type": "string",
            "description": "Start of the default date range, such as `now-3h`. A funnel's range starts at `now-7d` by default. Once set, it can't be cleared.",
            "nullable": false,
            "sensitive": false
          },
          "date_range_to": {
            "type": "string",
            "description": "End of the default date range, such as `now`. Once set, it can't be cleared.",
            "nullable": false,
            "sensitive": false
          },
          "exploration_group_id": {
            "type": "integer",
            "format": "int64",
            "description": "Group this exploration belongs to.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the exploration was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the exploration was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the exploration.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.extracted_metric.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the extracted metric, starting with `m-` for a metric and `g-` for a label, such as `m-123`.",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Metric or label name.",
            "nullable": false,
            "sensitive": false
          },
          "sql_expression": {
            "type": "string",
            "description": "SQL expression evaluated for each log. Log fields are in the `raw` JSON field, so read them with `JSONExtract(raw, ..., 'Nullable(Type)')`.",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "string_low_cardinality",
              "int64_delta",
              "int64",
              "uint64_delta",
              "uint64",
              "float64_delta",
              "datetime64_delta",
              "boolean"
            ],
            "description": "ClickHouse type the value is stored as.",
            "nullable": false,
            "sensitive": false
          },
          "aggregations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Aggregations to precompute, `avg`, `count`, `uniq`, `max`, `min`, `sum` or `histogram`. An empty array makes this a label rather than a metric.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the metric's source, such as `t123`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.gcp_metric.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "metric_type": {
            "type": "string",
            "description": "Google Cloud metric type, such as `compute.googleapis.com/instance/cpu/utilization`.",
            "nullable": false,
            "sensitive": false
          },
          "display_name": {
            "type": "string",
            "description": "Name Google Cloud shows for the metric.",
            "nullable": false,
            "sensitive": false
          },
          "description": {
            "type": "string",
            "description": "What the metric measures, as Google Cloud describes it.",
            "nullable": false,
            "sensitive": false
          },
          "kind": {
            "type": "string",
            "description": "Google Cloud metric kind, `GAUGE`, `DELTA` or `CUMULATIVE`.",
            "nullable": false,
            "sensitive": false
          },
          "service_name": {
            "type": "string",
            "description": "Google Cloud service the metric belongs to, such as `compute.googleapis.com`.",
            "nullable": false,
            "sensitive": false
          },
          "collected": {
            "type": "boolean",
            "description": "Whether the source's `gcp_metrics_filters` collect this metric. Change them via [Update a source](/docs/logs/api/update-source/).",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.log_pattern.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "message": {
            "type": "string",
            "description": "The message of the pattern's latest log in the time range, cut to 1000 characters. `null` when its logs have no `message` field.",
            "nullable": true,
            "sensitive": false
          },
          "occurrences": {
            "type": "integer",
            "format": "int64",
            "description": "Number of logs with this pattern in the time range.",
            "nullable": false,
            "sensitive": false
          },
          "first_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the pattern's first log in the time range was received.",
            "nullable": false,
            "sensitive": false
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the pattern's latest log in the time range was received.",
            "nullable": false,
            "sensitive": false
          },
          "samples": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the step starts."
                },
                "count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of logs with this pattern in the step."
                }
              }
            },
            "description": "The pattern's count per `step`, oldest first, for each step that has logs. Returned only when `step` is set.",
            "nullable": false,
            "sensitive": false
          },
          "logs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "dt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the log was received."
                },
                "level": {
                  "type": "string",
                  "description": "The log's level, from the first of its `level`, `severity`, `severity_text`, `message.level`, `log.level`, `vercel.level` and `outcome` fields it has. `null` when it has none of them.",
                  "nullable": true
                },
                "message": {
                  "type": "string",
                  "description": "The log's message, cut to 1000 characters. `null` when the log has no `message` field.",
                  "nullable": true
                }
              }
            },
            "description": "The pattern's 10 newest logs in the time range, newest first. Returned by get only.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.metric.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Metric name.",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "description": "The data type the metric is stored as. Ingested metrics are `float64`. A user-defined metric has the type its definition sets.",
            "nullable": false,
            "sensitive": false
          },
          "origin": {
            "type": "string",
            "enum": [
              "ingested",
              "user-defined"
            ],
            "description": "Where the metric comes from.\n\n- `ingested`: The metric was sent to Better Stack as a metric.\n- `user-defined`: The metric is defined from the source's logs.",
            "x-enum-descriptions": {
              "ingested": "The metric was sent to Better Stack as a metric.",
              "user-defined": "The metric is defined from the source's logs."
            },
            "nullable": false,
            "sensitive": false
          },
          "layout": {
            "type": "string",
            "enum": [
              "row-based",
              "column-based"
            ],
            "description": "How the metric is stored, which decides how to query it.\n\n- `row-based`: The metric shares the `value_*` columns with other metrics and is selected by `name`.\n- `column-based`: The metric has columns of its own.",
            "x-enum-descriptions": {
              "row-based": "The metric shares the `value_*` columns with other metrics and is selected by `name`.",
              "column-based": "The metric has columns of its own."
            },
            "nullable": false,
            "sensitive": false
          },
          "aggregations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Aggregations stored for the metric, such as `avg`, `max` and `min`.",
            "nullable": false,
            "sensitive": false
          },
          "data_points": {
            "type": "integer",
            "format": "int64",
            "description": "Data points received in the last 24 hours.",
            "nullable": false,
            "sensitive": false
          },
          "active_series": {
            "type": "integer",
            "format": "int64",
            "description": "Distinct series seen in the last 24 hours.",
            "nullable": false,
            "sensitive": false
          },
          "sql_expression": {
            "type": "string",
            "description": "The SQL expression a user-defined metric is defined by. `null` for an ingested metric or one defined by `json_dot_notation`. Returned by get only.",
            "nullable": true,
            "sensitive": false
          },
          "json_dot_notation": {
            "type": "string",
            "description": "The JSON field a user-defined metric is read from, when it's defined that way. Returned by get only.",
            "nullable": true,
            "sensitive": false
          },
          "query_examples": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Expressions to select the metric with in a metrics query. Returned by get only.",
            "nullable": false,
            "sensitive": false
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Labels seen on an ingested metric in the last 24 hours. `null` for a user-defined metric. Returned by get only.",
            "nullable": true,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.service.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the source that detected the service.",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The service's name.",
            "nullable": false,
            "sensitive": false
          },
          "namespace": {
            "type": "string",
            "description": "The Kubernetes namespace of a service named `<namespace>/<kind>/<name>`. `null` for other services.",
            "nullable": true,
            "sensitive": false
          },
          "platform": {
            "type": "string",
            "description": "What the service runs, such as `postgresql`, `nginx` or `rails`. `null` when it isn't known.",
            "nullable": true,
            "sensitive": false
          },
          "platform_title": {
            "type": "string",
            "description": "The platform's name, such as `PostgreSQL`. `null` when the platform isn't known.",
            "nullable": true,
            "sensitive": false
          },
          "matching": {
            "type": "string",
            "enum": [
              "exact",
              "prefix",
              "workload"
            ],
            "description": "How the name matches the service field of logs, spans and metrics.\n\n- `exact`: Matches the name itself.\n- `prefix`: Matches every name that starts with it.\n- `workload`: Matches a Kubernetes service named `<namespace>/<kind>/<name>` by its full name or by `<name>` alone.",
            "x-enum-descriptions": {
              "exact": "Matches the name itself.",
              "prefix": "Matches every name that starts with it.",
              "workload": "Matches a Kubernetes service named `<namespace>/<kind>/<name>` by its full name or by `<name>` alone."
            },
            "nullable": false,
            "sensitive": false
          },
          "source_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The kinds of data the service was seen in, such as `logs`, `spans` or `metrics`.",
            "nullable": false,
            "sensitive": false
          },
          "name_fields": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "The fields the service's name is read from, as lists keyed by the kind of data, such as `logs` or `spans`. Set them in the source's settings under **Extract services**.",
            "nullable": false,
            "sensitive": false
          },
          "kubernetes_labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The Kubernetes labels of the service's workload, without the ones Kubernetes adds itself, such as `pod-template-hash`. An empty object for a service outside Kubernetes.",
            "nullable": false,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the service was first detected.",
            "nullable": false,
            "sensitive": false
          },
          "last_seen_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the service was last seen in the source's data. `null` when it isn't known.",
            "nullable": true,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.service_map.get": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "source_id": {
            "type": "string",
            "description": "The ID of the source the map is drawn from.",
            "nullable": false,
            "sensitive": false
          },
          "display_mode": {
            "type": "string",
            "enum": [
              "services",
              "hosts"
            ],
            "description": "Whether the map's nodes are services or hosts. A map drawn from traces is always `services`.",
            "nullable": false,
            "sensitive": false
          },
          "nodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The node's name. The `entry` node is named `Unknown`."
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "service",
                    "host",
                    "database",
                    "queue",
                    "entry"
                  ],
                  "description": "What the node is.\n\n- `service`: A service.\n- `host`: A host.\n- `database`: A database, drawn from the traces of the services that call it.\n- `queue`: A message queue, drawn from the traces of the services that call it.\n- `entry`: Stands for requests from outside the traced services, such as users or callers that send no traces.",
                  "x-enum-descriptions": {
                    "service": "A service.",
                    "host": "A host.",
                    "database": "A database, drawn from the traces of the services that call it.",
                    "queue": "A message queue, drawn from the traces of the services that call it.",
                    "entry": "Stands for requests from outside the traced services, such as users or callers that send no traces."
                  }
                },
                "platform": {
                  "type": "string",
                  "description": "What the node runs, such as `golang`, `java`, `postgres` or `kafka`, as the collector or the traces report it. `null` when it isn't known, or for a host whose applications run on different platforms.",
                  "nullable": true
                },
                "containers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The containers of the service, or on the host. On a map drawn from traces, the service's processes."
                },
                "listen_addresses": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The addresses the node listens on, each an IP address and port. On a map drawn from traces, the host names its callers reach it by."
                },
                "requests_per_second": {
                  "type": "number",
                  "description": "Average requests per second into the node, summed over its incoming connections. `null` when no incoming requests were measured.",
                  "nullable": true
                },
                "server_error_share": {
                  "type": "number",
                  "description": "Share of the node's incoming requests that failed with a server error, from 0 to 1. `null` when no incoming requests were measured.",
                  "nullable": true
                },
                "client_error_share": {
                  "type": "number",
                  "description": "Share of the node's incoming requests that failed with a client error, from 0 to 1. `null` when no incoming requests were measured.",
                  "nullable": true
                },
                "outbound_requests_per_second": {
                  "type": "number",
                  "description": "Average rate of the requests the node makes, per second, summed over its outgoing connections. `null` when no outgoing requests were measured.",
                  "nullable": true
                }
              }
            },
            "description": "The services or hosts on the map, sorted by name.",
            "nullable": false,
            "sensitive": false
          },
          "connections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "description": "The name of the node that makes the calls."
                },
                "destination": {
                  "type": "string",
                  "description": "The name of the node called. An outside address is named by its DNS name with the port, or by its IP address and port when DNS gives no name. `unknown` when the address isn't known. On a map drawn from traces, an outside address is the host called."
                },
                "destination_address": {
                  "type": "string",
                  "description": "The IP address and port called. On a map drawn from traces, the host, queue or service called. `null` when it isn't known.",
                  "nullable": true
                },
                "external": {
                  "type": "boolean",
                  "description": "Whether the destination is an outside address rather than a node on the map."
                },
                "protocols": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The protocols seen on the connection, such as `HTTP`, `Postgres`, `Redis` or `Kafka`."
                },
                "requests_per_second": {
                  "type": "number",
                  "description": "Average requests per second in the time range. `null` when no requests were measured.",
                  "nullable": true
                },
                "server_error_share": {
                  "type": "number",
                  "description": "Share of requests that failed with a server error, from 0 to 1. A server error is an HTTP 5xx response or a gRPC status such as `UNAVAILABLE` or `INTERNAL`. `null` when no requests were measured.",
                  "nullable": true
                },
                "client_error_share": {
                  "type": "number",
                  "description": "Share of requests that failed with a client error, from 0 to 1. A client error is an HTTP 4xx response or any other gRPC status except `OK`. `null` when no requests were measured.",
                  "nullable": true
                },
                "duration_p50_ms": {
                  "type": "number",
                  "description": "Median request duration in milliseconds, as the upper bound of the histogram bucket it falls in. `null` when no durations were measured. When `duration_p50_lower_bound` is `true`, the value is the highest bucket bound and the real duration is higher.",
                  "nullable": true
                },
                "duration_p95_ms": {
                  "type": "number",
                  "description": "95th percentile of request duration in milliseconds, as the upper bound of the histogram bucket it falls in. `null` when no durations were measured. When `duration_p95_lower_bound` is `true`, the value is the highest bucket bound and the real duration is higher.",
                  "nullable": true
                },
                "duration_p99_ms": {
                  "type": "number",
                  "description": "99th percentile of request duration in milliseconds, as the upper bound of the histogram bucket it falls in. `null` when no durations were measured. When `duration_p99_lower_bound` is `true`, the value is the highest bucket bound and the real duration is higher.",
                  "nullable": true
                },
                "duration_p50_lower_bound": {
                  "type": "boolean",
                  "description": "Whether the median is above the histogram's highest bucket bound, so the real value is higher than `duration_p50_ms`. `null` on a map drawn from a collector.",
                  "nullable": true
                },
                "duration_p95_lower_bound": {
                  "type": "boolean",
                  "description": "Whether the 95th percentile is above the histogram's highest bucket bound, so the real value is higher than `duration_p95_ms`. `null` on a map drawn from a collector.",
                  "nullable": true
                },
                "duration_p99_lower_bound": {
                  "type": "boolean",
                  "description": "Whether the 99th percentile is above the histogram's highest bucket bound, so the real value is higher than `duration_p99_ms`. `null` on a map drawn from a collector.",
                  "nullable": true
                }
              }
            },
            "description": "The connections from each node, sorted by `source` and `destination`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.service_operation.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "The span name, as the service sent it.",
            "nullable": false,
            "sensitive": false
          },
          "kind": {
            "type": "string",
            "description": "The spans' kind, such as `server`, `client` or `internal`. `null` when the spans have no kind.",
            "nullable": true,
            "sensitive": false
          },
          "span_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of spans with this name and kind in the time range.",
            "nullable": false,
            "sensitive": false
          },
          "error_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of those spans that failed. A span failed when its status is an error, its HTTP response status is 400 or higher, or its gRPC status isn't `OK`.",
            "nullable": false,
            "sensitive": false
          },
          "avg_duration_ms": {
            "type": "number",
            "description": "Average duration of the spans in milliseconds.",
            "nullable": false,
            "sensitive": false
          },
          "max_duration_ms": {
            "type": "number",
            "description": "Duration of the slowest span in milliseconds.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.source.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Source name.",
            "nullable": false,
            "sensitive": false
          },
          "platform": {
            "type": "string",
            "enum": [
              "apache2",
              "aws",
              "aws_cloudwatch",
              "aws_ecs",
              "aws_elb",
              "aws_fargate",
              "azure",
              "azure_logs",
              "claude_platform",
              "cloudflare_logpush",
              "cloudflare_prometheus_exporter",
              "cloudflare_worker",
              "datadog_agent",
              "digitalocean",
              "docker",
              "dokku",
              "dotnet",
              "elasticsearch",
              "erlang",
              "fastly",
              "filebeat",
              "flights",
              "fluentbit",
              "fluentd",
              "fly_io",
              "gcp",
              "go",
              "google_cloud_pubsub",
              "haproxy",
              "heroku",
              "http",
              "java",
              "javascript",
              "kubernetes",
              "logstash",
              "minio",
              "mongodb",
              "mysql",
              "nginx",
              "open_telemetry",
              "oracle_cloud",
              "php",
              "postgresql",
              "prometheus",
              "prometheus_scrape",
              "python",
              "rabbitmq",
              "redis",
              "render",
              "rsyslog",
              "ruby",
              "syslog-ng",
              "traefik",
              "ubuntu",
              "vector",
              "vercel_integration",
              "winlogbeat"
            ],
            "description": "The platform the source ingests from. For a collector, use [Create a collector](/docs/logs/api/create-a-collector/), which creates its own source.",
            "nullable": false,
            "sensitive": false
          },
          "data_region": {
            "type": "string",
            "description": "The data region, `europe`, `us`, `singapore` or a dedicated cluster's name from [List data regions](/docs/logs/api/data-regions/). Returned as that name.",
            "nullable": false,
            "sensitive": false
          },
          "cluster": {
            "type": "string",
            "description": "The cluster the source's data is stored on, by its name. To connect Grafana to this data, send it as the `cluster` of [Create a connection](/docs/logs/api/connections/create/).",
            "nullable": false,
            "sensitive": false
          },
          "source_group_id": {
            "type": "string",
            "description": "Source group this source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/).",
            "nullable": true,
            "sensitive": false
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this source.",
            "nullable": false,
            "sensitive": false
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days logs are kept, one of the retention periods your plan offers.",
            "nullable": false,
            "sensitive": false
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days metrics are kept, one of the retention periods your plan offers.",
            "nullable": false,
            "sensitive": false
          },
          "live_tail_pattern": {
            "type": "string",
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
            "nullable": true,
            "sensitive": false
          },
          "live_tail_pattern_spans": {
            "type": "string",
            "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
            "nullable": true,
            "sensitive": false
          },
          "vrl_transformation_logs": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
            "nullable": false,
            "sensitive": false
          },
          "vrl_transformation_spans": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
            "nullable": false,
            "sensitive": false
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
            "nullable": false,
            "sensitive": false
          },
          "scrape_urls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs to scrape metrics from. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_frequency_secs": {
            "type": "integer",
            "format": "int64",
            "enum": [
              15,
              30,
              60,
              120,
              300
            ],
            "description": "Seconds between scrapes. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_request_headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The header's name."
                },
                "value": {
                  "type": "string",
                  "description": "The header's value."
                }
              }
            },
            "description": "Custom headers sent with each scrape request, each with a `name` and a `value`. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_request_basic_auth_user": {
            "type": "string",
            "description": "Username for basic authentication on scrape requests. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": true,
            "sensitive": false
          },
          "skip_ssl_verify": {
            "type": "boolean",
            "description": "Whether to skip TLS certificate verification when scraping. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": false,
            "sensitive": false
          },
          "aws_auto_sub_log_groups": {
            "type": "boolean",
            "description": "Whether to subscribe new CloudWatch log groups automatically when they're discovered. Only for the `aws` platform.",
            "nullable": false,
            "sensitive": false
          },
          "gcp_metrics_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "include": {
                  "type": "string",
                  "description": "A regular expression for metric types to collect, or `*` for every metric."
                },
                "exclude": {
                  "type": "string",
                  "description": "A regular expression for metric types to leave out. Every other metric is collected."
                }
              }
            },
            "description": "Which Google Cloud metrics the source collects. Each rule has one key, `include` or `exclude`, holding a regular expression that must match the whole metric type, or `*` for every metric. All rules use the same key. An empty list collects no metrics, which is the default. Each GCP metric's `collected` says whether these rules collect it. Only for the `gcp` platform.",
            "nullable": false,
            "sensitive": false
          },
          "gcp_log_filter": {
            "type": "string",
            "description": "Google Cloud Logging query that selects which logs the source receives. `null` forwards every log, which is the default. Google Cloud checks the query when it's saved and refuses an invalid one. Only for the `gcp` platform.",
            "nullable": true,
            "sensitive": false
          },
          "custom_bucket": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The bucket's name, taken from `endpoint`.",
                "readOnly": true
              },
              "endpoint": {
                "type": "string",
                "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
              },
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              },
              "keep_data_after_retention": {
                "type": "boolean",
                "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
              }
            },
            "description": "Your own S3-compatible bucket to archive data in, or `null` when the source uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). The bucket can't be changed after the source is created. To rotate the key pair, update only `access_key_id` and `secret_access_key`. We check the new pair against the bucket first and refuse the whole request when it fails. A bucket that several sources share is rotated for all of them.",
            "nullable": true,
            "sensitive": false
          },
          "connected_source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the sources connected to this one, so you can correlate their logs and traces. Connections go both ways. The source is connected to each listed source and to every source those are already connected to.",
            "nullable": false,
            "sensitive": false
          },
          "service_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name_key": {
                  "type": "string",
                  "description": "The field to extract the service name from, such as `service.name`."
                },
                "type_key": {
                  "type": "string",
                  "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                }
              }
            },
            "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. An update replaces the existing list, and `[]` removes them all.",
            "nullable": false,
            "sensitive": false
          },
          "source_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Kinds of data the source holds, such as `logs`, `spans`, `metrics`, `exceptions` or `web_events`, sorted by name.",
            "nullable": false,
            "sensitive": false
          },
          "parent_source_id": {
            "type": "string",
            "description": "The source whose table this source shares, when it's connected to one. `query_collections` then names that source's collections. `null` otherwise.",
            "nullable": true,
            "sensitive": false
          },
          "query_collections": {
            "type": "object",
            "properties": {
              "database": {
                "type": "string",
                "description": "The ClickHouse database that holds the source's data."
              },
              "table": {
                "type": "string",
                "description": "The physical table, as `database.table`."
              },
              "recent": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "The collection with the last 30 minutes of data, keyed by the kind of data, such as `logs` or `metrics`."
              },
              "s3": {
                "type": "string",
                "description": "The collection that holds older rows of every type."
              },
              "app_filter": {
                "type": "string",
                "description": "The condition that keeps only the source's rows in its parent's raw collections. `null` unless the source is connected to a source.",
                "nullable": true
              },
              "metrics_app_filter": {
                "type": "string",
                "description": "The condition that keeps only the source's rows in its parent's metrics collection. `null` unless the source is connected to a source.",
                "nullable": true
              }
            },
            "description": "ClickHouse names to query the source's data by. A connected source's data is in its parent's collections, and `app_filter` and `metrics_app_filter` keep only its own rows.",
            "nullable": false,
            "sensitive": false
          },
          "last_data_on": {
            "type": "string",
            "format": "date",
            "description": "The last day the source received data, in UTC, such as `2026-06-11`. `null` when the source received no data in the last 30 days. The date can be up to about 15 minutes behind.",
            "nullable": true,
            "sensitive": false
          },
          "token": {
            "type": "string",
            "description": "Ingestion token. Returned in every response.",
            "nullable": false,
            "sensitive": true
          },
          "table_name": {
            "type": "string",
            "description": "The name you query the source's data by, such as `nginx`.",
            "nullable": false,
            "sensitive": false
          },
          "ingesting_host": {
            "type": "string",
            "description": "Host to send data to. `null` for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms, whose data Better Stack scrapes.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the source was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the source was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the source, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the source.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_request_basic_auth_password": {
            "type": "string",
            "description": "Password for basic authentication on scrape requests. Not returned after it's saved. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": true,
            "sensitive": true,
            "writeonly": true
          },
          "aws_role_arn": {
            "type": "string",
            "description": "ARN of the IAM role from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "nullable": false,
            "sensitive": true,
            "writeonly": true
          },
          "aws_external_id": {
            "type": "string",
            "description": "External ID from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "nullable": false,
            "sensitive": true,
            "writeonly": true
          }
        }
      },
      "CLIResponse.telemetry.source_field.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "path": {
            "type": "string",
            "description": "The field's path in the log or span, such as `nginx.status`.",
            "nullable": false,
            "sensitive": false
          },
          "path_parts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The path's segments as quoted `JSONExtract` arguments, so `JSONExtract(raw, <the segments joined by commas>, 'Nullable(String)')` reads the field.",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "description": "The field's data type, such as `String` or `Int64`.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.source_field_value.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "value": {
            "type": "string",
            "description": "The field's value as text, cut to 1000 characters. A number or boolean is written as it appears in the data, such as `503` or `true`.",
            "nullable": false,
            "sensitive": false
          },
          "occurrences": {
            "type": "integer",
            "format": "int64",
            "description": "Number of logs or spans with this value in the time range.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.source_group.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Group name.",
            "nullable": false,
            "sensitive": false
          },
          "sort_index": {
            "type": "integer",
            "format": "int64",
            "description": "Display order among your source groups. Lower values come first.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "string",
            "pattern": "^t[1-9][0-9]*$",
            "description": "Team that owns the group, such as `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the group.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "CLIResponse.telemetry.source_group.sources": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "name": {
            "type": "string",
            "description": "Source name.",
            "nullable": false,
            "sensitive": false
          },
          "platform": {
            "type": "string",
            "enum": [
              "apache2",
              "aws",
              "aws_cloudwatch",
              "aws_ecs",
              "aws_elb",
              "aws_fargate",
              "azure",
              "azure_logs",
              "claude_platform",
              "cloudflare_logpush",
              "cloudflare_prometheus_exporter",
              "cloudflare_worker",
              "datadog_agent",
              "digitalocean",
              "docker",
              "dokku",
              "dotnet",
              "elasticsearch",
              "erlang",
              "fastly",
              "filebeat",
              "flights",
              "fluentbit",
              "fluentd",
              "fly_io",
              "gcp",
              "go",
              "google_cloud_pubsub",
              "haproxy",
              "heroku",
              "http",
              "java",
              "javascript",
              "kubernetes",
              "logstash",
              "minio",
              "mongodb",
              "mysql",
              "nginx",
              "open_telemetry",
              "oracle_cloud",
              "php",
              "postgresql",
              "prometheus",
              "prometheus_scrape",
              "python",
              "rabbitmq",
              "redis",
              "render",
              "rsyslog",
              "ruby",
              "syslog-ng",
              "traefik",
              "ubuntu",
              "vector",
              "vercel_integration",
              "winlogbeat"
            ],
            "description": "The platform the source ingests from.",
            "nullable": false,
            "sensitive": false
          },
          "data_region": {
            "type": "string",
            "description": "The storage zone the source's data is kept in, such as `us-west-2a`.",
            "nullable": false,
            "sensitive": false
          },
          "source_group_id": {
            "type": "integer",
            "format": "int64",
            "description": "The ID of the source group the source belongs to.",
            "nullable": false,
            "sensitive": false
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this source.",
            "nullable": false,
            "sensitive": false
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days the source keeps logs.",
            "nullable": false,
            "sensitive": false
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days the source keeps metrics.",
            "nullable": false,
            "sensitive": false
          },
          "live_tail_pattern": {
            "type": "string",
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
            "nullable": true,
            "sensitive": false
          },
          "vrl_transformation_logs": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line as it's ingested. An empty string when there's no program or it's the platform's default program.",
            "nullable": false,
            "sensitive": false
          },
          "vrl_transformation_spans": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span as it's ingested. An empty string when there's no program.",
            "nullable": false,
            "sensitive": false
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names dropped when they're ingested.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_urls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs to scrape metrics from. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_frequency_secs": {
            "type": "integer",
            "format": "int64",
            "enum": [
              15,
              30,
              60,
              120,
              300
            ],
            "description": "Seconds between scrapes.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_request_headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The header's name."
                },
                "value": {
                  "type": "string",
                  "description": "The header's value."
                }
              }
            },
            "description": "Custom headers sent with each scrape request, each with a `name` and a `value`. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": false,
            "sensitive": false
          },
          "scrape_request_basic_auth_user": {
            "type": "string",
            "description": "Username for basic authentication on scrape requests. `null` or an empty string when none is set.",
            "nullable": true,
            "sensitive": false
          },
          "scrape_request_basic_auth_password": {
            "type": "string",
            "description": "Password for basic authentication on scrape requests. Not returned after it's saved. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "nullable": true,
            "sensitive": true,
            "writeonly": true
          },
          "skip_ssl_verify": {
            "type": "boolean",
            "description": "Whether scrapes skip TLS verification.",
            "nullable": false,
            "sensitive": false
          },
          "custom_bucket": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The bucket's name, taken from `endpoint`.",
                "readOnly": true
              },
              "endpoint": {
                "type": "string",
                "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
              },
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              },
              "keep_data_after_retention": {
                "type": "boolean",
                "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
              }
            },
            "description": "Your own S3-compatible bucket the source archives data in, or `null` when it uses Better Stack storage. `secret_access_key` is never returned.",
            "nullable": true,
            "sensitive": false
          },
          "token": {
            "type": "string",
            "description": "Ingestion token. Returned in every response.",
            "nullable": false,
            "sensitive": true
          },
          "table_name": {
            "type": "string",
            "description": "The name you query the source's data by, such as `prometheus`.",
            "nullable": false,
            "sensitive": false
          },
          "ingesting_host": {
            "type": "string",
            "description": "Host to send data to. `null` for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms, whose data Better Stack scrapes.",
            "nullable": true,
            "sensitive": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the source was created.",
            "nullable": false,
            "sensitive": false
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the source was last updated.",
            "nullable": false,
            "sensitive": false
          },
          "team_id": {
            "type": "integer",
            "format": "int64",
            "description": "Team that owns the source, as the number in its team ID, such as `123` for `t123`.",
            "nullable": false,
            "sensitive": false
          },
          "team_name": {
            "type": "string",
            "description": "Name of the team that owns the source.",
            "nullable": false,
            "sensitive": false
          },
          "retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days to keep logs, the same as `logs_retention`.",
            "nullable": false,
            "sensitive": false
          },
          "vrl_transformation": {
            "type": "string",
            "description": "VRL program Better Stack runs on each log line as it's ingested, the same as `vrl_transformation_logs`. An empty string when there's no program or it's the platform's default program.",
            "nullable": false,
            "sensitive": false
          },
          "aws_role_arn": {
            "type": "string",
            "description": "ARN of the IAM role from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "nullable": false,
            "sensitive": true,
            "writeonly": true
          },
          "aws_external_id": {
            "type": "string",
            "description": "External ID from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "nullable": false,
            "sensitive": true,
            "writeonly": true
          }
        }
      },
      "CLIResponse.telemetry.trace.list": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "type": {
            "type": "string",
            "nullable": false,
            "sensitive": false
          },
          "trace_id": {
            "type": "string",
            "description": "The trace's ID.",
            "nullable": false,
            "sensitive": false
          },
          "start_time": {
            "type": "string",
            "format": "date-time",
            "description": "When the trace's first span started, in UTC with microseconds.",
            "nullable": false,
            "sensitive": false
          },
          "duration_ms": {
            "type": "number",
            "description": "Milliseconds from the start of the first span to the end of the last one. Listing traces reads this source's spans, and getting a trace reads its connected sources' spans too.",
            "nullable": false,
            "sensitive": false
          },
          "root_service": {
            "type": "string",
            "description": "The service of the trace's root span. When the time range doesn't hold the root span, it's the service of the trace's first span. `null` when that span has no service. Returned by list only.",
            "nullable": true,
            "sensitive": false
          },
          "root_operation": {
            "type": "string",
            "description": "The name of the trace's root span. When the time range doesn't hold the root span, it's the name of the trace's first span. `null` when that span has no name. Returned by list only.",
            "nullable": true,
            "sensitive": false
          },
          "span_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of spans found for the trace. Listing traces counts this source's spans, and getting a trace counts its connected sources' spans too.",
            "nullable": false,
            "sensitive": false
          },
          "error_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of failed spans. A span failed when its status is an error, its HTTP response status is 400 or higher, or its gRPC status isn't `OK`. Listing traces reads this source's spans, and getting a trace reads its connected sources' spans too.",
            "nullable": false,
            "sensitive": false
          },
          "services": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The services the trace's spans come from, in the order they first appear. Returned by get only.",
            "nullable": false,
            "sensitive": false
          },
          "spans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "depth": {
                  "type": "integer",
                  "format": "int64",
                  "description": "How deep the row sits in the tree, from `0` for a root span."
                },
                "span_id": {
                  "type": "string",
                  "description": "The span's ID. On a collapsed row, the ID of its slowest span."
                },
                "parent_span_id": {
                  "type": "string",
                  "description": "The ID of the parent span. Left out on a root span."
                },
                "name": {
                  "type": "string",
                  "description": "The span's name."
                },
                "kind": {
                  "type": "string",
                  "description": "The span's kind, such as `server`, `client` or `internal`."
                },
                "span_type": {
                  "type": "string",
                  "enum": [
                    "db",
                    "http",
                    "rpc",
                    "messaging",
                    "app"
                  ],
                  "description": "What the span does, read from its attributes.\n\n- `db`: A database call.\n- `http`: An HTTP request.\n- `rpc`: A remote procedure call.\n- `messaging`: A message queue operation.\n- `app`: Anything else.",
                  "x-enum-descriptions": {
                    "db": "A database call.",
                    "http": "An HTTP request.",
                    "rpc": "A remote procedure call.",
                    "messaging": "A message queue operation.",
                    "app": "Anything else."
                  }
                },
                "service": {
                  "type": "string",
                  "description": "The service the span comes from. Empty when the span names none."
                },
                "source_id": {
                  "type": "string",
                  "description": "The ID of the source the span was read from, which is this source or one of its connected sources."
                },
                "offset_ms": {
                  "type": "number",
                  "description": "Milliseconds from the trace's start to the start of the span. On a collapsed row, to the start of its first span."
                },
                "duration_ms": {
                  "type": "number",
                  "description": "The span's duration in milliseconds. On a collapsed row, the total of its spans' durations."
                },
                "span_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "How many spans the row stands for. A row of more than 1 is a collapsed row, which groups similar sibling spans under one parent, such as the same database query, route or call."
                },
                "avg_duration_ms": {
                  "type": "number",
                  "description": "Average duration of the collapsed row's spans in milliseconds. Left out when `span_count` is 1."
                },
                "max_duration_ms": {
                  "type": "number",
                  "description": "Duration of the collapsed row's slowest span in milliseconds. Left out when `span_count` is 1."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "error"
                  ],
                  "description": "Whether the span failed.\n\n- `ok`: The span didn't fail.\n- `error`: The span failed, or on a collapsed row, any of its spans failed.",
                  "x-enum-descriptions": {
                    "ok": "The span didn't fail.",
                    "error": "The span failed, or on a collapsed row, any of its spans failed."
                  }
                },
                "event_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of events recorded on the span, or on all of a collapsed row's spans."
                },
                "detail": {
                  "type": "string",
                  "description": "One line about what the span did, such as the database and statement, the HTTP method, URL and response status, or the called method, cut to 300 characters. Empty when the span has none of these attributes."
                },
                "exceptions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "The exception's type. Left out when it has none."
                      },
                      "message": {
                        "type": "string",
                        "description": "The exception's message, cut to 200 characters. Left out when it has none."
                      }
                    }
                  },
                  "description": "Up to 5 exceptions recorded on the span or the collapsed row's spans, as an empty list when there are none."
                }
              }
            },
            "description": "The trace's spans as a tree, one row per span in depth-first order, starting with the root spans. Repeated sibling spans are collapsed into one row. A span whose parent isn't in the trace starts a tree of its own after the root spans. At most 500 rows are returned. Returned by get only.",
            "nullable": false,
            "sensitive": false
          },
          "truncated_row_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of rows left out of `spans` past the first 500. Returned by get only.",
            "nullable": false,
            "sensitive": false
          },
          "orphaned_span_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of spans whose parent span isn't in the trace, for example because it wasn't sampled or falls outside the time range. A span without its parent starts a tree of its own in `spans`. Returned by get only.",
            "nullable": false,
            "sensitive": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Problems reading the trace, such as a connected source that couldn't be queried, whose spans are then missing from `spans`. An empty list when there are none. Returned by get only.",
            "nullable": false,
            "sensitive": false
          }
        }
      },
      "Collector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The collector's id."
          },
          "type": {
            "type": "string",
            "const": "collector"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Collector name.",
                "examples": [
                  "Production Kubernetes"
                ]
              },
              "platform": {
                "type": "string",
                "enum": [
                  "docker",
                  "swarm",
                  "kubernetes"
                ],
                "description": "Where the collector runs.",
                "examples": [
                  "kubernetes"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A note about the collector.",
                "examples": [
                  "Main cluster for production services."
                ]
              },
              "data_region": {
                "type": "string",
                "description": "The data region, `europe`, `us`, `singapore` or a dedicated cluster's name from [List data regions](/docs/logs/api/data-regions/). Returned as that name.",
                "examples": [
                  "europe"
                ]
              },
              "logs_retention": {
                "type": "integer",
                "format": "int64",
                "description": "Days logs are kept, one of the retention periods your plan offers.",
                "examples": [
                  30
                ]
              },
              "metrics_retention": {
                "type": "integer",
                "format": "int64",
                "description": "Days metrics are kept, one of the retention periods your plan offers.",
                "examples": [
                  90
                ]
              },
              "ingesting_paused": {
                "type": "boolean",
                "description": "Whether ingestion is paused for this collector.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "collector_logs_transformation": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "vrl",
                "description": "VRL program the collector runs on each log line on your hardware, before sending it to Better Stack.",
                "examples": [
                  ".message = downcase!(.message)"
                ]
              },
              "collector_metrics_transformation": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "vrl",
                "description": "VRL program the collector runs on each metric on your hardware, before sending it to Better Stack.",
                "examples": [
                  "del(.tags.pod_uid)"
                ]
              },
              "collector_traces_transformation": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "vrl",
                "description": "VRL program the collector runs on each span on your hardware, before sending it to Better Stack.",
                "examples": [
                  ".service = \"checkout\""
                ]
              },
              "ingestion_logs_transformation": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "vrl",
                "description": "VRL program Better Stack runs on each log line from the collector as it's ingested.",
                "examples": [
                  ".environment = \"production\""
                ]
              },
              "ingestion_traces_transformation": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "vrl",
                "description": "VRL program Better Stack runs on each span from the collector as it's ingested.",
                "examples": [
                  ".name = downcase!(.name)"
                ]
              },
              "source_group_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Source group the collector's source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/).",
                "examples": [
                  "543"
                ]
              },
              "live_tail_pattern": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the collector's source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
                "examples": [
                  "{level} {message}"
                ]
              },
              "live_tail_pattern_spans": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the collector's source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
                "examples": [
                  "{span.name} {duration}"
                ]
              },
              "blocked_metrics": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
                "default": [],
                "examples": [
                  [
                    "go_gc_duration_seconds",
                    "go_memstats_heap_idle_bytes"
                  ]
                ]
              },
              "user_vector_config": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Your own Vector configuration in YAML, merged into the configuration the collector runs with.",
                "examples": [
                  "sources:\n  custom_input:\n    type: file\n    include:\n      - /var/log/custom.log"
                ]
              },
              "configuration": {
                "type": "object",
                "properties": {
                  "components": {
                    "type": "object",
                    "properties": {
                      "logs_host": {
                        "type": "boolean",
                        "description": "Collect logs from the host's /var/log directory."
                      },
                      "logs_docker": {
                        "type": "boolean",
                        "description": "Collect logs of Docker containers that use the default json-file logging driver."
                      },
                      "logs_kubernetes": {
                        "type": "boolean",
                        "description": "Collect Kubernetes container logs and events."
                      },
                      "logs_collector_internals": {
                        "type": "boolean",
                        "description": "Collect the collector's own logs."
                      },
                      "metrics_cluster": {
                        "type": "boolean",
                        "description": "Collect Kubernetes object state metrics, such as pods, workloads, nodes and volumes."
                      },
                      "metrics_databases": {
                        "type": "boolean",
                        "description": "Always the same as `metrics_cluster`. Send `metrics_cluster` instead.",
                        "readOnly": true
                      },
                      "metrics_other_databases": {
                        "type": "boolean",
                        "description": "Collect Redis, MongoDB, Memcached and Kafka metrics."
                      },
                      "metrics_host_os": {
                        "type": "boolean",
                        "description": "Collect CPU, memory, disk, filesystem and network metrics of the host."
                      },
                      "metrics_postgres": {
                        "type": "boolean",
                        "description": "Collect PostgreSQL metrics."
                      },
                      "metrics_mysql": {
                        "type": "boolean",
                        "description": "Collect MySQL metrics."
                      },
                      "metrics_elasticsearch": {
                        "type": "boolean",
                        "description": "Collect Elasticsearch metrics."
                      },
                      "metrics_pgbouncer": {
                        "type": "boolean",
                        "description": "Collect PgBouncer metrics."
                      },
                      "metrics_nginx": {
                        "type": "boolean",
                        "description": "Collect Nginx metrics."
                      },
                      "metrics_apache": {
                        "type": "boolean",
                        "description": "Collect Apache metrics."
                      },
                      "metrics_traefik": {
                        "type": "boolean",
                        "description": "Collect Traefik metrics."
                      },
                      "ebpf_metrics": {
                        "type": "boolean",
                        "description": "Collect host metrics with eBPF."
                      },
                      "ebpf_tracing_basic": {
                        "type": "boolean",
                        "description": "Basic distributed tracing with eBPF."
                      },
                      "ebpf_tracing_full": {
                        "type": "boolean",
                        "description": "Full distributed tracing with eBPF."
                      },
                      "ebpf_java_agent": {
                        "type": "boolean",
                        "description": "Trace Java services with eBPF."
                      },
                      "traces_opentelemetry": {
                        "type": "boolean",
                        "description": "Accept OpenTelemetry traces from your SDKs over OTLP."
                      },
                      "ebpf_red_metrics": {
                        "type": "boolean",
                        "description": "Service map and request rate, error and duration metrics with eBPF."
                      },
                      "metrics_process_statistics": {
                        "type": "boolean",
                        "description": "Collect the host's process and thread counts. Counting them can use significant CPU on a host that runs very many processes."
                      }
                    },
                    "description": "Which components the collector runs, each `true` or `false`."
                  },
                  "logs_sample_rate": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Percentage of logs to keep, from 0 to 100. Defaults to 100."
                  },
                  "traces_sample_rate": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Percentage of traces to keep, from 0 to 100. Defaults to 100, and 0 drops every trace."
                  },
                  "merge_logs": {
                    "type": "boolean",
                    "description": "Whether the collector merges lines that continue a log entry, such as a stack trace, into the entry before them."
                  },
                  "merge_logs_config": {
                    "type": "string",
                    "description": "The VRL condition `merge_logs` uses to tell whether a line starts a new log entry. Any other line joins the entry before it."
                  },
                  "disk_batch_size_mb": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Size of the collector's disk buffer in MB, shown as **Batching on disk** in the web app. Defaults to 3000 and can't be less than 256."
                  },
                  "memory_batch_size_mb": {
                    "type": "integer",
                    "format": "int64",
                    "description": "How much data the collector batches in memory before sending it, in MB, shown as **Batching in memory** in the web app. Defaults to 20."
                  },
                  "buffer_max_events": {
                    "type": "integer",
                    "format": "int64",
                    "description": "How many events the collector's memory buffer holds before it moves them to disk. Defaults to 10000."
                  },
                  "when_full": {
                    "type": "string",
                    "description": "What the collector does when its disk buffer is full, `drop_newest` to drop new events or `block` to wait until there's room."
                  },
                  "log_line_length_limit_kb": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Maximum log line length in kB, from 4 to 128. Longer lines are dropped. Defaults to 8."
                  },
                  "namespaces_options": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "log_sampling": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Percentage of the namespace's logs to keep, from 0 to 100."
                        },
                        "ingest_traces": {
                          "type": "boolean",
                          "description": "Whether to ingest the namespace's traces."
                        }
                      }
                    },
                    "description": "Options per namespace, keyed by namespace name. Sending a map replaces the existing options, and an empty map clears them."
                  },
                  "services_options": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "log_sampling": {
                          "type": "integer",
                          "format": "int64",
                          "description": "Percentage of the service's logs to keep, from 0 to 100."
                        },
                        "ingest_traces": {
                          "type": "boolean",
                          "description": "Whether to ingest the service's traces."
                        }
                      }
                    },
                    "description": "Options per service, keyed by service name. Sending a map replaces the existing options, and an empty map clears them."
                  }
                },
                "description": "The collector's components, sampling rates, batching and buffering. An update changes only the components you send.",
                "examples": [
                  {
                    "components": {
                      "logs_kubernetes": true,
                      "metrics_cluster": true,
                      "ebpf_metrics": true,
                      "traces_opentelemetry": true
                    },
                    "logs_sample_rate": 100,
                    "traces_sample_rate": 100,
                    "merge_logs": false,
                    "disk_batch_size_mb": 512,
                    "memory_batch_size_mb": 20,
                    "when_full": "block",
                    "log_line_length_limit_kb": 8,
                    "namespaces_options": {
                      "kube-system": {
                        "log_sampling": 0,
                        "ingest_traces": false
                      }
                    },
                    "services_options": {
                      "api-service": {
                        "log_sampling": 100
                      }
                    }
                  }
                ]
              },
              "custom_bucket": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The bucket's name, taken from `endpoint`.",
                    "readOnly": true
                  },
                  "endpoint": {
                    "type": "string",
                    "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
                  },
                  "access_key_id": {
                    "type": "string",
                    "description": "The access key ID Better Stack uses to write to the bucket."
                  },
                  "secret_access_key": {
                    "type": "string",
                    "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
                  },
                  "keep_data_after_retention": {
                    "type": "boolean",
                    "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
                  }
                },
                "description": "Your own S3-compatible bucket to archive data in, or `null` when the collector uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). Set it on create. To rotate the key pair, update only `access_key_id` and `secret_access_key`.",
                "examples": [
                  {
                    "name": "my-logs-bucket",
                    "endpoint": "https://s3.us-east-1.amazonaws.com/my-logs-bucket",
                    "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                    "keep_data_after_retention": false
                  }
                ]
              },
              "connected_source_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "IDs of the sources connected to the collector's source, so you can correlate their logs and traces. Connections go both ways. The collector's source is connected to each listed source and to every source those are already connected to. Sending a list adds connections without removing any. Send `[]` to disconnect the collector's source from all of them.",
                "examples": [
                  [
                    "12346"
                  ]
                ]
              },
              "service_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name_key": {
                      "type": "string",
                      "description": "The field to extract the service name from, such as `service.name`."
                    },
                    "type_key": {
                      "type": "string",
                      "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                    }
                  }
                },
                "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. The list replaces the existing one, and `[]` removes them all.",
                "examples": [
                  [
                    {
                      "name_key": "service.name",
                      "type_key": "service.type"
                    }
                  ]
                ]
              },
              "secret": {
                "type": "string",
                "description": "Secret the deployed collector authenticates with. Returned in every response.",
                "x-sensitive": true,
                "readOnly": true,
                "examples": [
                  "s3cr3t-placeholder"
                ]
              },
              "status": {
                "type": "string",
                "description": "The collector's status, worked out from its hosts, one of `pending`, `up`, `degraded`, `unknown`, `partially_up`, `unsupported_version` or `down`.",
                "readOnly": true,
                "examples": [
                  "up"
                ]
              },
              "source_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ID of the source the collector sends data to.",
                "readOnly": true,
                "examples": [
                  "9876"
                ]
              },
              "installation_guide_url": {
                "type": "string",
                "description": "Link to the installation guide for the collector's platform, with the install command that uses its `secret`.",
                "readOnly": true,
                "examples": [
                  "https://betterstack.com/docs/logs/collector/docker/?collector=123#install-via-docker"
                ]
              },
              "pinged_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When a host of the collector last checked in, or `null` when no host has checked in yet.",
                "readOnly": true,
                "examples": [
                  "2023-10-27T10:00:00.000Z"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the collector was created.",
                "readOnly": true,
                "examples": [
                  "2023-10-26T10:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the collector was last updated.",
                "readOnly": true,
                "examples": [
                  "2023-10-27T09:30:00.000Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the collector, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the collector.",
                "readOnly": true,
                "examples": [
                  "My Team"
                ]
              }
            }
          }
        }
      },
      "CollectorCreate": {
        "$ref": "#/components/schemas/CollectorCreateAttributes"
      },
      "CollectorCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Collector name.",
            "examples": [
              "Production Kubernetes"
            ]
          },
          "platform": {
            "type": "string",
            "enum": [
              "docker",
              "swarm",
              "kubernetes"
            ],
            "description": "Where the collector runs. Can't be changed after the collector is created.",
            "examples": [
              "kubernetes"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "A note about the collector. Send `null` to clear it.",
            "examples": [
              "Main cluster for production services."
            ]
          },
          "data_region": {
            "type": "string",
            "description": "The data region, `europe`, `us`, `singapore` or a dedicated cluster's name from [List data regions](/docs/logs/api/data-regions/). Returned as that name. Can't be changed after the collector is created. Defaults to the organization's default data region.",
            "examples": [
              "europe"
            ]
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days logs are kept, one of the retention periods your plan offers.",
            "examples": [
              30
            ]
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days metrics are kept, one of the retention periods your plan offers.",
            "examples": [
              90
            ]
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this collector.",
            "default": false,
            "examples": [
              false
            ]
          },
          "collector_logs_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program the collector runs on each log line on your hardware, before sending it to Better Stack. Send `null` to remove it.",
            "examples": [
              ".message = downcase!(.message)"
            ]
          },
          "collector_metrics_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program the collector runs on each metric on your hardware, before sending it to Better Stack. Send `null` to remove it.",
            "examples": [
              "del(.tags.pod_uid)"
            ]
          },
          "collector_traces_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program the collector runs on each span on your hardware, before sending it to Better Stack. Send `null` to remove it.",
            "examples": [
              ".service = \"checkout\""
            ]
          },
          "ingestion_logs_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line from the collector as it's ingested. Send `null` to remove it.",
            "examples": [
              ".environment = \"production\""
            ]
          },
          "ingestion_traces_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span from the collector as it's ingested. Send `null` to remove it.",
            "examples": [
              ".name = downcase!(.name)"
            ]
          },
          "source_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source group the collector's source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/).",
            "examples": [
              "543"
            ]
          },
          "live_tail_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the collector's source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the collector's source doesn't receive logs.",
            "examples": [
              "{level} {message}"
            ]
          },
          "live_tail_pattern_spans": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the collector's source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the collector's source doesn't receive spans.",
            "examples": [
              "{span.name} {duration}"
            ]
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
            "default": [],
            "examples": [
              [
                "go_gc_duration_seconds",
                "go_memstats_heap_idle_bytes"
              ]
            ]
          },
          "user_vector_config": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own Vector configuration in YAML, merged into the configuration the collector runs with.",
            "examples": [
              "sources:\n  custom_input:\n    type: file\n    include:\n      - /var/log/custom.log"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "components": {
                "type": "object",
                "properties": {
                  "logs_host": {
                    "type": "boolean",
                    "description": "Collect logs from the host's /var/log directory."
                  },
                  "logs_docker": {
                    "type": "boolean",
                    "description": "Collect logs of Docker containers that use the default json-file logging driver."
                  },
                  "logs_kubernetes": {
                    "type": "boolean",
                    "description": "Collect Kubernetes container logs and events."
                  },
                  "logs_collector_internals": {
                    "type": "boolean",
                    "description": "Collect the collector's own logs."
                  },
                  "metrics_cluster": {
                    "type": "boolean",
                    "description": "Collect Kubernetes object state metrics, such as pods, workloads, nodes and volumes."
                  },
                  "metrics_databases": {
                    "type": "boolean",
                    "description": "Always the same as `metrics_cluster`. Send `metrics_cluster` instead.",
                    "readOnly": true
                  },
                  "metrics_other_databases": {
                    "type": "boolean",
                    "description": "Collect Redis, MongoDB, Memcached and Kafka metrics."
                  },
                  "metrics_host_os": {
                    "type": "boolean",
                    "description": "Collect CPU, memory, disk, filesystem and network metrics of the host."
                  },
                  "metrics_postgres": {
                    "type": "boolean",
                    "description": "Collect PostgreSQL metrics."
                  },
                  "metrics_mysql": {
                    "type": "boolean",
                    "description": "Collect MySQL metrics."
                  },
                  "metrics_elasticsearch": {
                    "type": "boolean",
                    "description": "Collect Elasticsearch metrics."
                  },
                  "metrics_pgbouncer": {
                    "type": "boolean",
                    "description": "Collect PgBouncer metrics."
                  },
                  "metrics_nginx": {
                    "type": "boolean",
                    "description": "Collect Nginx metrics."
                  },
                  "metrics_apache": {
                    "type": "boolean",
                    "description": "Collect Apache metrics."
                  },
                  "metrics_traefik": {
                    "type": "boolean",
                    "description": "Collect Traefik metrics."
                  },
                  "ebpf_metrics": {
                    "type": "boolean",
                    "description": "Collect host metrics with eBPF."
                  },
                  "ebpf_tracing_basic": {
                    "type": "boolean",
                    "description": "Basic distributed tracing with eBPF."
                  },
                  "ebpf_tracing_full": {
                    "type": "boolean",
                    "description": "Full distributed tracing with eBPF."
                  },
                  "ebpf_java_agent": {
                    "type": "boolean",
                    "description": "Trace Java services with eBPF."
                  },
                  "traces_opentelemetry": {
                    "type": "boolean",
                    "description": "Accept OpenTelemetry traces from your SDKs over OTLP."
                  },
                  "ebpf_red_metrics": {
                    "type": "boolean",
                    "description": "Service map and request rate, error and duration metrics with eBPF."
                  },
                  "metrics_process_statistics": {
                    "type": "boolean",
                    "description": "Collect the host's process and thread counts. Counting them can use significant CPU on a host that runs very many processes."
                  }
                },
                "description": "Which components the collector runs, each `true` or `false`."
              },
              "logs_sample_rate": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of logs to keep, from 0 to 100. Defaults to 100."
              },
              "traces_sample_rate": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of traces to keep, from 0 to 100. Defaults to 100, and 0 drops every trace."
              },
              "merge_logs": {
                "type": "boolean",
                "description": "Whether the collector merges lines that continue a log entry, such as a stack trace, into the entry before them."
              },
              "merge_logs_config": {
                "type": "string",
                "description": "The VRL condition `merge_logs` uses to tell whether a line starts a new log entry. Any other line joins the entry before it."
              },
              "disk_batch_size_mb": {
                "type": "integer",
                "format": "int64",
                "description": "Size of the collector's disk buffer in MB, shown as **Batching on disk** in the web app. Defaults to 3000 and can't be less than 256."
              },
              "memory_batch_size_mb": {
                "type": "integer",
                "format": "int64",
                "description": "How much data the collector batches in memory before sending it, in MB, shown as **Batching in memory** in the web app. Defaults to 20."
              },
              "buffer_max_events": {
                "type": "integer",
                "format": "int64",
                "description": "How many events the collector's memory buffer holds before it moves them to disk. Defaults to 10000."
              },
              "when_full": {
                "type": "string",
                "description": "What the collector does when its disk buffer is full, `drop_newest` to drop new events or `block` to wait until there's room."
              },
              "log_line_length_limit_kb": {
                "type": "integer",
                "format": "int64",
                "description": "Maximum log line length in kB, from 4 to 128. Longer lines are dropped. Defaults to 8."
              },
              "namespaces_options": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "log_sampling": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Percentage of the namespace's logs to keep, from 0 to 100."
                    },
                    "ingest_traces": {
                      "type": "boolean",
                      "description": "Whether to ingest the namespace's traces."
                    }
                  }
                },
                "description": "Options per namespace, keyed by namespace name. Sending a map replaces the existing options, and an empty map clears them."
              },
              "services_options": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "log_sampling": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Percentage of the service's logs to keep, from 0 to 100."
                    },
                    "ingest_traces": {
                      "type": "boolean",
                      "description": "Whether to ingest the service's traces."
                    }
                  }
                },
                "description": "Options per service, keyed by service name. Sending a map replaces the existing options, and an empty map clears them."
              }
            },
            "description": "The collector's components, sampling rates, batching and buffering. An update changes only the components you send.",
            "examples": [
              {
                "components": {
                  "logs_kubernetes": true,
                  "metrics_cluster": true,
                  "ebpf_metrics": true,
                  "traces_opentelemetry": true
                },
                "logs_sample_rate": 100,
                "traces_sample_rate": 100,
                "merge_logs": false,
                "disk_batch_size_mb": 512,
                "memory_batch_size_mb": 20,
                "when_full": "block",
                "log_line_length_limit_kb": 8,
                "namespaces_options": {
                  "kube-system": {
                    "log_sampling": 0,
                    "ingest_traces": false
                  }
                },
                "services_options": {
                  "api-service": {
                    "log_sampling": 100
                  }
                }
              }
            ]
          },
          "custom_bucket": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The bucket's name, taken from `endpoint`.",
                "readOnly": true
              },
              "endpoint": {
                "type": "string",
                "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
              },
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              },
              "keep_data_after_retention": {
                "type": "boolean",
                "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
              }
            },
            "description": "Your own S3-compatible bucket to archive data in, or `null` when the collector uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). Set it on create. To rotate the key pair, update only `access_key_id` and `secret_access_key`.",
            "examples": [
              {
                "name": "my-logs-bucket",
                "endpoint": "https://s3.us-east-1.amazonaws.com/my-logs-bucket",
                "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                "secret_access_key": "s3cr3t-placeholder",
                "keep_data_after_retention": false
              }
            ]
          }
        },
        "required": [
          "name",
          "platform"
        ]
      },
      "CollectorDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Collector"
          }
        }
      },
      "CollectorList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Collector"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "CollectorTarget": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The collector_target's id."
          },
          "type": {
            "type": "string",
            "const": "collector_target"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "postgres",
                  "pgbouncer",
                  "mysql",
                  "redis",
                  "mongodb",
                  "memcached",
                  "elasticsearch",
                  "nginx",
                  "apache",
                  "kafka",
                  "prometheus",
                  "traefik"
                ],
                "description": "Target type. Responses can also hold `pgcat`, `node_exporter` and `kube_state_metrics`, targets the collector finds by itself. You can't create those.",
                "examples": [
                  "postgres"
                ]
              },
              "host": {
                "type": "string",
                "description": "Target host. For a process target such as `nginx` or `prometheus`, the host the collector runs on.",
                "examples": [
                  "db.example.com"
                ]
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether the collector scrapes this target. A new target is enabled unless it's set to `false`. Disabling it sets `status` to `disabled`, and enabling it again checks the target again.",
                "default": true,
                "examples": [
                  true
                ]
              },
              "port": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "The target's port. `null` when a target is found by its `listen_ip` or `service` instead.",
                "examples": [
                  5432
                ]
              },
              "service": {
                "type": "string",
                "description": "The service name. Required for `nginx`, `apache`, `kafka`, `prometheus` and `traefik` targets, and accepted and returned only for those.",
                "examples": [
                  "edge-nginx"
                ]
              },
              "listen_ip": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The IP address the process listens on. Accepted and returned only for `nginx`, `apache`, `kafka` and `traefik`, and `null` when not set.",
                "examples": [
                  "10.0.0.1"
                ]
              },
              "endpoint": {
                "type": "string",
                "description": "The full scrape URL, like `http://10.0.0.5:9090/metrics`. Required for `prometheus` targets and returned only for them.",
                "examples": [
                  "http://10.0.0.5:9090/metrics"
                ]
              },
              "scheme": {
                "type": "string",
                "enum": [
                  "http",
                  "https"
                ],
                "description": "The connection scheme. Accepted and returned only for `elasticsearch`.",
                "examples": [
                  "https"
                ]
              },
              "username": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The username used to connect, or `null` when not set. Accepted and returned only for `postgres`, `pgbouncer`, `mysql`, `redis`, `mongodb`, `memcached` and `elasticsearch`.",
                "examples": [
                  "monitor"
                ]
              },
              "ssl_mode": {
                "type": "string",
                "enum": [
                  "disable",
                  "require",
                  "verify-ca"
                ],
                "description": "The SSL mode for the connection. Required for `postgres` and `pgbouncer`, and accepted and returned only for those.",
                "x-enum-descriptions": {
                  "disable": "Connects without SSL.",
                  "require": "Connects over SSL without verifying the server's certificate.",
                  "verify-ca": "Connects over SSL and checks that a trusted certificate authority signed the server's certificate."
                },
                "examples": [
                  "require"
                ]
              },
              "tls": {
                "type": "string",
                "enum": [
                  "false",
                  "true",
                  "skip-verify",
                  "preferred"
                ],
                "description": "The TLS mode for the connection. Required for `mysql`, and accepted and returned only for it.",
                "x-enum-descriptions": {
                  "false": "Connects without TLS.",
                  "true": "Connects over TLS and verifies the server's certificate.",
                  "skip-verify": "Connects over TLS without verifying the server's certificate.",
                  "preferred": "Uses TLS when the server supports it, without verifying the server's certificate."
                },
                "examples": [
                  "preferred"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "up",
                  "unreachable",
                  "down",
                  "invalid_credentials",
                  "configuration_required",
                  "disabled",
                  "removed"
                ],
                "description": "The connection status. An update that includes `host`, `port`, `service`, `listen_ip`, `endpoint`, `scheme`, `username`, `password`, `api_key`, `ssl_mode` or `tls` sets it back to `pending`.",
                "x-enum-descriptions": {
                  "pending": "The collector hasn't reported on the target yet.",
                  "up": "The collector collects metrics from the target.",
                  "unreachable": "The collector can't connect to the target or hasn't seen it lately.",
                  "down": "The collector reaches the target, but its check fails.",
                  "invalid_credentials": "The target rejects the credentials.",
                  "configuration_required": "Metrics are collected, but the database needs more setup, such as the `pg_stat_statements` extension.",
                  "disabled": "The target is paused and the collector doesn't check it.",
                  "removed": "The collector no longer finds the target."
                },
                "readOnly": true,
                "examples": [
                  "up"
                ]
              },
              "container": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Detected container.",
                "readOnly": true,
                "examples": [
                  "postgres"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the target was created.",
                "readOnly": true,
                "examples": [
                  "2025-06-01T12:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the target was last updated.",
                "readOnly": true,
                "examples": [
                  "2025-06-15T14:32:00.000Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the collector's source, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "postgres",
                          "pgbouncer",
                          "mysql",
                          "redis",
                          "mongodb",
                          "memcached",
                          "elasticsearch",
                          "nginx",
                          "apache",
                          "kafka",
                          "traefik"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "port": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "nginx",
                          "apache",
                          "kafka",
                          "prometheus",
                          "traefik"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "service": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "nginx",
                          "apache",
                          "kafka",
                          "traefik"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "listen_ip": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "prometheus"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "endpoint": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "elasticsearch"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "scheme": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "postgres",
                          "pgbouncer",
                          "mysql",
                          "redis",
                          "mongodb",
                          "memcached",
                          "elasticsearch"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "username": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "postgres",
                          "pgbouncer"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "ssl_mode": false
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "not": {
                        "enum": [
                          "mysql"
                        ]
                      }
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "tls": false
                  }
                }
              }
            ]
          }
        }
      },
      "CollectorTargetCreate": {
        "$ref": "#/components/schemas/CollectorTargetCreateAttributes"
      },
      "CollectorTargetCreateAttributes": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "postgres",
              "pgbouncer",
              "mysql",
              "redis",
              "mongodb",
              "memcached",
              "elasticsearch",
              "nginx",
              "apache",
              "kafka",
              "prometheus",
              "traefik"
            ],
            "description": "Target type. Responses can also hold `pgcat`, `node_exporter` and `kube_state_metrics`, targets the collector finds by itself. You can't create those. Can't be changed after the target is created.",
            "examples": [
              "postgres"
            ]
          },
          "host": {
            "type": "string",
            "description": "Target host. For a process target such as `nginx` or `prometheus`, the host the collector runs on.",
            "examples": [
              "db.example.com"
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the collector scrapes this target. A new target is enabled unless it's set to `false`. Disabling it sets `status` to `disabled`, and enabling it again checks the target again.",
            "default": true,
            "examples": [
              true
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The target's port. `null` when a target is found by its `listen_ip` or `service` instead. Required for database kinds and accepted for `nginx`, `apache`, `kafka` and `traefik`.",
            "examples": [
              5432
            ]
          },
          "service": {
            "type": "string",
            "description": "The service name. Required for `nginx`, `apache`, `kafka`, `prometheus` and `traefik` targets, and accepted and returned only for those.",
            "examples": [
              "edge-nginx"
            ]
          },
          "listen_ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "The IP address the process listens on. Accepted and returned only for `nginx`, `apache`, `kafka` and `traefik`, and `null` when not set.",
            "examples": [
              "10.0.0.1"
            ]
          },
          "endpoint": {
            "type": "string",
            "description": "The full scrape URL, like `http://10.0.0.5:9090/metrics`. Required for `prometheus` targets and returned only for them.",
            "examples": [
              "http://10.0.0.5:9090/metrics"
            ]
          },
          "scheme": {
            "type": "string",
            "enum": [
              "http",
              "https"
            ],
            "description": "The connection scheme. Accepted and returned only for `elasticsearch`. Defaults to `http`.",
            "examples": [
              "https"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ],
            "description": "The username used to connect, or `null` when not set. Accepted and returned only for `postgres`, `pgbouncer`, `mysql`, `redis`, `mongodb`, `memcached` and `elasticsearch`.",
            "examples": [
              "monitor"
            ]
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "Password for database and `elasticsearch` targets.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "s3cr3t-placeholder"
            ]
          },
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for `elasticsearch` targets.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "s3cr3t-placeholder"
            ]
          },
          "ssl_mode": {
            "type": "string",
            "enum": [
              "disable",
              "require",
              "verify-ca"
            ],
            "description": "The SSL mode for the connection. Required for `postgres` and `pgbouncer`, and accepted and returned only for those.",
            "x-enum-descriptions": {
              "disable": "Connects without SSL.",
              "require": "Connects over SSL without verifying the server's certificate.",
              "verify-ca": "Connects over SSL and checks that a trusted certificate authority signed the server's certificate."
            },
            "examples": [
              "require"
            ]
          },
          "tls": {
            "type": "string",
            "enum": [
              "false",
              "true",
              "skip-verify",
              "preferred"
            ],
            "description": "The TLS mode for the connection. Required for `mysql`, and accepted and returned only for it.",
            "x-enum-descriptions": {
              "false": "Connects without TLS.",
              "true": "Connects over TLS and verifies the server's certificate.",
              "skip-verify": "Connects over TLS without verifying the server's certificate.",
              "preferred": "Uses TLS when the server supports it, without verifying the server's certificate."
            },
            "examples": [
              "preferred"
            ]
          }
        },
        "required": [
          "kind",
          "host"
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "postgres",
                      "pgbouncer",
                      "mysql",
                      "redis",
                      "mongodb",
                      "memcached",
                      "elasticsearch",
                      "nginx",
                      "apache",
                      "kafka",
                      "traefik"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "port": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "nginx",
                      "apache",
                      "kafka",
                      "prometheus",
                      "traefik"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "service": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "nginx",
                      "apache",
                      "kafka",
                      "traefik"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "listen_ip": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "prometheus"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "endpoint": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "elasticsearch"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "scheme": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "postgres",
                      "pgbouncer",
                      "mysql",
                      "redis",
                      "mongodb",
                      "memcached",
                      "elasticsearch"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "username": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "postgres",
                      "pgbouncer"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "ssl_mode": false
              }
            }
          },
          {
            "if": {
              "properties": {
                "kind": {
                  "not": {
                    "enum": [
                      "mysql"
                    ]
                  }
                }
              },
              "required": [
                "kind"
              ]
            },
            "then": {
              "properties": {
                "tls": false
              }
            }
          }
        ]
      },
      "CollectorTargetDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CollectorTarget"
          }
        }
      },
      "CollectorTargetList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CollectorTarget"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "CollectorTargetUpdate": {
        "$ref": "#/components/schemas/CollectorTargetUpdateAttributes"
      },
      "CollectorTargetUpdateAttributes": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "description": "Target host. For a process target such as `nginx` or `prometheus`, the host the collector runs on.",
            "examples": [
              "db.example.com"
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the collector scrapes this target. A new target is enabled unless it's set to `false`. Disabling it sets `status` to `disabled`, and enabling it again checks the target again.",
            "default": true,
            "examples": [
              true
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "The target's port. `null` when a target is found by its `listen_ip` or `service` instead. Required for database kinds and accepted for `nginx`, `apache`, `kafka` and `traefik`.",
            "examples": [
              5432
            ]
          },
          "service": {
            "type": "string",
            "description": "The service name. Required for `nginx`, `apache`, `kafka`, `prometheus` and `traefik` targets, and accepted and returned only for those.",
            "examples": [
              "edge-nginx"
            ]
          },
          "listen_ip": {
            "type": [
              "string",
              "null"
            ],
            "description": "The IP address the process listens on. Accepted and returned only for `nginx`, `apache`, `kafka` and `traefik`, and `null` when not set.",
            "examples": [
              "10.0.0.1"
            ]
          },
          "endpoint": {
            "type": "string",
            "description": "The full scrape URL, like `http://10.0.0.5:9090/metrics`. Required for `prometheus` targets and returned only for them.",
            "examples": [
              "http://10.0.0.5:9090/metrics"
            ]
          },
          "scheme": {
            "type": "string",
            "enum": [
              "http",
              "https"
            ],
            "description": "The connection scheme. Accepted and returned only for `elasticsearch`. Defaults to `http`.",
            "examples": [
              "https"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ],
            "description": "The username used to connect, or `null` when not set. Accepted and returned only for `postgres`, `pgbouncer`, `mysql`, `redis`, `mongodb`, `memcached` and `elasticsearch`.",
            "examples": [
              "monitor"
            ]
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "description": "Password for database and `elasticsearch` targets.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "s3cr3t-placeholder"
            ]
          },
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key for `elasticsearch` targets.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "s3cr3t-placeholder"
            ]
          },
          "ssl_mode": {
            "type": "string",
            "enum": [
              "disable",
              "require",
              "verify-ca"
            ],
            "description": "The SSL mode for the connection. Required for `postgres` and `pgbouncer`, and accepted and returned only for those.",
            "x-enum-descriptions": {
              "disable": "Connects without SSL.",
              "require": "Connects over SSL without verifying the server's certificate.",
              "verify-ca": "Connects over SSL and checks that a trusted certificate authority signed the server's certificate."
            },
            "examples": [
              "require"
            ]
          },
          "tls": {
            "type": "string",
            "enum": [
              "false",
              "true",
              "skip-verify",
              "preferred"
            ],
            "description": "The TLS mode for the connection. Required for `mysql`, and accepted and returned only for it.",
            "x-enum-descriptions": {
              "false": "Connects without TLS.",
              "true": "Connects over TLS and verifies the server's certificate.",
              "skip-verify": "Connects over TLS without verifying the server's certificate.",
              "preferred": "Uses TLS when the server supports it, without verifying the server's certificate."
            },
            "examples": [
              "preferred"
            ]
          }
        }
      },
      "CollectorUpdate": {
        "$ref": "#/components/schemas/CollectorUpdateAttributes"
      },
      "CollectorUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Collector name.",
            "examples": [
              "Production Kubernetes"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "A note about the collector. Send `null` to clear it.",
            "examples": [
              "Main cluster for production services."
            ]
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days logs are kept, one of the retention periods your plan offers.",
            "examples": [
              30
            ]
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days metrics are kept, one of the retention periods your plan offers.",
            "examples": [
              90
            ]
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this collector.",
            "default": false,
            "examples": [
              false
            ]
          },
          "collector_logs_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program the collector runs on each log line on your hardware, before sending it to Better Stack. Send `null` to remove it.",
            "examples": [
              ".message = downcase!(.message)"
            ]
          },
          "collector_metrics_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program the collector runs on each metric on your hardware, before sending it to Better Stack. Send `null` to remove it.",
            "examples": [
              "del(.tags.pod_uid)"
            ]
          },
          "collector_traces_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program the collector runs on each span on your hardware, before sending it to Better Stack. Send `null` to remove it.",
            "examples": [
              ".service = \"checkout\""
            ]
          },
          "ingestion_logs_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line from the collector as it's ingested. Send `null` to remove it.",
            "examples": [
              ".environment = \"production\""
            ]
          },
          "ingestion_traces_transformation": {
            "type": [
              "string",
              "null"
            ],
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span from the collector as it's ingested. Send `null` to remove it.",
            "examples": [
              ".name = downcase!(.name)"
            ]
          },
          "source_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source group the collector's source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/). On update, `\"0\"` also removes it from its group.",
            "examples": [
              "543"
            ]
          },
          "live_tail_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the collector's source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the collector's source doesn't receive logs.",
            "examples": [
              "{level} {message}"
            ]
          },
          "live_tail_pattern_spans": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the collector's source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the collector's source doesn't receive spans.",
            "examples": [
              "{span.name} {duration}"
            ]
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
            "default": [],
            "examples": [
              [
                "go_gc_duration_seconds",
                "go_memstats_heap_idle_bytes"
              ]
            ]
          },
          "user_vector_config": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own Vector configuration in YAML, merged into the configuration the collector runs with.",
            "examples": [
              "sources:\n  custom_input:\n    type: file\n    include:\n      - /var/log/custom.log"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "components": {
                "type": "object",
                "properties": {
                  "logs_host": {
                    "type": "boolean",
                    "description": "Collect logs from the host's /var/log directory."
                  },
                  "logs_docker": {
                    "type": "boolean",
                    "description": "Collect logs of Docker containers that use the default json-file logging driver."
                  },
                  "logs_kubernetes": {
                    "type": "boolean",
                    "description": "Collect Kubernetes container logs and events."
                  },
                  "logs_collector_internals": {
                    "type": "boolean",
                    "description": "Collect the collector's own logs."
                  },
                  "metrics_cluster": {
                    "type": "boolean",
                    "description": "Collect Kubernetes object state metrics, such as pods, workloads, nodes and volumes."
                  },
                  "metrics_databases": {
                    "type": "boolean",
                    "description": "Always the same as `metrics_cluster`. Send `metrics_cluster` instead.",
                    "readOnly": true
                  },
                  "metrics_other_databases": {
                    "type": "boolean",
                    "description": "Collect Redis, MongoDB, Memcached and Kafka metrics."
                  },
                  "metrics_host_os": {
                    "type": "boolean",
                    "description": "Collect CPU, memory, disk, filesystem and network metrics of the host."
                  },
                  "metrics_postgres": {
                    "type": "boolean",
                    "description": "Collect PostgreSQL metrics."
                  },
                  "metrics_mysql": {
                    "type": "boolean",
                    "description": "Collect MySQL metrics."
                  },
                  "metrics_elasticsearch": {
                    "type": "boolean",
                    "description": "Collect Elasticsearch metrics."
                  },
                  "metrics_pgbouncer": {
                    "type": "boolean",
                    "description": "Collect PgBouncer metrics."
                  },
                  "metrics_nginx": {
                    "type": "boolean",
                    "description": "Collect Nginx metrics."
                  },
                  "metrics_apache": {
                    "type": "boolean",
                    "description": "Collect Apache metrics."
                  },
                  "metrics_traefik": {
                    "type": "boolean",
                    "description": "Collect Traefik metrics."
                  },
                  "ebpf_metrics": {
                    "type": "boolean",
                    "description": "Collect host metrics with eBPF."
                  },
                  "ebpf_tracing_basic": {
                    "type": "boolean",
                    "description": "Basic distributed tracing with eBPF."
                  },
                  "ebpf_tracing_full": {
                    "type": "boolean",
                    "description": "Full distributed tracing with eBPF."
                  },
                  "ebpf_java_agent": {
                    "type": "boolean",
                    "description": "Trace Java services with eBPF."
                  },
                  "traces_opentelemetry": {
                    "type": "boolean",
                    "description": "Accept OpenTelemetry traces from your SDKs over OTLP."
                  },
                  "ebpf_red_metrics": {
                    "type": "boolean",
                    "description": "Service map and request rate, error and duration metrics with eBPF."
                  },
                  "metrics_process_statistics": {
                    "type": "boolean",
                    "description": "Collect the host's process and thread counts. Counting them can use significant CPU on a host that runs very many processes."
                  }
                },
                "description": "Which components the collector runs, each `true` or `false`."
              },
              "logs_sample_rate": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of logs to keep, from 0 to 100. Defaults to 100."
              },
              "traces_sample_rate": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of traces to keep, from 0 to 100. Defaults to 100, and 0 drops every trace."
              },
              "merge_logs": {
                "type": "boolean",
                "description": "Whether the collector merges lines that continue a log entry, such as a stack trace, into the entry before them."
              },
              "merge_logs_config": {
                "type": "string",
                "description": "The VRL condition `merge_logs` uses to tell whether a line starts a new log entry. Any other line joins the entry before it."
              },
              "disk_batch_size_mb": {
                "type": "integer",
                "format": "int64",
                "description": "Size of the collector's disk buffer in MB, shown as **Batching on disk** in the web app. Defaults to 3000 and can't be less than 256."
              },
              "memory_batch_size_mb": {
                "type": "integer",
                "format": "int64",
                "description": "How much data the collector batches in memory before sending it, in MB, shown as **Batching in memory** in the web app. Defaults to 20."
              },
              "buffer_max_events": {
                "type": "integer",
                "format": "int64",
                "description": "How many events the collector's memory buffer holds before it moves them to disk. Defaults to 10000."
              },
              "when_full": {
                "type": "string",
                "description": "What the collector does when its disk buffer is full, `drop_newest` to drop new events or `block` to wait until there's room."
              },
              "log_line_length_limit_kb": {
                "type": "integer",
                "format": "int64",
                "description": "Maximum log line length in kB, from 4 to 128. Longer lines are dropped. Defaults to 8."
              },
              "namespaces_options": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "log_sampling": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Percentage of the namespace's logs to keep, from 0 to 100."
                    },
                    "ingest_traces": {
                      "type": "boolean",
                      "description": "Whether to ingest the namespace's traces."
                    }
                  }
                },
                "description": "Options per namespace, keyed by namespace name. Sending a map replaces the existing options, and an empty map clears them."
              },
              "services_options": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "log_sampling": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Percentage of the service's logs to keep, from 0 to 100."
                    },
                    "ingest_traces": {
                      "type": "boolean",
                      "description": "Whether to ingest the service's traces."
                    }
                  }
                },
                "description": "Options per service, keyed by service name. Sending a map replaces the existing options, and an empty map clears them."
              }
            },
            "description": "The collector's components, sampling rates, batching and buffering. An update changes only the components you send.",
            "examples": [
              {
                "components": {
                  "logs_kubernetes": true,
                  "metrics_cluster": true,
                  "ebpf_metrics": true,
                  "traces_opentelemetry": true
                },
                "logs_sample_rate": 100,
                "traces_sample_rate": 100,
                "merge_logs": false,
                "disk_batch_size_mb": 512,
                "memory_batch_size_mb": 20,
                "when_full": "block",
                "log_line_length_limit_kb": 8,
                "namespaces_options": {
                  "kube-system": {
                    "log_sampling": 0,
                    "ingest_traces": false
                  }
                },
                "services_options": {
                  "api-service": {
                    "log_sampling": 100
                  }
                }
              }
            ]
          },
          "custom_bucket": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              }
            },
            "description": "Your own S3-compatible bucket to archive data in, or `null` when the collector uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). Set it on create. To rotate the key pair, update only `access_key_id` and `secret_access_key`.",
            "examples": [
              {
                "name": "my-logs-bucket",
                "endpoint": "https://s3.us-east-1.amazonaws.com/my-logs-bucket",
                "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                "secret_access_key": "s3cr3t-placeholder",
                "keep_data_after_retention": false
              }
            ]
          },
          "connected_source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the sources connected to the collector's source, so you can correlate their logs and traces. Connections go both ways. The collector's source is connected to each listed source and to every source those are already connected to. Sending a list adds connections without removing any. Send `[]` to disconnect the collector's source from all of them.",
            "examples": [
              [
                "12346"
              ]
            ]
          },
          "service_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name_key": {
                  "type": "string",
                  "description": "The field to extract the service name from, such as `service.name`."
                },
                "type_key": {
                  "type": "string",
                  "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                }
              }
            },
            "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. The list replaces the existing one, and `[]` removes them all.",
            "examples": [
              [
                {
                  "name_key": "service.name",
                  "type_key": "service.type"
                }
              ]
            ]
          }
        }
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The connection's id."
          },
          "type": {
            "type": "string",
            "const": "connection"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The connection's ID, the same value as the top-level `id`.",
                "readOnly": true,
                "examples": [
                  "12345"
                ]
              },
              "client_type": {
                "type": "string",
                "enum": [
                  "clickhouse",
                  "grafana"
                ],
                "description": "Client protocol.",
                "examples": [
                  "clickhouse"
                ]
              },
              "cluster": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The one cluster the connection points at, by its name. [Get a source](/docs/logs/api/get-a-single-source/) returns the `cluster` its data is stored on.",
                "examples": [
                  "eu-nbg-2"
                ]
              },
              "clusters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The cluster's name."
                    },
                    "host": {
                      "type": "string",
                      "description": "Host to connect to the cluster on."
                    }
                  }
                },
                "description": "Every cluster the connection reaches.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "name": "eu-nbg-2",
                      "host": "eu-nbg-2-connect.betterstackdata.com"
                    }
                  ]
                ]
              },
              "team_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^t[1-9][0-9]*$"
                },
                "description": "Teams whose data this connection reaches, as `t`-prefixed team IDs such as `t123`. Get the IDs via [List teams](/docs/uptime/api/teams/list/).",
                "examples": [
                  [
                    "t1234"
                  ]
                ]
              },
              "team_names": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Names of the teams whose data this connection reaches.",
                "readOnly": true,
                "examples": [
                  [
                    "My Team"
                  ]
                ]
              },
              "ip_allowlist": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Allowed source IPs or CIDRs.",
                "default": [],
                "examples": [
                  [
                    "192.168.1.0/24",
                    "10.0.0.1"
                  ]
                ]
              },
              "valid_until": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the credential expires, or `null` if it never does.",
                "examples": [
                  "2025-12-02T00:00:00.000Z"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Free-form note.",
                "examples": [
                  "Production connection for analytics"
                ]
              },
              "host": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Connection host.",
                "readOnly": true,
                "examples": [
                  "eu-nbg-2-connect.betterstackdata.com"
                ]
              },
              "port": {
                "type": "integer",
                "format": "int64",
                "description": "Connection port.",
                "readOnly": true,
                "examples": [
                  443
                ]
              },
              "username": {
                "type": "string",
                "description": "The username to connect with.",
                "readOnly": true,
                "examples": [
                  "u5LJyB8U1UFmw4fRtXnu74Kh1G4Nfnh6s"
                ]
              },
              "password": {
                "type": "string",
                "description": "Connection password. Returned only when the connection is created and never again, so save it then.",
                "x-sensitive": true,
                "x-shown-once": true,
                "readOnly": true,
                "examples": [
                  "s3cr3t-placeholder"
                ]
              },
              "created_by": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^u[1-9][0-9]*$",
                    "description": "The creator's user ID, such as `u123`."
                  },
                  "email": {
                    "type": "string",
                    "description": "The creator's e-mail."
                  }
                },
                "description": "User who created the connection in the web UI. Always `null` for a connection created through the API or MCP.",
                "readOnly": true,
                "examples": [
                  {
                    "id": "u456789",
                    "email": "alice@example.com"
                  }
                ]
              },
              "sample_query": {
                "type": "string",
                "description": "An example `curl` query to get started. When you create the connection, the query includes the password. Later responses show `INSERT_PASSWORD` in its place. Not returned when listing connections.",
                "x-sensitive": true,
                "readOnly": true,
                "examples": [
                  "curl -u u5LJyB8U1UFmw4fRtXnu74Kh1G4Nfnh6s:INSERT_PASSWORD -H 'Content-type: plain/text' -X POST 'https://eu-nbg-2-connect.betterstackdata.com?output_format_pretty_row_numbers=0' -d \"SELECT query_collection || '_' || type AS named_collection, multiIf( type = 'logs', 'SELECT dt, raw FROM remote(' || query_collection || '_logs) LIMIT 10 UNION ALL SELECT dt, raw FROM s3Cluster(primary, ' || query_collection || '_s3) WHERE _row_type = 1 LIMIT 10', type = 'spans', 'SELECT dt, raw FROM remote(' || query_collection || '_spans) LIMIT 10 UNION ALL SELECT dt, raw FROM s3Cluster(primary, ' || query_collection || '_s3) WHERE _row_type = 3 LIMIT 10', type = 'metrics', 'SELECT toStartOfHour(dt) AS time, countMerge(events_count) FROM remote(' || query_collection || '_metrics) GROUP BY time ORDER BY time DESC LIMIT 10', null ) AS query_with FROM VALUES('query_collection String, type String', ('t1234_local_kubernetes', 'logs'), ('t1234_local_kubernetes', 'spans'), ('t1234_local_kubernetes', 'metrics')) ORDER BY named_collection FORMAT Pretty\""
                ]
              },
              "data_sources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source_id": {
                      "type": "string",
                      "description": "The source's ID."
                    },
                    "source_name": {
                      "type": "string",
                      "description": "The source's name."
                    },
                    "team_name": {
                      "type": "string",
                      "description": "The name of the team the source belongs to."
                    },
                    "connection_url": {
                      "type": "string",
                      "description": "The URL to connect to for this source's data."
                    },
                    "data_sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "ClickHouse collection names you can query for this source."
                    }
                  }
                },
                "description": "Sources this connection can query. Not returned when listing connections.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "source_id": "1234",
                      "source_name": "Local Kubernetes",
                      "team_name": "My Team",
                      "connection_url": "https://eu-nbg-2-connect.betterstackdata.com",
                      "data_sources": [
                        "remote(t1234_local_kubernetes_logs)",
                        "remote(t1234_local_kubernetes_metrics)",
                        "s3Cluster(primary, t1234_local_kubernetes_s3)"
                      ]
                    }
                  ]
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the connection was created.",
                "readOnly": true,
                "examples": [
                  "2025-05-23T13:16:31.419Z"
                ]
              }
            }
          }
        }
      },
      "ConnectionCreate": {
        "$ref": "#/components/schemas/ConnectionCreateAttributes"
      },
      "ConnectionCreateAttributes": {
        "type": "object",
        "properties": {
          "client_type": {
            "type": "string",
            "enum": [
              "clickhouse",
              "grafana"
            ],
            "description": "Client protocol.",
            "examples": [
              "clickhouse"
            ]
          },
          "cluster": {
            "type": [
              "string",
              "null"
            ],
            "description": "The one cluster the connection points at, by its name. [Get a source](/docs/logs/api/get-a-single-source/) returns the `cluster` its data is stored on. Required for a Grafana connection. A ClickHouse connection that names one reaches only that cluster. Leave it out for a ClickHouse connection that reaches every cluster where its teams store data. `cluster` is then `null`.",
            "examples": [
              "eu-nbg-2"
            ]
          },
          "team_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^t[1-9][0-9]*$"
            },
            "description": "Teams whose data this connection reaches, as `t`-prefixed team IDs such as `t123`. Get the IDs via [List teams](/docs/uptime/api/teams/list/).",
            "examples": [
              [
                "t1234"
              ]
            ]
          },
          "ip_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Allowed source IPs or CIDRs.",
            "default": [],
            "examples": [
              [
                "192.168.1.0/24",
                "10.0.0.1"
              ]
            ]
          },
          "valid_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the credential expires, or `null` if it never does.",
            "examples": [
              "2025-12-02T00:00:00.000Z"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free-form note.",
            "examples": [
              "Production connection for analytics"
            ]
          }
        },
        "required": [
          "client_type",
          "team_ids"
        ]
      },
      "ConnectionDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Connection"
          }
        }
      },
      "ConnectionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "Dashboard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard's id."
          },
          "type": {
            "type": "string",
            "const": "dashboard"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Dashboard name.",
                "examples": [
                  "Sample Dashboard"
                ]
              },
              "dashboard_group_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Group this dashboard belongs to.",
                "examples": [
                  "789"
                ]
              },
              "refresh_interval": {
                "type": "integer",
                "format": "int64",
                "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off.",
                "default": 30,
                "examples": [
                  30
                ]
              },
              "date_range_from": {
                "type": "string",
                "description": "Default range start, for example now-3h.",
                "default": "now-3h",
                "examples": [
                  "now-3h"
                ]
              },
              "date_range_to": {
                "type": "string",
                "description": "Default range end, for example now.",
                "default": "now",
                "examples": [
                  "now"
                ]
              },
              "source_eligibility_sql": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "SQL that decides which sources this dashboard's charts can read. Returned when you get one dashboard.",
                "examples": [
                  "SELECT countMerge(events_count) FROM {{source}} WHERE name = 'node_cpu_seconds_total' LIMIT 1"
                ]
              },
              "variables": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The name of the variable, used as `{{name}}` in queries."
                    },
                    "variable_type": {
                      "type": "string",
                      "description": "The type of the variable, `source`, `date`, `datetime`, `string`, `number`, `sql_expression`, `select_value`, `boolean`, `select_with_sql` or `select_predefined_sql`."
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The variable's current values as strings, or an empty list when it has none. For a `source` variable, the IDs of the selected sources."
                    },
                    "default_values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The variable's default values as strings, or an empty list when it has none."
                    },
                    "sql_definition": {
                      "type": "string",
                      "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                    },
                    "structured_value": {
                      "type": "object",
                      "properties": {
                        "selected_label": {
                          "type": "string",
                          "description": "Label of the selected value."
                        },
                        "canonicalSourceIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Selected sources of a source variable. Source IDs in `values` set them."
                        },
                        "serviceIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Selected services of a source variable."
                        },
                        "filters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The filter's label, shown in the variable's menu."
                              },
                              "sql": {
                                "type": "string",
                                "description": "A complete query that returns one column with the filter's options."
                              }
                            }
                          },
                          "description": "Saved filters, each a label and the SQL that lists its values."
                        }
                      },
                      "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                    },
                    "allow_multiple_values": {
                      "type": "boolean",
                      "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                    },
                    "source_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "The saved filters of a `select_predefined_sql` variable."
                    },
                    "selected_label": {
                      "type": "string",
                      "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                    }
                  }
                },
                "description": "The dashboard's variables, which chart queries use by name, such as `{{source}}`. Returned when you get one dashboard. See [Query variables](/docs/logs/dashboards/variables/). Every dashboard has the built-in `time`, `start_time`, `end_time` and `source` variables, which are added when you leave them out and keep their own type. An update replaces all variables, so a variable you leave out is removed, except the built-in ones. For a variable that already exists, any of `variable_type`, `default_values`, `sql_definition`, `structured_value` and `allow_multiple_values` you leave out keeps its value, and `null` clears any of them except `variable_type`. A variable's `values` aren't kept between updates, so send them again. A `source` variable keeps its sources when you leave out both `values` and `structured_value`. Changing `variable_type` clears the old `default_values`, `sql_definition` and `structured_value`. `sql_definition` is accepted only on `select_with_sql` and `multi_select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails.",
                "examples": [
                  [
                    {
                      "name": "environment",
                      "variable_type": "string",
                      "values": [
                        "production"
                      ],
                      "default_values": [
                        "production"
                      ],
                      "allow_multiple_values": false
                    }
                  ]
                ]
              },
              "charts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The chart's ID."
                    },
                    "chart_type": {
                      "type": "string",
                      "description": "The chart's type, `line_chart`, `table_chart`, `bar_chart`, `number_chart`, `heatmap_chart`, `anomalies_chart`, `pie_chart`, `scatter_chart`, `gauge_chart`, `tail_chart`, `static_text_chart`, `map_chart`, `text_chart`, `funnel_chart`, `funnel_trend_chart` or `hierarchy_chart`."
                    },
                    "name": {
                      "type": "string",
                      "description": "The chart's name."
                    },
                    "x": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's horizontal position on the 12-column grid, from `0` at the left."
                    },
                    "y": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's vertical position on the grid, from `0` at the top."
                    },
                    "w": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's width in grid columns, from `1` to `12`."
                    },
                    "h": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The chart's height in grid rows."
                    }
                  }
                },
                "description": "A summary of each chart on the dashboard, ordered top to bottom, then left to right. Returned when you get one dashboard. Use [Get dashboard chart](/docs/logs/api/charts/get/) for a chart's queries and settings.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "id": "567",
                      "chart_type": "line_chart",
                      "name": "CPU Usage",
                      "x": 0,
                      "y": 0,
                      "w": 6,
                      "h": 4
                    }
                  ]
                ]
              },
              "sections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The section's ID."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The section's name."
                    },
                    "y": {
                      "type": "integer",
                      "format": "int64",
                      "description": "The section's vertical position on the grid, from `0` at the top. A section spans the full width."
                    },
                    "collapsed": {
                      "type": "boolean",
                      "description": "Whether the section is collapsed."
                    }
                  }
                },
                "description": "Sections on the dashboard. Returned when you get one dashboard.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "id": "890",
                      "name": "Key Metrics",
                      "y": 0,
                      "collapsed": false
                    }
                  ]
                ]
              },
              "has_overlaps": {
                "type": "boolean",
                "description": "Whether any charts overlap on the grid. Returned when you get one dashboard.",
                "readOnly": true,
                "examples": [
                  false
                ]
              },
              "product": {
                "type": "string",
                "enum": [
                  "telemetry",
                  "rum"
                ],
                "description": "The product the dashboard belongs to. Defaults to `telemetry`, and it can't be changed after create.",
                "x-enum-descriptions": {
                  "telemetry": "A dashboard over logs, metrics and traces.",
                  "rum": "A Real User Monitoring dashboard."
                },
                "examples": [
                  "rum"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the dashboard was created.",
                "readOnly": true,
                "examples": [
                  "2025-01-20T15:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the dashboard was last updated.",
                "readOnly": true,
                "examples": [
                  "2025-01-21T10:00:00.000Z"
                ]
              },
              "url": {
                "type": "string",
                "description": "Link to this dashboard's page in the Better Stack web app.",
                "readOnly": true,
                "examples": [
                  "https://telemetry.betterstack.com/team/t123456/dashboards/123"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the dashboard, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123456"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the dashboard.",
                "readOnly": true,
                "examples": [
                  "example-team"
                ]
              }
            }
          }
        }
      },
      "DashboardChart": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard_chart's id."
          },
          "type": {
            "type": "string",
            "const": "chart"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "chart_type": {
                "type": "string",
                "enum": [
                  "line_chart",
                  "bar_chart",
                  "pie_chart",
                  "scatter_chart",
                  "gauge_chart",
                  "number_chart",
                  "heatmap_chart",
                  "table_chart",
                  "map_chart",
                  "text_chart",
                  "tail_chart",
                  "static_text_chart",
                  "funnel_chart",
                  "funnel_trend_chart",
                  "anomalies_chart",
                  "hierarchy_chart"
                ],
                "description": "Chart type. Only a `line_chart` can have more than one query. An update can't change it to a type the chart's existing queries or alerts don't work with. Changing it in an update without `queries` turns Drag & drop queries into `sql_expression` queries with the same SQL.",
                "x-enum-descriptions": {
                  "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "pie_chart": "Accepts `sql_expression` queries.",
                  "scatter_chart": "Accepts `sql_expression` queries.",
                  "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "heatmap_chart": "Accepts `sql_expression` queries.",
                  "table_chart": "Accepts `sql_expression` queries.",
                  "map_chart": "Accepts `sql_expression` queries.",
                  "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "tail_chart": "Accepts `tail_query` queries.",
                  "static_text_chart": "Accepts a `static_text` query.",
                  "funnel_chart": "Holds a `funnel_query` query made in the app.",
                  "funnel_trend_chart": "Holds a `funnel_query` query made in the app.",
                  "anomalies_chart": "Accepts `tail_query` queries.",
                  "hierarchy_chart": "Accepts `sql_expression` queries."
                },
                "examples": [
                  "line_chart"
                ]
              },
              "name": {
                "type": "string",
                "description": "Chart name.",
                "default": "Your chart",
                "examples": [
                  "CPU Usage"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Chart description.",
                "examples": [
                  "Average CPU usage over time."
                ]
              },
              "x": {
                "type": "integer",
                "format": "int64",
                "description": "The chart's horizontal position on the 12-column grid, from `0` at the left.",
                "examples": [
                  0
                ]
              },
              "y": {
                "type": "integer",
                "format": "int64",
                "description": "The chart's vertical position on the grid, from `0` at the top.",
                "examples": [
                  0
                ]
              },
              "w": {
                "type": "integer",
                "format": "int64",
                "description": "Grid width.",
                "default": 6,
                "examples": [
                  6
                ]
              },
              "h": {
                "type": "integer",
                "format": "int64",
                "description": "Grid height.",
                "default": 4,
                "examples": [
                  4
                ]
              },
              "settings": {
                "type": "object",
                "properties": {
                  "unit": {
                    "type": "string",
                    "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
                  },
                  "custom_unit": {
                    "type": "boolean",
                    "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                  },
                  "decimal_places": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Number of decimal places shown."
                  },
                  "time_column": {
                    "type": "string",
                    "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
                  },
                  "x_axis_type": {
                    "type": "string",
                    "description": "How the X axis is read. Usually `time`, `value` or `category`."
                  },
                  "y_axis_type": {
                    "type": "string",
                    "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
                  },
                  "series_column": {
                    "type": "string",
                    "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
                  },
                  "value_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Result columns that hold the values to chart."
                  },
                  "point_size_column": {
                    "type": "string",
                    "description": "Column that sets each point's size on a scatter chart."
                  },
                  "location_column": {
                    "type": "string",
                    "description": "Column holding the location on a map chart."
                  },
                  "location_label": {
                    "type": "string",
                    "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
                  },
                  "label_column": {
                    "type": "string",
                    "description": "Column that names each hexagon on a hierarchy chart."
                  },
                  "group_by_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Up to two columns a hierarchy chart groups its hexagons by."
                  },
                  "palette": {
                    "type": "string",
                    "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
                  },
                  "min_value": {
                    "type": "number",
                    "description": "Lowest value of a hierarchy chart's color scale."
                  },
                  "max_value": {
                    "type": "number",
                    "description": "Highest value of a hierarchy chart's color scale."
                  },
                  "link_template": {
                    "type": "string",
                    "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
                  },
                  "y_axis_min": {
                    "type": "number",
                    "description": "Lowest value on the Y axis."
                  },
                  "y_axis_max": {
                    "type": "number",
                    "description": "Highest value on the Y axis."
                  },
                  "y_axis_auto_range": {
                    "type": "string",
                    "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
                  },
                  "y_axis_scale": {
                    "type": "string",
                    "description": "Scale of the Y axis. Usually `linear` or `log`."
                  },
                  "min": {
                    "type": "number",
                    "description": "Lower bound of a gauge."
                  },
                  "max": {
                    "type": "number",
                    "description": "Upper bound of a gauge, the goal value."
                  },
                  "treat_missing_values": {
                    "type": "string",
                    "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
                  },
                  "stacking": {
                    "type": "string",
                    "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
                  },
                  "orientation": {
                    "type": "string",
                    "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
                  },
                  "legend": {
                    "type": "string",
                    "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
                  },
                  "series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
                  },
                  "series_order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Order the series are shown in, by name."
                  },
                  "show_previous_period": {
                    "type": "boolean",
                    "description": "Whether a line chart also shows the previous period."
                  },
                  "color_mode": {
                    "type": "string",
                    "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
                  },
                  "color_upper_threshold": {
                    "type": "number",
                    "description": "Upper threshold of a number chart's colors."
                  },
                  "color_lower_threshold": {
                    "type": "number",
                    "description": "Lower threshold of a number chart's colors."
                  },
                  "color_green_words": {
                    "type": "string",
                    "description": "Values a number chart shows in green, separated by commas."
                  },
                  "color_yellow_words": {
                    "type": "string",
                    "description": "Values a number chart shows in yellow, separated by commas."
                  },
                  "color_red_words": {
                    "type": "string",
                    "description": "Values a number chart shows in red, separated by commas."
                  },
                  "column_units": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "unit": {
                          "type": "string",
                          "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                        },
                        "custom_unit": {
                          "type": "boolean",
                          "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                        }
                      }
                    },
                    "description": "Unit of each table column, by column name."
                  },
                  "percentage_highlight_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Table columns holding ratios from 0 to 1, shown with a bar."
                  },
                  "series_unit": {
                    "type": "string",
                    "description": "Unit of a heatmap's Y axis labels."
                  },
                  "series_custom_unit": {
                    "type": "boolean",
                    "description": "Whether `series_unit` is your own suffix."
                  },
                  "heatmap_color_mode": {
                    "type": "string",
                    "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
                  },
                  "value_categories": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "Text shown for the value."
                        },
                        "color": {
                          "type": "string",
                          "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                        }
                      }
                    },
                    "description": "Label and color of each cell value of a categorized heatmap."
                  },
                  "column_widths": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Width of each table column, by column name, as the chart editor saves it."
                  },
                  "table_width": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Width of the table the `column_widths` were saved for."
                  },
                  "guessed_series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Colors the chart picked for its series, keyed by `series_name`."
                  },
                  "label": {
                    "type": "string",
                    "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
                  },
                  "text": {
                    "type": "string",
                    "description": "Markdown text of a text chart."
                  },
                  "rowTemplates": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Live tail row format of each source, by source ID."
                  },
                  "sampling": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Percentage of data the chart samples."
                  },
                  "fresh": {
                    "type": "boolean",
                    "description": "Whether the chart skips cached results."
                  },
                  "funnel_unit_name": {
                    "type": "string",
                    "description": "Word a funnel chart counts in, such as `people`."
                  },
                  "filtered_series": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Series the chart shows, by name."
                  },
                  "filtered_releases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Releases the chart shows."
                  },
                  "force_source_series": {
                    "type": "boolean",
                    "description": "Whether the chart shows one series per source."
                  },
                  "treat_zero_values": {
                    "type": "string",
                    "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
                  },
                  "projection": {
                    "type": "string",
                    "description": "Map projection of a map chart, such as `mercator`."
                  },
                  "published_format": {
                    "type": "string",
                    "description": "Format a published chart is served in, `json` by default."
                  },
                  "published_cache_for": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds a published chart's results are cached, 3 by default."
                  },
                  "y_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "description": "The Y axis value the line is drawn at."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
                  },
                  "x_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The X axis value the line is drawn at, a time or a number."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
                  }
                },
                "description": "Display settings for the `chart_type`, such as unit, axes, legend, stacking and decimal places. An update replaces all of them. Switching `x_axis_type` to or from `category` in an update without `queries` turns the chart's Drag & drop queries into `sql_expression` queries with the same SQL.",
                "examples": [
                  {
                    "unit": "percent",
                    "y_axis_scale": "linear"
                  }
                ]
              },
              "queries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The query's ID.",
                      "readOnly": true
                    },
                    "query_type": {
                      "type": "string",
                      "description": "The query's type. You can write `sql_expression`, `tail_query` and `static_text` queries. Queries built in the web app's editor can also be `pql_expression`, `query_builder`, `tail_query_builder`, `funnel_query`, `promql_query`, `promql_v2_query` or `promql_via_llm`, and can't be written."
                    },
                    "name": {
                      "type": "string",
                      "description": "The query's name. Left out when the query has none."
                    },
                    "source_variable": {
                      "type": "string",
                      "description": "The sources the query reads, as the name of a `source` variable, such as `source`, or a `source:` reference to specific sources. Defaults to `source`."
                    },
                    "sql_query": {
                      "type": "string",
                      "description": "The SQL the query runs. Returned for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries."
                    },
                    "pql_query": {
                      "type": "string",
                      "description": "PQL source of a `pql_expression` query. Read-only."
                    },
                    "where_condition": {
                      "type": "string",
                      "description": "The filter of a `tail_query` or `tail_query_builder` query. Left out when not set."
                    },
                    "static_text": {
                      "type": "string",
                      "description": "The Markdown text a `static_text` query shows. Left out when not set."
                    },
                    "funnel_query": {
                      "type": "object",
                      "properties": {
                        "session_field": {
                          "type": "string",
                          "description": "Field that ties one journey's events together, such as `session_id` or `user.id`."
                        },
                        "steps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Step name shown on the chart."
                              },
                              "conditions": {
                                "type": "string",
                                "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                              }
                            }
                          },
                          "description": "The funnel's steps in journey order."
                        },
                        "breakdown": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "The type of the breakdown field, always `string`."
                            },
                            "value": {
                              "type": "string",
                              "description": "The field each step is split by, such as `contexts.browser.name`."
                            }
                          },
                          "description": "The field each step is split by, or `null` when the funnel has no breakdown."
                        }
                      },
                      "description": "Funnel definition of a `funnel_query` query. Read-only."
                    },
                    "x_axis": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                    },
                    "y_axis": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                    },
                    "point_size": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                    },
                    "coordinates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                    },
                    "where": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Where blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                    },
                    "group_by": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                    },
                    "having": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Having blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                    },
                    "order_by": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                    }
                  }
                },
                "description": "The chart's queries. You can write `sql_expression`, `tail_query` and `static_text` queries. Other types, such as `query_builder`, `pql_expression` and PromQL, are returned but can't be written. Updating a chart replaces all of its queries. A chart created or updated with `query` gets a single query built from it. A chart other than `static_text_chart` needs at least one query, and only a `line_chart` can have more than one.",
                "examples": [
                  [
                    {
                      "id": "890",
                      "name": "CPU usage",
                      "query_type": "sql_expression",
                      "source_variable": "source",
                      "sql_query": "SELECT {{time}} as time, avg(cpu) as value FROM metrics GROUP BY time"
                    }
                  ]
                ]
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Explanation of what the chart shows. AI SRE and the chart's AI summary use it.",
                "examples": [
                  "Requests per minute across every service, to spot traffic drops."
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the chart's dashboard, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            }
          }
        }
      },
      "DashboardChartComment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard_chart_comment's id."
          },
          "type": {
            "type": "string",
            "const": "chart_comment"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "chart_id": {
                "type": "string",
                "description": "Chart the comment is on.",
                "readOnly": true,
                "examples": [
                  "567"
                ]
              },
              "dt": {
                "type": "string",
                "format": "date-time",
                "description": "Point on the chart's time axis the comment is pinned to, in UTC to the millisecond. A time you send without a zone is read as UTC.",
                "examples": [
                  "2026-08-17T12:34:56.789Z"
                ]
              },
              "content": {
                "type": "string",
                "description": "Comment text, in Markdown. To mention a team member, include `**M_START**{\"id\":\"u123\"}**M_END**`, with their user ID or e-mail as `id`. Get the user ID via [List team members](/docs/uptime/api/team-members/list/).",
                "examples": [
                  "Deployed v2.4.0"
                ]
              },
              "plaintext_content": {
                "type": "string",
                "description": "Comment text as people read it, with each mention as `@` and the member's name. Use it to display the comment.",
                "readOnly": true,
                "examples": [
                  "Deployed v2.4.0"
                ]
              },
              "user_email": {
                "type": "string",
                "description": "E-mail of the team member who wrote the comment. Left out when no team member wrote it, such as for a comment written with an API token or synced from an incident.",
                "readOnly": true,
                "examples": [
                  "jane@example.com"
                ]
              },
              "api_authored": {
                "type": "boolean",
                "description": "Whether the comment was written through the API, so an API token can update or delete it.",
                "readOnly": true,
                "examples": [
                  false
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the comment was written.",
                "readOnly": true,
                "examples": [
                  "2026-08-17T12:35:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the comment was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-08-17T12:35:00.000Z"
                ]
              }
            }
          }
        }
      },
      "DashboardChartCommentDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DashboardChartComment"
          }
        }
      },
      "DashboardChartCommentList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardChartComment"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "DashboardChartCommentUpdate": {
        "$ref": "#/components/schemas/DashboardChartCommentUpdateAttributes"
      },
      "DashboardChartCommentUpdateAttributes": {
        "type": "object",
        "properties": {
          "dt": {
            "type": "string",
            "format": "date-time",
            "description": "Point on the chart's time axis the comment is pinned to, in UTC to the millisecond. A time you send without a zone is read as UTC.",
            "examples": [
              "2026-08-17T12:34:56.789Z"
            ]
          },
          "content": {
            "type": "string",
            "description": "Comment text, in Markdown. To mention a team member, include `**M_START**{\"id\":\"u123\"}**M_END**`, with their user ID or e-mail as `id`. Get the user ID via [List team members](/docs/uptime/api/team-members/list/). On update, content sent back unchanged keeps its mentions without notifying anyone again.",
            "examples": [
              "Deployed v2.4.0"
            ]
          }
        }
      },
      "DashboardChartCreate": {
        "$ref": "#/components/schemas/DashboardChartCreateAttributes"
      },
      "DashboardChartCreateAttributes": {
        "type": "object",
        "properties": {
          "chart_type": {
            "type": "string",
            "enum": [
              "line_chart",
              "bar_chart",
              "pie_chart",
              "scatter_chart",
              "gauge_chart",
              "number_chart",
              "heatmap_chart",
              "table_chart",
              "map_chart",
              "text_chart",
              "tail_chart",
              "static_text_chart",
              "funnel_chart",
              "funnel_trend_chart",
              "anomalies_chart",
              "hierarchy_chart"
            ],
            "description": "Chart type. Only a `line_chart` can have more than one query. An update can't change it to a type the chart's existing queries or alerts don't work with. Changing it in an update without `queries` turns Drag & drop queries into `sql_expression` queries with the same SQL.",
            "x-enum-descriptions": {
              "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "pie_chart": "Accepts `sql_expression` queries.",
              "scatter_chart": "Accepts `sql_expression` queries.",
              "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "heatmap_chart": "Accepts `sql_expression` queries.",
              "table_chart": "Accepts `sql_expression` queries.",
              "map_chart": "Accepts `sql_expression` queries.",
              "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "tail_chart": "Accepts `tail_query` queries.",
              "static_text_chart": "Accepts a `static_text` query.",
              "funnel_chart": "Holds a `funnel_query` query made in the app.",
              "funnel_trend_chart": "Holds a `funnel_query` query made in the app.",
              "anomalies_chart": "Accepts `tail_query` queries.",
              "hierarchy_chart": "Accepts `sql_expression` queries."
            },
            "examples": [
              "line_chart"
            ]
          },
          "name": {
            "type": "string",
            "description": "Chart name.",
            "default": "Your chart",
            "examples": [
              "CPU Usage"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chart description.",
            "examples": [
              "Average CPU usage over time."
            ]
          },
          "x": {
            "type": "integer",
            "format": "int64",
            "description": "The chart's horizontal position on the 12-column grid, from `0` at the left.",
            "examples": [
              0
            ]
          },
          "y": {
            "type": "integer",
            "format": "int64",
            "description": "The chart's vertical position on the grid, from `0` at the top.",
            "examples": [
              0
            ]
          },
          "w": {
            "type": "integer",
            "format": "int64",
            "description": "Grid width.",
            "default": 6,
            "examples": [
              6
            ]
          },
          "h": {
            "type": "integer",
            "format": "int64",
            "description": "Grid height.",
            "default": 4,
            "examples": [
              4
            ]
          },
          "settings": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
              },
              "custom_unit": {
                "type": "boolean",
                "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
              },
              "decimal_places": {
                "type": "integer",
                "format": "int64",
                "description": "Number of decimal places shown."
              },
              "time_column": {
                "type": "string",
                "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
              },
              "x_axis_type": {
                "type": "string",
                "description": "How the X axis is read. Usually `time`, `value` or `category`."
              },
              "y_axis_type": {
                "type": "string",
                "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
              },
              "series_column": {
                "type": "string",
                "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
              },
              "value_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Result columns that hold the values to chart."
              },
              "point_size_column": {
                "type": "string",
                "description": "Column that sets each point's size on a scatter chart."
              },
              "location_column": {
                "type": "string",
                "description": "Column holding the location on a map chart."
              },
              "location_label": {
                "type": "string",
                "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
              },
              "label_column": {
                "type": "string",
                "description": "Column that names each hexagon on a hierarchy chart."
              },
              "group_by_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Up to two columns a hierarchy chart groups its hexagons by."
              },
              "palette": {
                "type": "string",
                "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
              },
              "min_value": {
                "type": "number",
                "description": "Lowest value of a hierarchy chart's color scale."
              },
              "max_value": {
                "type": "number",
                "description": "Highest value of a hierarchy chart's color scale."
              },
              "link_template": {
                "type": "string",
                "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
              },
              "y_axis_min": {
                "type": "number",
                "description": "Lowest value on the Y axis."
              },
              "y_axis_max": {
                "type": "number",
                "description": "Highest value on the Y axis."
              },
              "y_axis_auto_range": {
                "type": "string",
                "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
              },
              "y_axis_scale": {
                "type": "string",
                "description": "Scale of the Y axis. Usually `linear` or `log`."
              },
              "min": {
                "type": "number",
                "description": "Lower bound of a gauge."
              },
              "max": {
                "type": "number",
                "description": "Upper bound of a gauge, the goal value."
              },
              "treat_missing_values": {
                "type": "string",
                "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
              },
              "stacking": {
                "type": "string",
                "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
              },
              "orientation": {
                "type": "string",
                "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
              },
              "legend": {
                "type": "string",
                "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
              },
              "series_colors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
              },
              "series_order": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Order the series are shown in, by name."
              },
              "show_previous_period": {
                "type": "boolean",
                "description": "Whether a line chart also shows the previous period."
              },
              "color_mode": {
                "type": "string",
                "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
              },
              "color_upper_threshold": {
                "type": "number",
                "description": "Upper threshold of a number chart's colors."
              },
              "color_lower_threshold": {
                "type": "number",
                "description": "Lower threshold of a number chart's colors."
              },
              "color_green_words": {
                "type": "string",
                "description": "Values a number chart shows in green, separated by commas."
              },
              "color_yellow_words": {
                "type": "string",
                "description": "Values a number chart shows in yellow, separated by commas."
              },
              "color_red_words": {
                "type": "string",
                "description": "Values a number chart shows in red, separated by commas."
              },
              "column_units": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "string",
                      "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                    },
                    "custom_unit": {
                      "type": "boolean",
                      "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                    }
                  }
                },
                "description": "Unit of each table column, by column name."
              },
              "percentage_highlight_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Table columns holding ratios from 0 to 1, shown with a bar."
              },
              "series_unit": {
                "type": "string",
                "description": "Unit of a heatmap's Y axis labels."
              },
              "series_custom_unit": {
                "type": "boolean",
                "description": "Whether `series_unit` is your own suffix."
              },
              "heatmap_color_mode": {
                "type": "string",
                "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
              },
              "value_categories": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "description": "Text shown for the value."
                    },
                    "color": {
                      "type": "string",
                      "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                    }
                  }
                },
                "description": "Label and color of each cell value of a categorized heatmap."
              },
              "column_widths": {
                "type": "object",
                "additionalProperties": {
                  "type": "number"
                },
                "description": "Width of each table column, by column name, as the chart editor saves it."
              },
              "table_width": {
                "type": "integer",
                "format": "int64",
                "description": "Width of the table the `column_widths` were saved for."
              },
              "guessed_series_colors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Colors the chart picked for its series, keyed by `series_name`."
              },
              "label": {
                "type": "string",
                "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
              },
              "text": {
                "type": "string",
                "description": "Markdown text of a text chart."
              },
              "rowTemplates": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Live tail row format of each source, by source ID."
              },
              "sampling": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of data the chart samples."
              },
              "fresh": {
                "type": "boolean",
                "description": "Whether the chart skips cached results."
              },
              "funnel_unit_name": {
                "type": "string",
                "description": "Word a funnel chart counts in, such as `people`."
              },
              "filtered_series": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Series the chart shows, by name."
              },
              "filtered_releases": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Releases the chart shows."
              },
              "force_source_series": {
                "type": "boolean",
                "description": "Whether the chart shows one series per source."
              },
              "treat_zero_values": {
                "type": "string",
                "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
              },
              "projection": {
                "type": "string",
                "description": "Map projection of a map chart, such as `mercator`."
              },
              "published_format": {
                "type": "string",
                "description": "Format a published chart is served in, `json` by default."
              },
              "published_cache_for": {
                "type": "integer",
                "format": "int64",
                "description": "Seconds a published chart's results are cached, 3 by default."
              },
              "y_axis_annotations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "The Y axis value the line is drawn at."
                    },
                    "label": {
                      "type": "string",
                      "description": "Text shown next to the line."
                    },
                    "color": {
                      "type": "string",
                      "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                    }
                  }
                },
                "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
              },
              "x_axis_annotations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "description": "The X axis value the line is drawn at, a time or a number."
                    },
                    "label": {
                      "type": "string",
                      "description": "Text shown next to the line."
                    },
                    "color": {
                      "type": "string",
                      "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                    }
                  }
                },
                "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
              }
            },
            "description": "Display settings for the `chart_type`, such as unit, axes, legend, stacking and decimal places. An update replaces all of them. Switching `x_axis_type` to or from `category` in an update without `queries` turns the chart's Drag & drop queries into `sql_expression` queries with the same SQL. Defaults to an empty object.",
            "examples": [
              {
                "unit": "percent",
                "y_axis_scale": "linear"
              }
            ]
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The query's ID.",
                  "readOnly": true
                },
                "query_type": {
                  "type": "string",
                  "description": "The query's type. You can write `sql_expression`, `tail_query` and `static_text` queries. Queries built in the web app's editor can also be `pql_expression`, `query_builder`, `tail_query_builder`, `funnel_query`, `promql_query`, `promql_v2_query` or `promql_via_llm`, and can't be written."
                },
                "name": {
                  "type": "string",
                  "description": "The query's name. Left out when the query has none."
                },
                "source_variable": {
                  "type": "string",
                  "description": "The sources the query reads, as the name of a `source` variable, such as `source`, or a `source:` reference to specific sources. Defaults to `source`."
                },
                "sql_query": {
                  "type": "string",
                  "description": "The SQL the query runs. Returned for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries."
                },
                "pql_query": {
                  "type": "string",
                  "description": "PQL source of a `pql_expression` query. Read-only."
                },
                "where_condition": {
                  "type": "string",
                  "description": "The filter of a `tail_query` or `tail_query_builder` query. Left out when not set."
                },
                "static_text": {
                  "type": "string",
                  "description": "The Markdown text a `static_text` query shows. Left out when not set."
                },
                "funnel_query": {
                  "type": "object",
                  "properties": {
                    "session_field": {
                      "type": "string",
                      "description": "Field that ties one journey's events together, such as `session_id` or `user.id`."
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Step name shown on the chart."
                          },
                          "conditions": {
                            "type": "string",
                            "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                          }
                        }
                      },
                      "description": "The funnel's steps in journey order."
                    },
                    "breakdown": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the breakdown field, always `string`."
                        },
                        "value": {
                          "type": "string",
                          "description": "The field each step is split by, such as `contexts.browser.name`."
                        }
                      },
                      "description": "The field each step is split by, or `null` when the funnel has no breakdown."
                    }
                  },
                  "description": "Funnel definition of a `funnel_query` query. Read-only."
                },
                "x_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "y_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "point_size": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "coordinates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "where": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Where blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "group_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "having": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Having blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "order_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                }
              }
            },
            "description": "The chart's queries. You can write `sql_expression`, `tail_query` and `static_text` queries. Other types, such as `query_builder`, `pql_expression` and PromQL, are returned but can't be written. Updating a chart replaces all of its queries. A chart created or updated with `query` gets a single query built from it. A chart other than `static_text_chart` needs at least one query, and only a `line_chart` can have more than one.",
            "examples": [
              [
                {
                  "id": "890",
                  "name": "CPU usage",
                  "query_type": "sql_expression",
                  "source_variable": "source",
                  "sql_query": "SELECT {{time}} as time, avg(cpu) as value FROM metrics GROUP BY time"
                }
              ]
            ]
          },
          "query": {
            "type": "string",
            "description": "One query for the chart, written in SQL, instead of `queries`. The query's `FROM` must name a source, as `{{source}}` or a `source` variable of the dashboard. The chart's settings are worked out from the query's columns, and the `settings` you send override them. For a `static_text_chart`, `query` holds the chart's text. A chart created with `query` goes on the first free spot, so `query` can't be sent with `x` or `y`.",
            "writeOnly": true,
            "examples": [
              "SELECT {{time}} AS time, countMerge(events_count) AS value FROM {{source}} WHERE time BETWEEN {{start_time}} AND {{end_time}} GROUP BY time"
            ]
          },
          "section": {
            "type": "string",
            "description": "Name of the dashboard section to put the new chart in, at the section's first free spot. The section is created below everything else when the dashboard has none by that name. Can't be combined with `x` or `y`.",
            "writeOnly": true,
            "examples": [
              "Backend"
            ]
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explanation of what the chart shows. AI SRE and the chart's AI summary use it.",
            "examples": [
              "Requests per minute across every service, to spot traffic drops."
            ]
          }
        },
        "required": [
          "chart_type"
        ],
        "anyOf": [
          {
            "required": [
              "queries"
            ]
          },
          {
            "required": [
              "query"
            ]
          }
        ]
      },
      "DashboardChartDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DashboardChart"
          }
        }
      },
      "DashboardChartList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardChart"
            }
          }
        }
      },
      "DashboardChartUpdate": {
        "$ref": "#/components/schemas/DashboardChartUpdateAttributes"
      },
      "DashboardChartUpdateAttributes": {
        "type": "object",
        "properties": {
          "chart_type": {
            "type": "string",
            "enum": [
              "line_chart",
              "bar_chart",
              "pie_chart",
              "scatter_chart",
              "gauge_chart",
              "number_chart",
              "heatmap_chart",
              "table_chart",
              "map_chart",
              "text_chart",
              "tail_chart",
              "static_text_chart",
              "funnel_chart",
              "funnel_trend_chart",
              "anomalies_chart",
              "hierarchy_chart"
            ],
            "description": "Chart type. Only a `line_chart` can have more than one query. An update can't change it to a type the chart's existing queries or alerts don't work with. Changing it in an update without `queries` turns Drag & drop queries into `sql_expression` queries with the same SQL.",
            "x-enum-descriptions": {
              "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "pie_chart": "Accepts `sql_expression` queries.",
              "scatter_chart": "Accepts `sql_expression` queries.",
              "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "heatmap_chart": "Accepts `sql_expression` queries.",
              "table_chart": "Accepts `sql_expression` queries.",
              "map_chart": "Accepts `sql_expression` queries.",
              "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
              "tail_chart": "Accepts `tail_query` queries.",
              "static_text_chart": "Accepts a `static_text` query.",
              "funnel_chart": "Holds a `funnel_query` query made in the app.",
              "funnel_trend_chart": "Holds a `funnel_query` query made in the app.",
              "anomalies_chart": "Accepts `tail_query` queries.",
              "hierarchy_chart": "Accepts `sql_expression` queries."
            },
            "examples": [
              "line_chart"
            ]
          },
          "name": {
            "type": "string",
            "description": "Chart name.",
            "default": "Your chart",
            "examples": [
              "CPU Usage"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chart description.",
            "examples": [
              "Average CPU usage over time."
            ]
          },
          "x": {
            "type": "integer",
            "format": "int64",
            "description": "The chart's horizontal position on the 12-column grid, from `0` at the left.",
            "examples": [
              0
            ]
          },
          "y": {
            "type": "integer",
            "format": "int64",
            "description": "The chart's vertical position on the grid, from `0` at the top.",
            "examples": [
              0
            ]
          },
          "w": {
            "type": "integer",
            "format": "int64",
            "description": "Grid width.",
            "default": 6,
            "examples": [
              6
            ]
          },
          "h": {
            "type": "integer",
            "format": "int64",
            "description": "Grid height.",
            "default": 4,
            "examples": [
              4
            ]
          },
          "settings": {
            "type": "object",
            "properties": {
              "unit": {
                "type": "string",
                "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
              },
              "custom_unit": {
                "type": "boolean",
                "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
              },
              "decimal_places": {
                "type": "integer",
                "format": "int64",
                "description": "Number of decimal places shown."
              },
              "time_column": {
                "type": "string",
                "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
              },
              "x_axis_type": {
                "type": "string",
                "description": "How the X axis is read. Usually `time`, `value` or `category`."
              },
              "y_axis_type": {
                "type": "string",
                "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
              },
              "series_column": {
                "type": "string",
                "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
              },
              "value_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Result columns that hold the values to chart."
              },
              "point_size_column": {
                "type": "string",
                "description": "Column that sets each point's size on a scatter chart."
              },
              "location_column": {
                "type": "string",
                "description": "Column holding the location on a map chart."
              },
              "location_label": {
                "type": "string",
                "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
              },
              "label_column": {
                "type": "string",
                "description": "Column that names each hexagon on a hierarchy chart."
              },
              "group_by_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Up to two columns a hierarchy chart groups its hexagons by."
              },
              "palette": {
                "type": "string",
                "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
              },
              "min_value": {
                "type": "number",
                "description": "Lowest value of a hierarchy chart's color scale."
              },
              "max_value": {
                "type": "number",
                "description": "Highest value of a hierarchy chart's color scale."
              },
              "link_template": {
                "type": "string",
                "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
              },
              "y_axis_min": {
                "type": "number",
                "description": "Lowest value on the Y axis."
              },
              "y_axis_max": {
                "type": "number",
                "description": "Highest value on the Y axis."
              },
              "y_axis_auto_range": {
                "type": "string",
                "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
              },
              "y_axis_scale": {
                "type": "string",
                "description": "Scale of the Y axis. Usually `linear` or `log`."
              },
              "min": {
                "type": "number",
                "description": "Lower bound of a gauge."
              },
              "max": {
                "type": "number",
                "description": "Upper bound of a gauge, the goal value."
              },
              "treat_missing_values": {
                "type": "string",
                "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
              },
              "stacking": {
                "type": "string",
                "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
              },
              "orientation": {
                "type": "string",
                "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
              },
              "legend": {
                "type": "string",
                "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
              },
              "series_colors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
              },
              "series_order": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Order the series are shown in, by name."
              },
              "show_previous_period": {
                "type": "boolean",
                "description": "Whether a line chart also shows the previous period."
              },
              "color_mode": {
                "type": "string",
                "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
              },
              "color_upper_threshold": {
                "type": "number",
                "description": "Upper threshold of a number chart's colors."
              },
              "color_lower_threshold": {
                "type": "number",
                "description": "Lower threshold of a number chart's colors."
              },
              "color_green_words": {
                "type": "string",
                "description": "Values a number chart shows in green, separated by commas."
              },
              "color_yellow_words": {
                "type": "string",
                "description": "Values a number chart shows in yellow, separated by commas."
              },
              "color_red_words": {
                "type": "string",
                "description": "Values a number chart shows in red, separated by commas."
              },
              "column_units": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "string",
                      "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                    },
                    "custom_unit": {
                      "type": "boolean",
                      "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                    }
                  }
                },
                "description": "Unit of each table column, by column name."
              },
              "percentage_highlight_columns": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Table columns holding ratios from 0 to 1, shown with a bar."
              },
              "series_unit": {
                "type": "string",
                "description": "Unit of a heatmap's Y axis labels."
              },
              "series_custom_unit": {
                "type": "boolean",
                "description": "Whether `series_unit` is your own suffix."
              },
              "heatmap_color_mode": {
                "type": "string",
                "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
              },
              "value_categories": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "description": "Text shown for the value."
                    },
                    "color": {
                      "type": "string",
                      "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                    }
                  }
                },
                "description": "Label and color of each cell value of a categorized heatmap."
              },
              "column_widths": {
                "type": "object",
                "additionalProperties": {
                  "type": "number"
                },
                "description": "Width of each table column, by column name, as the chart editor saves it."
              },
              "table_width": {
                "type": "integer",
                "format": "int64",
                "description": "Width of the table the `column_widths` were saved for."
              },
              "guessed_series_colors": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Colors the chart picked for its series, keyed by `series_name`."
              },
              "label": {
                "type": "string",
                "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
              },
              "text": {
                "type": "string",
                "description": "Markdown text of a text chart."
              },
              "rowTemplates": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Live tail row format of each source, by source ID."
              },
              "sampling": {
                "type": "integer",
                "format": "int64",
                "description": "Percentage of data the chart samples."
              },
              "fresh": {
                "type": "boolean",
                "description": "Whether the chart skips cached results."
              },
              "funnel_unit_name": {
                "type": "string",
                "description": "Word a funnel chart counts in, such as `people`."
              },
              "filtered_series": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Series the chart shows, by name."
              },
              "filtered_releases": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Releases the chart shows."
              },
              "force_source_series": {
                "type": "boolean",
                "description": "Whether the chart shows one series per source."
              },
              "treat_zero_values": {
                "type": "string",
                "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
              },
              "projection": {
                "type": "string",
                "description": "Map projection of a map chart, such as `mercator`."
              },
              "published_format": {
                "type": "string",
                "description": "Format a published chart is served in, `json` by default."
              },
              "published_cache_for": {
                "type": "integer",
                "format": "int64",
                "description": "Seconds a published chart's results are cached, 3 by default."
              },
              "y_axis_annotations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "The Y axis value the line is drawn at."
                    },
                    "label": {
                      "type": "string",
                      "description": "Text shown next to the line."
                    },
                    "color": {
                      "type": "string",
                      "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                    }
                  }
                },
                "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
              },
              "x_axis_annotations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "description": "The X axis value the line is drawn at, a time or a number."
                    },
                    "label": {
                      "type": "string",
                      "description": "Text shown next to the line."
                    },
                    "color": {
                      "type": "string",
                      "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                    }
                  }
                },
                "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
              }
            },
            "description": "Display settings for the `chart_type`, such as unit, axes, legend, stacking and decimal places. An update replaces all of them. Switching `x_axis_type` to or from `category` in an update without `queries` turns the chart's Drag & drop queries into `sql_expression` queries with the same SQL. Defaults to an empty object.",
            "examples": [
              {
                "unit": "percent",
                "y_axis_scale": "linear"
              }
            ]
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The query's ID.",
                  "readOnly": true
                },
                "query_type": {
                  "type": "string",
                  "description": "The query's type. You can write `sql_expression`, `tail_query` and `static_text` queries. Queries built in the web app's editor can also be `pql_expression`, `query_builder`, `tail_query_builder`, `funnel_query`, `promql_query`, `promql_v2_query` or `promql_via_llm`, and can't be written."
                },
                "name": {
                  "type": "string",
                  "description": "The query's name. Left out when the query has none."
                },
                "source_variable": {
                  "type": "string",
                  "description": "The sources the query reads, as the name of a `source` variable, such as `source`, or a `source:` reference to specific sources. Defaults to `source`."
                },
                "sql_query": {
                  "type": "string",
                  "description": "The SQL the query runs. Returned for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries."
                },
                "pql_query": {
                  "type": "string",
                  "description": "PQL source of a `pql_expression` query. Read-only."
                },
                "where_condition": {
                  "type": "string",
                  "description": "The filter of a `tail_query` or `tail_query_builder` query. Left out when not set."
                },
                "static_text": {
                  "type": "string",
                  "description": "The Markdown text a `static_text` query shows. Left out when not set."
                },
                "funnel_query": {
                  "type": "object",
                  "properties": {
                    "session_field": {
                      "type": "string",
                      "description": "Field that ties one journey's events together, such as `session_id` or `user.id`."
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Step name shown on the chart."
                          },
                          "conditions": {
                            "type": "string",
                            "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                          }
                        }
                      },
                      "description": "The funnel's steps in journey order."
                    },
                    "breakdown": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the breakdown field, always `string`."
                        },
                        "value": {
                          "type": "string",
                          "description": "The field each step is split by, such as `contexts.browser.name`."
                        }
                      },
                      "description": "The field each step is split by, or `null` when the funnel has no breakdown."
                    }
                  },
                  "description": "Funnel definition of a `funnel_query` query. Read-only."
                },
                "x_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "y_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "point_size": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "coordinates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "where": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Where blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "group_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Left out when not set. Read-only."
                },
                "having": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Having blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                },
                "order_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query, as an empty list when there are none. Read-only."
                }
              }
            },
            "description": "The chart's queries. You can write `sql_expression`, `tail_query` and `static_text` queries. Other types, such as `query_builder`, `pql_expression` and PromQL, are returned but can't be written. Updating a chart replaces all of its queries. A chart created or updated with `query` gets a single query built from it. A chart other than `static_text_chart` needs at least one query, and only a `line_chart` can have more than one.",
            "examples": [
              [
                {
                  "id": "890",
                  "name": "CPU usage",
                  "query_type": "sql_expression",
                  "source_variable": "source",
                  "sql_query": "SELECT {{time}} as time, avg(cpu) as value FROM metrics GROUP BY time"
                }
              ]
            ]
          },
          "query": {
            "type": "string",
            "description": "One query for the chart, written in SQL, instead of `queries`. The query's `FROM` must name a source, as `{{source}}` or a `source` variable of the dashboard. The chart's settings are worked out from the query's columns, and the `settings` you send override them. For a `static_text_chart`, `query` holds the chart's text. A chart created with `query` goes on the first free spot, so `query` can't be sent with `x` or `y`.",
            "writeOnly": true,
            "examples": [
              "SELECT {{time}} AS time, countMerge(events_count) AS value FROM {{source}} WHERE time BETWEEN {{start_time}} AND {{end_time}} GROUP BY time"
            ]
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explanation of what the chart shows. AI SRE and the chart's AI summary use it.",
            "examples": [
              "Requests per minute across every service, to spot traffic drops."
            ]
          }
        }
      },
      "DashboardCreate": {
        "$ref": "#/components/schemas/DashboardCreateAttributes"
      },
      "DashboardCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Dashboard name.",
            "examples": [
              "Sample Dashboard"
            ]
          },
          "dashboard_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group this dashboard belongs to. Send `null` or `0` to remove it from its group.",
            "examples": [
              "789"
            ]
          },
          "refresh_interval": {
            "type": "integer",
            "format": "int64",
            "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off.",
            "default": 30,
            "examples": [
              30
            ]
          },
          "date_range_from": {
            "type": "string",
            "description": "Default range start, for example now-3h.",
            "default": "now-3h",
            "examples": [
              "now-3h"
            ]
          },
          "date_range_to": {
            "type": "string",
            "description": "Default range end, for example now.",
            "default": "now",
            "examples": [
              "now"
            ]
          },
          "source_eligibility_sql": {
            "type": [
              "string",
              "null"
            ],
            "description": "SQL that decides which sources this dashboard's charts can read. Returned when you get one dashboard.",
            "examples": [
              "SELECT countMerge(events_count) FROM {{source}} WHERE name = 'node_cpu_seconds_total' LIMIT 1"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the variable, used as `{{name}}` in queries."
                },
                "variable_type": {
                  "type": "string",
                  "description": "The type of the variable, `source`, `date`, `datetime`, `string`, `number`, `sql_expression`, `select_value`, `boolean`, `select_with_sql` or `select_predefined_sql`."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's current values as strings, or an empty list when it has none. For a `source` variable, the IDs of the selected sources."
                },
                "default_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's default values as strings, or an empty list when it has none."
                },
                "sql_definition": {
                  "type": "string",
                  "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                },
                "structured_value": {
                  "type": "object",
                  "properties": {
                    "selected_label": {
                      "type": "string",
                      "description": "Label of the selected value."
                    },
                    "canonicalSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected sources of a source variable. Source IDs in `values` set them."
                    },
                    "serviceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected services of a source variable."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "Saved filters, each a label and the SQL that lists its values."
                    }
                  },
                  "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                },
                "allow_multiple_values": {
                  "type": "boolean",
                  "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The filter's label, shown in the variable's menu."
                      },
                      "sql": {
                        "type": "string",
                        "description": "A complete query that returns one column with the filter's options."
                      }
                    }
                  },
                  "description": "The saved filters of a `select_predefined_sql` variable."
                },
                "selected_label": {
                  "type": "string",
                  "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                }
              }
            },
            "description": "The dashboard's variables, which chart queries use by name, such as `{{source}}`. Returned when you get one dashboard. See [Query variables](/docs/logs/dashboards/variables/). Every dashboard has the built-in `time`, `start_time`, `end_time` and `source` variables, which are added when you leave them out and keep their own type. An update replaces all variables, so a variable you leave out is removed, except the built-in ones. For a variable that already exists, any of `variable_type`, `default_values`, `sql_definition`, `structured_value` and `allow_multiple_values` you leave out keeps its value, and `null` clears any of them except `variable_type`. A variable's `values` aren't kept between updates, so send them again. A `source` variable keeps its sources when you leave out both `values` and `structured_value`. Changing `variable_type` clears the old `default_values`, `sql_definition` and `structured_value`. `sql_definition` is accepted only on `select_with_sql` and `multi_select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails.",
            "examples": [
              [
                {
                  "name": "environment",
                  "variable_type": "string",
                  "values": [
                    "production"
                  ],
                  "default_values": [
                    "production"
                  ],
                  "allow_multiple_values": false
                }
              ]
            ]
          },
          "template_id": {
            "type": "string",
            "description": "ID of the dashboard template to create the dashboard from, as [List dashboard templates](/docs/logs/api/dashboards/templates/) lists it. The dashboard starts with the template's charts, sections, alerts, variables and settings. With `template_id`, creating a dashboard accepts `name`, `product`, `source_id`, either `dashboard_group_id` or `resource_group_name`, and `refresh_interval`, `date_range_from`, `date_range_to` and `source_eligibility_sql`, which replace the template's. `variables` isn't accepted with a template.",
            "writeOnly": true,
            "examples": [
              "1129"
            ]
          },
          "source_id": {
            "type": "string",
            "description": "ID of the source or application to set the new dashboard up for, as [List sources](/docs/logs/api/list-all-existing-sources/) or [List applications](/docs/errors/api/applications/list/) lists it. For a `rum` dashboard, `source_id` is an application's ID. With `source_id`, creating a dashboard accepts `name`, `product`, `template_id`, either `dashboard_group_id` or `resource_group_name`, and `refresh_interval`, `date_range_from`, `date_range_to` and `source_eligibility_sql`. `variables` isn't accepted with `source_id`.",
            "writeOnly": true,
            "examples": [
              "67"
            ]
          },
          "product": {
            "type": "string",
            "enum": [
              "telemetry",
              "rum"
            ],
            "description": "The product the dashboard belongs to. Defaults to `telemetry`, and it can't be changed after create.",
            "x-enum-descriptions": {
              "telemetry": "A dashboard over logs, metrics and traces.",
              "rum": "A Real User Monitoring dashboard."
            },
            "examples": [
              "rum"
            ]
          },
          "resource_group_name": {
            "type": "string",
            "description": "Name of the dashboard group to put the new dashboard in. Your group with that name is used, or created when there's none. Send it instead of `dashboard_group_id`.",
            "writeOnly": true,
            "examples": [
              "Billing"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "DashboardDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Dashboard"
          }
        }
      },
      "DashboardGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard_group's id."
          },
          "type": {
            "type": "string",
            "const": "dashboard_group"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Group name.",
                "examples": [
                  "Production Monitoring"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the group was created.",
                "readOnly": true,
                "examples": [
                  "2026-02-20T10:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the group was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-02-23T14:30:00.000Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the group, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the group.",
                "readOnly": true,
                "examples": [
                  "My Team"
                ]
              }
            }
          }
        }
      },
      "DashboardGroupCreate": {
        "$ref": "#/components/schemas/DashboardGroupCreateAttributes"
      },
      "DashboardGroupCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Production Monitoring"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "DashboardGroupDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DashboardGroup"
          }
        }
      },
      "DashboardGroupList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardGroup"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "DashboardGroupUpdate": {
        "$ref": "#/components/schemas/DashboardGroupUpdateAttributes"
      },
      "DashboardGroupUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Production Monitoring"
            ]
          }
        }
      },
      "DashboardList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Dashboard"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "DashboardSection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard_section's id."
          },
          "type": {
            "type": "string",
            "const": "section"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Section name.",
                "examples": [
                  "Key Metrics"
                ]
              },
              "y": {
                "type": "integer",
                "format": "int64",
                "description": "Vertical position on the dashboard grid, from `0` at the top. When an update moves the section onto a chart, the dashboard rearranges its layout shortly after so nothing overlaps.",
                "examples": [
                  0
                ]
              },
              "collapsed": {
                "type": "boolean",
                "description": "Whether the section starts collapsed.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "explanation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Explanation of what the section groups.",
                "examples": [
                  "Request rate, error rate and latency of the API."
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the section's dashboard, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            }
          }
        }
      },
      "DashboardSectionCreate": {
        "$ref": "#/components/schemas/DashboardSectionCreateAttributes"
      },
      "DashboardSectionCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Section name.",
            "examples": [
              "Key Metrics"
            ]
          },
          "y": {
            "type": "integer",
            "format": "int64",
            "description": "Vertical position on the dashboard grid, from `0` at the top. When an update moves the section onto a chart, the dashboard rearranges its layout shortly after so nothing overlaps. Defaults to just below the last section or chart.",
            "examples": [
              0
            ]
          },
          "collapsed": {
            "type": "boolean",
            "description": "Whether the section starts collapsed.",
            "default": false,
            "examples": [
              false
            ]
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explanation of what the section groups.",
            "examples": [
              "Request rate, error rate and latency of the API."
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "DashboardSectionDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DashboardSection"
          }
        }
      },
      "DashboardSectionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardSection"
            }
          }
        }
      },
      "DashboardSectionUpdate": {
        "$ref": "#/components/schemas/DashboardSectionUpdateAttributes"
      },
      "DashboardSectionUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Section name.",
            "examples": [
              "Key Metrics"
            ]
          },
          "y": {
            "type": "integer",
            "format": "int64",
            "description": "Vertical position on the dashboard grid, from `0` at the top. When an update moves the section onto a chart, the dashboard rearranges its layout shortly after so nothing overlaps. Defaults to just below the last section or chart.",
            "examples": [
              0
            ]
          },
          "collapsed": {
            "type": "boolean",
            "description": "Whether the section starts collapsed.",
            "default": false,
            "examples": [
              false
            ]
          },
          "explanation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Explanation of what the section groups.",
            "examples": [
              "Request rate, error rate and latency of the API."
            ]
          }
        }
      },
      "DashboardTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard_template's id."
          },
          "type": {
            "type": "string",
            "const": "dashboard_template"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Template name.",
                "readOnly": true,
                "examples": [
                  "Better Stack Collector"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the template visualizes.",
                "readOnly": true,
                "examples": [
                  "Monitor services instrumented by the Better Stack collector."
                ]
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Categories the template is filed under.",
                "readOnly": true,
                "examples": [
                  [
                    "infrastructure",
                    "ebpf"
                  ]
                ]
              }
            }
          }
        }
      },
      "DashboardTemplateList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardTemplate"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "DashboardUpdate": {
        "$ref": "#/components/schemas/DashboardUpdateAttributes"
      },
      "DashboardUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Dashboard name.",
            "examples": [
              "Sample Dashboard"
            ]
          },
          "dashboard_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group this dashboard belongs to. Send `null` or `0` to remove it from its group.",
            "examples": [
              "789"
            ]
          },
          "refresh_interval": {
            "type": "integer",
            "format": "int64",
            "description": "How often the dashboard refreshes its charts, in seconds. `0` turns automatic refresh off.",
            "default": 30,
            "examples": [
              30
            ]
          },
          "date_range_from": {
            "type": "string",
            "description": "Default range start, for example now-3h.",
            "default": "now-3h",
            "examples": [
              "now-3h"
            ]
          },
          "date_range_to": {
            "type": "string",
            "description": "Default range end, for example now.",
            "default": "now",
            "examples": [
              "now"
            ]
          },
          "source_eligibility_sql": {
            "type": [
              "string",
              "null"
            ],
            "description": "SQL that decides which sources this dashboard's charts can read. Returned when you get one dashboard.",
            "examples": [
              "SELECT countMerge(events_count) FROM {{source}} WHERE name = 'node_cpu_seconds_total' LIMIT 1"
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the variable, used as `{{name}}` in queries."
                },
                "variable_type": {
                  "type": "string",
                  "description": "The type of the variable, `source`, `date`, `datetime`, `string`, `number`, `sql_expression`, `select_value`, `boolean`, `select_with_sql` or `select_predefined_sql`."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's current values as strings, or an empty list when it has none. For a `source` variable, the IDs of the selected sources."
                },
                "default_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's default values as strings, or an empty list when it has none."
                },
                "sql_definition": {
                  "type": "string",
                  "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                },
                "structured_value": {
                  "type": "object",
                  "properties": {
                    "selected_label": {
                      "type": "string",
                      "description": "Label of the selected value."
                    },
                    "canonicalSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected sources of a source variable. Source IDs in `values` set them."
                    },
                    "serviceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected services of a source variable."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "Saved filters, each a label and the SQL that lists its values."
                    }
                  },
                  "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                },
                "allow_multiple_values": {
                  "type": "boolean",
                  "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The filter's label, shown in the variable's menu."
                      },
                      "sql": {
                        "type": "string",
                        "description": "A complete query that returns one column with the filter's options."
                      }
                    }
                  },
                  "description": "The saved filters of a `select_predefined_sql` variable."
                },
                "selected_label": {
                  "type": "string",
                  "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                }
              }
            },
            "description": "The dashboard's variables, which chart queries use by name, such as `{{source}}`. Returned when you get one dashboard. See [Query variables](/docs/logs/dashboards/variables/). Every dashboard has the built-in `time`, `start_time`, `end_time` and `source` variables, which are added when you leave them out and keep their own type. An update replaces all variables, so a variable you leave out is removed, except the built-in ones. For a variable that already exists, any of `variable_type`, `default_values`, `sql_definition`, `structured_value` and `allow_multiple_values` you leave out keeps its value, and `null` clears any of them except `variable_type`. A variable's `values` aren't kept between updates, so send them again. A `source` variable keeps its sources when you leave out both `values` and `structured_value`. Changing `variable_type` clears the old `default_values`, `sql_definition` and `structured_value`. `sql_definition` is accepted only on `select_with_sql` and `multi_select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails.",
            "examples": [
              [
                {
                  "name": "environment",
                  "variable_type": "string",
                  "values": [
                    "production"
                  ],
                  "default_values": [
                    "production"
                  ],
                  "allow_multiple_values": false
                }
              ]
            ]
          }
        }
      },
      "DashboardVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dashboard_version's id."
          },
          "type": {
            "type": "string",
            "const": "dashboard_version"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "number": {
                "type": "integer",
                "format": "int64",
                "description": "Version number, which you pass to a rollback as `version`. Same as the version's ID.",
                "readOnly": true,
                "examples": [
                  3
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the version was saved, right before the change.",
                "readOnly": true,
                "examples": [
                  "2026-11-20T20:20:58.511Z"
                ]
              },
              "changed_by": {
                "type": "string",
                "description": "Who made the change, a team member, `the <name> API token`, `AI SRE`, `a former team member` or `Unknown`. A change made in an AI SRE conversation names it as `AI SRE in conversation \"<title>\"` when you can open AI SRE conversations.",
                "readOnly": true,
                "examples": [
                  "the Deploy pipeline API token"
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "app",
                  "ai_sre",
                  "mcp",
                  "api",
                  "mobile",
                  "uptime",
                  "templates_admin"
                ],
                "description": "Where the change was made.",
                "readOnly": true,
                "examples": [
                  "api"
                ]
              },
              "source_name": {
                "type": "string",
                "description": "Where the change was made, `Better Stack app`, `AI SRE`, `MCP`, `API`, `Mobile app`, `Incidents app` or `Template editor`.",
                "readOnly": true,
                "examples": [
                  "API"
                ]
              },
              "changed": {
                "type": "string",
                "description": "What the change touched, the names of the changed charts, `dashboard settings`, `alert paused or resumed` or `no visible change`. A rollback's version starts with `rollback: `.",
                "readOnly": true,
                "examples": [
                  "CPU renamed"
                ]
              },
              "current": {
                "type": "boolean",
                "description": "Whether the dashboard looks the same now as in this version.",
                "readOnly": true,
                "examples": [
                  false
                ]
              }
            }
          }
        }
      },
      "DashboardVersionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DashboardVersion"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "DataRegion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data_region's id."
          },
          "type": {
            "type": "string",
            "const": "data_region"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The region's or cluster's name.",
                "readOnly": true,
                "examples": [
                  "Europe"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "region",
                  "dedicated_cluster"
                ],
                "description": "The kind of place the data is stored in.",
                "x-enum-descriptions": {
                  "region": "A shared data region.",
                  "dedicated_cluster": "A cluster only your organization stores data on."
                },
                "readOnly": true,
                "examples": [
                  "region"
                ]
              }
            }
          }
        }
      },
      "DataRegionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataRegion"
            }
          }
        }
      },
      "Exploration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The exploration's id."
          },
          "type": {
            "type": "string",
            "const": "exploration"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.",
                "examples": [
                  "Error Rate Analysis"
                ]
              },
              "date_range_from": {
                "type": "string",
                "description": "Start of the default date range, such as `now-3h`. A funnel's range starts at `now-7d` by default. Once set, it can't be cleared.",
                "default": "now-3h",
                "examples": [
                  "now-3h"
                ]
              },
              "date_range_to": {
                "type": "string",
                "description": "End of the default date range, such as `now`. Once set, it can't be cleared.",
                "default": "now",
                "examples": [
                  "now"
                ]
              },
              "exploration_group_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Group this exploration belongs to.",
                "examples": [
                  "456"
                ]
              },
              "chart": {
                "type": "object",
                "properties": {
                  "chart_type": {
                    "type": "string",
                    "enum": [
                      "line_chart",
                      "table_chart",
                      "bar_chart",
                      "number_chart",
                      "heatmap_chart",
                      "anomalies_chart",
                      "pie_chart",
                      "scatter_chart",
                      "gauge_chart",
                      "tail_chart",
                      "static_text_chart",
                      "map_chart",
                      "text_chart",
                      "funnel_chart",
                      "funnel_trend_chart",
                      "hierarchy_chart"
                    ],
                    "description": "Chart type. A funnel chart can only be switched to a funnel trend chart, which shows the funnel over time, and back.\n\n- `line_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `table_chart`: Accepts `sql_expression` queries.\n- `bar_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `number_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `heatmap_chart`: Accepts `sql_expression` queries.\n- `anomalies_chart`: Accepts `tail_query` queries.\n- `pie_chart`: Accepts `sql_expression` queries.\n- `scatter_chart`: Accepts `sql_expression` queries.\n- `gauge_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `tail_chart`: Accepts `tail_query` queries.\n- `static_text_chart`: Accepts a `static_text` query.\n- `map_chart`: Accepts `sql_expression` queries.\n- `text_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `funnel_chart`: Accepts a `funnel_query` query.\n- `funnel_trend_chart`: Accepts a `funnel_query` query.\n- `hierarchy_chart`: Accepts `sql_expression` queries.",
                    "x-enum-descriptions": {
                      "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
                      "table_chart": "Accepts `sql_expression` queries.",
                      "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
                      "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
                      "heatmap_chart": "Accepts `sql_expression` queries.",
                      "anomalies_chart": "Accepts `tail_query` queries.",
                      "pie_chart": "Accepts `sql_expression` queries.",
                      "scatter_chart": "Accepts `sql_expression` queries.",
                      "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
                      "tail_chart": "Accepts `tail_query` queries.",
                      "static_text_chart": "Accepts a `static_text` query.",
                      "map_chart": "Accepts `sql_expression` queries.",
                      "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
                      "funnel_chart": "Accepts a `funnel_query` query.",
                      "funnel_trend_chart": "Accepts a `funnel_query` query.",
                      "hierarchy_chart": "Accepts `sql_expression` queries."
                    }
                  },
                  "name": {
                    "type": "string",
                    "description": "The chart's name. Until you name the exploration, `name` holds a generated name instead.",
                    "readOnly": true
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The chart's description, or `null` when it has none."
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "unit": {
                        "type": "string",
                        "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
                      },
                      "custom_unit": {
                        "type": "boolean",
                        "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                      },
                      "decimal_places": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Number of decimal places shown."
                      },
                      "time_column": {
                        "type": "string",
                        "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
                      },
                      "x_axis_type": {
                        "type": "string",
                        "description": "How the X axis is read. Usually `time`, `value` or `category`."
                      },
                      "y_axis_type": {
                        "type": "string",
                        "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
                      },
                      "series_column": {
                        "type": "string",
                        "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
                      },
                      "value_columns": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Result columns that hold the values to chart."
                      },
                      "point_size_column": {
                        "type": "string",
                        "description": "Column that sets each point's size on a scatter chart."
                      },
                      "location_column": {
                        "type": "string",
                        "description": "Column holding the location on a map chart."
                      },
                      "location_label": {
                        "type": "string",
                        "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
                      },
                      "label_column": {
                        "type": "string",
                        "description": "Column that names each hexagon on a hierarchy chart."
                      },
                      "group_by_columns": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Up to two columns a hierarchy chart groups its hexagons by."
                      },
                      "palette": {
                        "type": "string",
                        "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
                      },
                      "min_value": {
                        "type": "number",
                        "description": "Lowest value of a hierarchy chart's color scale."
                      },
                      "max_value": {
                        "type": "number",
                        "description": "Highest value of a hierarchy chart's color scale."
                      },
                      "link_template": {
                        "type": "string",
                        "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
                      },
                      "y_axis_min": {
                        "type": "number",
                        "description": "Lowest value on the Y axis."
                      },
                      "y_axis_max": {
                        "type": "number",
                        "description": "Highest value on the Y axis."
                      },
                      "y_axis_auto_range": {
                        "type": "string",
                        "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
                      },
                      "y_axis_scale": {
                        "type": "string",
                        "description": "Scale of the Y axis. Usually `linear` or `log`."
                      },
                      "min": {
                        "type": "number",
                        "description": "Lower bound of a gauge."
                      },
                      "max": {
                        "type": "number",
                        "description": "Upper bound of a gauge, the goal value."
                      },
                      "treat_missing_values": {
                        "type": "string",
                        "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
                      },
                      "stacking": {
                        "type": "string",
                        "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
                      },
                      "orientation": {
                        "type": "string",
                        "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
                      },
                      "legend": {
                        "type": "string",
                        "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
                      },
                      "series_colors": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
                      },
                      "series_order": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Order the series are shown in, by name."
                      },
                      "show_previous_period": {
                        "type": "boolean",
                        "description": "Whether a line chart also shows the previous period."
                      },
                      "color_mode": {
                        "type": "string",
                        "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
                      },
                      "color_upper_threshold": {
                        "type": "number",
                        "description": "Upper threshold of a number chart's colors."
                      },
                      "color_lower_threshold": {
                        "type": "number",
                        "description": "Lower threshold of a number chart's colors."
                      },
                      "color_green_words": {
                        "type": "string",
                        "description": "Values a number chart shows in green, separated by commas."
                      },
                      "color_yellow_words": {
                        "type": "string",
                        "description": "Values a number chart shows in yellow, separated by commas."
                      },
                      "color_red_words": {
                        "type": "string",
                        "description": "Values a number chart shows in red, separated by commas."
                      },
                      "column_units": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "unit": {
                              "type": "string",
                              "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                            },
                            "custom_unit": {
                              "type": "boolean",
                              "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                            }
                          }
                        },
                        "description": "Unit of each table column, by column name."
                      },
                      "percentage_highlight_columns": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Table columns holding ratios from 0 to 1, shown with a bar."
                      },
                      "series_unit": {
                        "type": "string",
                        "description": "Unit of a heatmap's Y axis labels."
                      },
                      "series_custom_unit": {
                        "type": "boolean",
                        "description": "Whether `series_unit` is your own suffix."
                      },
                      "heatmap_color_mode": {
                        "type": "string",
                        "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
                      },
                      "value_categories": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "description": "Text shown for the value."
                            },
                            "color": {
                              "type": "string",
                              "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                            }
                          }
                        },
                        "description": "Label and color of each cell value of a categorized heatmap."
                      },
                      "column_widths": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "number"
                        },
                        "description": "Width of each table column, by column name, as the chart editor saves it."
                      },
                      "table_width": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Width of the table the `column_widths` were saved for."
                      },
                      "guessed_series_colors": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Colors the chart picked for its series, keyed by `series_name`."
                      },
                      "label": {
                        "type": "string",
                        "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
                      },
                      "text": {
                        "type": "string",
                        "description": "Markdown text of a text chart."
                      },
                      "rowTemplates": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Live tail row format of each source, by source ID."
                      },
                      "sampling": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Percentage of data the chart samples."
                      },
                      "fresh": {
                        "type": "boolean",
                        "description": "Whether the chart skips cached results."
                      },
                      "funnel_unit_name": {
                        "type": "string",
                        "description": "Word a funnel chart counts in, such as `people`."
                      },
                      "filtered_series": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Series the chart shows, by name."
                      },
                      "filtered_releases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Releases the chart shows."
                      },
                      "force_source_series": {
                        "type": "boolean",
                        "description": "Whether the chart shows one series per source."
                      },
                      "treat_zero_values": {
                        "type": "string",
                        "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
                      },
                      "projection": {
                        "type": "string",
                        "description": "Map projection of a map chart, such as `mercator`."
                      },
                      "published_format": {
                        "type": "string",
                        "description": "Format a published chart is served in, `json` by default."
                      },
                      "published_cache_for": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Seconds a published chart's results are cached, 3 by default."
                      },
                      "y_axis_annotations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "number",
                              "description": "The Y axis value the line is drawn at."
                            },
                            "label": {
                              "type": "string",
                              "description": "Text shown next to the line."
                            },
                            "color": {
                              "type": "string",
                              "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                            }
                          }
                        },
                        "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
                      },
                      "x_axis_annotations": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "description": "The X axis value the line is drawn at, a time or a number."
                            },
                            "label": {
                              "type": "string",
                              "description": "Text shown next to the line."
                            },
                            "color": {
                              "type": "string",
                              "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                            }
                          }
                        },
                        "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
                      }
                    },
                    "description": "Display settings for the chart type, such as unit, axes, legend, stacking and decimal places. An update replaces all of them."
                  }
                },
                "description": "Chart settings. `chart_type` is required on create. A funnel's `settings` accept `funnel_unit_name`, the word the chart counts in. The chart is always placed at `x: 0, y: 0, w: 12, h: 10`, and its name comes from the exploration's name. Returned without an `id`.",
                "examples": [
                  {
                    "chart_type": "line_chart",
                    "name": "Error Rate Analysis",
                    "description": "Shows error rates across all services",
                    "settings": {
                      "unit": "number",
                      "decimal_places": 2,
                      "legend": "shown_below",
                      "stacking": "dont_stack",
                      "x_axis_type": "time"
                    }
                  }
                ]
              },
              "queries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The query's ID.",
                      "readOnly": true
                    },
                    "query_type": {
                      "type": "string",
                      "enum": [
                        "sql_expression",
                        "tail_query",
                        "static_text",
                        "pql_expression",
                        "tail_query_builder",
                        "query_builder",
                        "funnel_query"
                      ],
                      "description": "Query type. A read-only query can't be edited, only replaced with a writable one. Responses can also hold `promql_query`, `promql_v2_query` and `promql_via_llm` for queries made in the web app.\n\n- `sql_expression`: A query written in SQL. You can write it through the API.\n- `tail_query`: The filter of a tail chart. You can write it through the API.\n- `static_text`: The text of a `static_text_chart`. You can write it through the API.\n- `pql_expression`: A query written in PQL. Read-only.\n- `tail_query_builder`: A tail chart's query made in the query builder. Read-only.\n- `query_builder`: A query made in the query builder. Read-only.\n- `funnel_query`: A funnel's one query. You can write it through the API.",
                      "x-enum-descriptions": {
                        "sql_expression": "A query written in SQL. You can write it through the API.",
                        "tail_query": "The filter of a tail chart. You can write it through the API.",
                        "static_text": "The text of a `static_text_chart`. You can write it through the API.",
                        "pql_expression": "A query written in PQL. Read-only.",
                        "tail_query_builder": "A tail chart's query made in the query builder. Read-only.",
                        "query_builder": "A query made in the query builder. Read-only.",
                        "funnel_query": "A funnel's one query. You can write it through the API."
                      }
                    },
                    "name": {
                      "type": "string",
                      "description": "The query's name."
                    },
                    "sql_query": {
                      "type": "string",
                      "description": "The SQL the query runs. Present for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries, and omitted when not set. Read-only except for `sql_expression`."
                    },
                    "pql_query": {
                      "type": "string",
                      "description": "The PQL the query is written in. Present only for `pql_expression` queries."
                    },
                    "where_condition": {
                      "type": "string",
                      "description": "The query's filter. Present only for `tail_query` and `tail_query_builder` queries, and omitted when not set."
                    },
                    "static_text": {
                      "type": "string",
                      "description": "The query's Markdown content. Present only for `static_text` queries, and omitted when not set."
                    },
                    "source_variable": {
                      "type": "string",
                      "description": "The sources the query reads, either the name of a `source` variable, such as `source`, or `source:` followed by specific sources. Defaults to `source` on create. Omitted when not set."
                    },
                    "x_axis": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "y_axis": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "point_size": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "coordinates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "where": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Where blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "group_by": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "having": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Having blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "order_by": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "explore_block_type": {
                            "type": "string",
                            "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                          },
                          "value": {
                            "type": "string",
                            "description": "The column or field the block reads, such as `dt`."
                          },
                          "type": {
                            "type": "string",
                            "description": "The value's data type, such as `datetime`."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name the block is shown with. The editor shows `value` when it's empty."
                          },
                          "measure": {
                            "type": "string",
                            "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                          },
                          "value_type": {
                            "type": "string",
                            "description": "`rate` to chart the value's rate of change."
                          },
                          "operator": {
                            "type": "string",
                            "description": "The comparison of a filter block."
                          },
                          "operator_symbol": {
                            "type": "string",
                            "description": "The filter block's comparison written as a symbol."
                          },
                          "condition_value": {
                            "type": "string",
                            "description": "The value a filter block compares against."
                          },
                          "series_name": {
                            "type": "string",
                            "description": "The name a Y-axis or coordinates block's series is shown as."
                          },
                          "logical_operator": {
                            "type": "string",
                            "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                          },
                          "direction": {
                            "type": "string",
                            "description": "The sort direction of an order block, `asc` or `desc`."
                          },
                          "interval_seconds": {
                            "type": "integer",
                            "format": "int64",
                            "description": "The time bucket size in seconds, for a time block on the X axis."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                          },
                          "schema": {
                            "type": "string",
                            "description": "The source's storage layout, `row_based` or `column_based`."
                          }
                        }
                      },
                      "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                    },
                    "funnel_query": {
                      "type": "object",
                      "properties": {
                        "steps": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Step name shown on the chart. Defaults to `Step <n>`."
                              },
                              "conditions": {
                                "type": "string",
                                "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                              }
                            },
                            "required": [
                              "conditions"
                            ]
                          },
                          "description": "The funnel's steps in journey order, 2 to 32. An update with `steps` replaces every step."
                        },
                        "session_field": {
                          "type": "string",
                          "description": "Field that ties one journey's events together. Defaults to `session_id`. Use `user.id` to follow an identified user. An empty value resets it to `session_id`."
                        },
                        "breakdown_field": {
                          "type": "string",
                          "description": "Field each step is split by, such as `contexts.browser.name`. An empty value removes the breakdown."
                        },
                        "breakdown": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "description": "The field each step is split by, such as `contexts.browser.name`."
                            },
                            "type": {
                              "type": "string",
                              "description": "The type of the breakdown field, always `string`."
                            }
                          },
                          "description": "The breakdown the funnel is split by, with its field in `value`.",
                          "readOnly": true
                        }
                      },
                      "description": "A funnel's steps, session field and breakdown. Present only for `funnel_query` queries. An update changes only the fields you send."
                    }
                  }
                },
                "description": "The chart's queries, in ID order. Updating an exploration replaces all of its queries. Each query accepts only the keys its `query_type` uses. A `sql_expression` query uses `sql_query` and `source_variable`. A `tail_query` uses `where_condition` and `source_variable`. A `static_text` query uses `static_text`, and a `funnel_query` uses `funnel_query`. A key another type uses, or more than one query on a chart other than `line_chart`, is refused.",
                "examples": [
                  [
                    {
                      "id": "1",
                      "name": "Main Query",
                      "query_type": "sql_expression",
                      "source_variable": "source",
                      "sql_query": "SELECT {{time}} AS time, count(*) AS value FROM {{source}} WHERE time BETWEEN {{start_time}} AND {{end_time}} GROUP BY time"
                    }
                  ]
                ]
              },
              "variables": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The variable's name, used as `{{name}}` in queries."
                    },
                    "variable_type": {
                      "type": "string",
                      "enum": [
                        "source",
                        "date",
                        "datetime",
                        "string",
                        "number",
                        "sql_expression",
                        "select_value",
                        "boolean",
                        "select_with_sql",
                        "multi_select_with_sql",
                        "select_predefined_sql"
                      ],
                      "description": "Variable kind."
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The variable's current values as strings, or an empty array when it has none. For a `source` variable, these are the IDs of the selected sources."
                    },
                    "default_values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The variable's default values as strings, or an empty array when it has none."
                    },
                    "sql_definition": {
                      "type": "string",
                      "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                    },
                    "structured_value": {
                      "type": "object",
                      "properties": {
                        "selected_label": {
                          "type": "string",
                          "description": "Label of the selected value."
                        },
                        "canonicalSourceIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Selected sources of a `source` variable. Source IDs in `values` set them."
                        },
                        "serviceIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Selected services of a `source` variable."
                        },
                        "filters": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "The filter's label, shown in the variable's menu."
                              },
                              "sql": {
                                "type": "string",
                                "description": "A complete query that returns one column with the filter's options."
                              }
                            }
                          },
                          "description": "Saved filters, each a label and the SQL that lists its values."
                        }
                      },
                      "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                    },
                    "allow_multiple_values": {
                      "type": "boolean",
                      "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                    },
                    "source_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "The saved filters of a `select_predefined_sql` variable."
                    },
                    "selected_label": {
                      "type": "string",
                      "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                    }
                  }
                },
                "description": "Template variables, which the queries use by name. See [Query variables](/docs/logs/dashboards/variables/). An update replaces all variables, so a variable you leave out is removed, except the built-in `time`, `start_time`, `end_time` and `source` variables, which always exist. For a variable that already exists, any of `default_values`, `sql_definition` and `structured_value` you leave out keeps its value, unless `variable_type` changes, which clears them. `allow_multiple_values` you leave out keeps its value too. A variable sent without `values` gets empty `values`, except a `source` variable, which keeps its sources when you leave out both `values` and `structured_value`. `sql_definition` applies only to `select_with_sql` and `multi_select_with_sql` variables. `allow_multiple_values` is saved only for `select_value` and `select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails. A `source` variable's values are the IDs of your sources. In a `rum` exploration, pick each source as its web events, `<table_name>:web_events`. A funnel can't have variables, and its source is set in `source_id`.",
                "examples": [
                  [
                    {
                      "name": "log_level",
                      "variable_type": "select_value",
                      "values": [
                        "error",
                        "warning",
                        "info"
                      ],
                      "default_values": [
                        "error"
                      ],
                      "allow_multiple_values": false
                    }
                  ]
                ]
              },
              "product": {
                "type": "string",
                "enum": [
                  "telemetry",
                  "rum"
                ],
                "description": "The Explore the exploration lives in. Leave it out on create to put the exploration in Telemetry's Explore. A funnel over web events goes in RUM's Explore instead. Changing it moves the exploration to the other Explore.",
                "x-enum-descriptions": {
                  "telemetry": "Telemetry's Explore.",
                  "rum": "RUM's Explore, which reads an application's web events only."
                },
                "examples": [
                  "rum"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the exploration was created.",
                "readOnly": true,
                "examples": [
                  "2026-02-20T10:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the exploration was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-02-23T14:30:00.000Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the exploration, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the exploration.",
                "readOnly": true,
                "examples": [
                  "My Team"
                ]
              }
            }
          }
        }
      },
      "ExplorationCreate": {
        "$ref": "#/components/schemas/ExplorationCreateAttributes"
      },
      "ExplorationCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.",
            "examples": [
              "Error Rate Analysis"
            ]
          },
          "date_range_from": {
            "type": "string",
            "description": "Start of the default date range, such as `now-3h`. A funnel's range starts at `now-7d` by default. Once set, it can't be cleared.",
            "default": "now-3h",
            "examples": [
              "now-3h"
            ]
          },
          "date_range_to": {
            "type": "string",
            "description": "End of the default date range, such as `now`. Once set, it can't be cleared.",
            "default": "now",
            "examples": [
              "now"
            ]
          },
          "exploration_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group this exploration belongs to. Send `null` or `\"0\"` to remove it from its group.",
            "examples": [
              "456"
            ]
          },
          "chart": {
            "type": "object",
            "properties": {
              "chart_type": {
                "type": "string",
                "enum": [
                  "line_chart",
                  "table_chart",
                  "bar_chart",
                  "number_chart",
                  "heatmap_chart",
                  "anomalies_chart",
                  "pie_chart",
                  "scatter_chart",
                  "gauge_chart",
                  "tail_chart",
                  "static_text_chart",
                  "map_chart",
                  "text_chart",
                  "funnel_chart",
                  "funnel_trend_chart",
                  "hierarchy_chart"
                ],
                "description": "Chart type. A funnel chart can only be switched to a funnel trend chart, which shows the funnel over time, and back.\n\n- `line_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `table_chart`: Accepts `sql_expression` queries.\n- `bar_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `number_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `heatmap_chart`: Accepts `sql_expression` queries.\n- `anomalies_chart`: Accepts `tail_query` queries.\n- `pie_chart`: Accepts `sql_expression` queries.\n- `scatter_chart`: Accepts `sql_expression` queries.\n- `gauge_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `tail_chart`: Accepts `tail_query` queries.\n- `static_text_chart`: Accepts a `static_text` query.\n- `map_chart`: Accepts `sql_expression` queries.\n- `text_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `funnel_chart`: Accepts a `funnel_query` query.\n- `funnel_trend_chart`: Accepts a `funnel_query` query.\n- `hierarchy_chart`: Accepts `sql_expression` queries.",
                "x-enum-descriptions": {
                  "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "table_chart": "Accepts `sql_expression` queries.",
                  "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "heatmap_chart": "Accepts `sql_expression` queries.",
                  "anomalies_chart": "Accepts `tail_query` queries.",
                  "pie_chart": "Accepts `sql_expression` queries.",
                  "scatter_chart": "Accepts `sql_expression` queries.",
                  "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "tail_chart": "Accepts `tail_query` queries.",
                  "static_text_chart": "Accepts a `static_text` query.",
                  "map_chart": "Accepts `sql_expression` queries.",
                  "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "funnel_chart": "Accepts a `funnel_query` query.",
                  "funnel_trend_chart": "Accepts a `funnel_query` query.",
                  "hierarchy_chart": "Accepts `sql_expression` queries."
                }
              },
              "name": {
                "type": "string",
                "description": "The chart's name. Until you name the exploration, `name` holds a generated name instead.",
                "readOnly": true
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The chart's description, or `null` when it has none."
              },
              "settings": {
                "type": "object",
                "properties": {
                  "unit": {
                    "type": "string",
                    "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
                  },
                  "custom_unit": {
                    "type": "boolean",
                    "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                  },
                  "decimal_places": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Number of decimal places shown."
                  },
                  "time_column": {
                    "type": "string",
                    "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
                  },
                  "x_axis_type": {
                    "type": "string",
                    "description": "How the X axis is read. Usually `time`, `value` or `category`."
                  },
                  "y_axis_type": {
                    "type": "string",
                    "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
                  },
                  "series_column": {
                    "type": "string",
                    "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
                  },
                  "value_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Result columns that hold the values to chart."
                  },
                  "point_size_column": {
                    "type": "string",
                    "description": "Column that sets each point's size on a scatter chart."
                  },
                  "location_column": {
                    "type": "string",
                    "description": "Column holding the location on a map chart."
                  },
                  "location_label": {
                    "type": "string",
                    "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
                  },
                  "label_column": {
                    "type": "string",
                    "description": "Column that names each hexagon on a hierarchy chart."
                  },
                  "group_by_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Up to two columns a hierarchy chart groups its hexagons by."
                  },
                  "palette": {
                    "type": "string",
                    "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
                  },
                  "min_value": {
                    "type": "number",
                    "description": "Lowest value of a hierarchy chart's color scale."
                  },
                  "max_value": {
                    "type": "number",
                    "description": "Highest value of a hierarchy chart's color scale."
                  },
                  "link_template": {
                    "type": "string",
                    "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
                  },
                  "y_axis_min": {
                    "type": "number",
                    "description": "Lowest value on the Y axis."
                  },
                  "y_axis_max": {
                    "type": "number",
                    "description": "Highest value on the Y axis."
                  },
                  "y_axis_auto_range": {
                    "type": "string",
                    "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
                  },
                  "y_axis_scale": {
                    "type": "string",
                    "description": "Scale of the Y axis. Usually `linear` or `log`."
                  },
                  "min": {
                    "type": "number",
                    "description": "Lower bound of a gauge."
                  },
                  "max": {
                    "type": "number",
                    "description": "Upper bound of a gauge, the goal value."
                  },
                  "treat_missing_values": {
                    "type": "string",
                    "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
                  },
                  "stacking": {
                    "type": "string",
                    "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
                  },
                  "orientation": {
                    "type": "string",
                    "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
                  },
                  "legend": {
                    "type": "string",
                    "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
                  },
                  "series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
                  },
                  "series_order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Order the series are shown in, by name."
                  },
                  "show_previous_period": {
                    "type": "boolean",
                    "description": "Whether a line chart also shows the previous period."
                  },
                  "color_mode": {
                    "type": "string",
                    "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
                  },
                  "color_upper_threshold": {
                    "type": "number",
                    "description": "Upper threshold of a number chart's colors."
                  },
                  "color_lower_threshold": {
                    "type": "number",
                    "description": "Lower threshold of a number chart's colors."
                  },
                  "color_green_words": {
                    "type": "string",
                    "description": "Values a number chart shows in green, separated by commas."
                  },
                  "color_yellow_words": {
                    "type": "string",
                    "description": "Values a number chart shows in yellow, separated by commas."
                  },
                  "color_red_words": {
                    "type": "string",
                    "description": "Values a number chart shows in red, separated by commas."
                  },
                  "column_units": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "unit": {
                          "type": "string",
                          "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                        },
                        "custom_unit": {
                          "type": "boolean",
                          "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                        }
                      }
                    },
                    "description": "Unit of each table column, by column name."
                  },
                  "percentage_highlight_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Table columns holding ratios from 0 to 1, shown with a bar."
                  },
                  "series_unit": {
                    "type": "string",
                    "description": "Unit of a heatmap's Y axis labels."
                  },
                  "series_custom_unit": {
                    "type": "boolean",
                    "description": "Whether `series_unit` is your own suffix."
                  },
                  "heatmap_color_mode": {
                    "type": "string",
                    "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
                  },
                  "value_categories": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "Text shown for the value."
                        },
                        "color": {
                          "type": "string",
                          "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                        }
                      }
                    },
                    "description": "Label and color of each cell value of a categorized heatmap."
                  },
                  "column_widths": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Width of each table column, by column name, as the chart editor saves it."
                  },
                  "table_width": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Width of the table the `column_widths` were saved for."
                  },
                  "guessed_series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Colors the chart picked for its series, keyed by `series_name`."
                  },
                  "label": {
                    "type": "string",
                    "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
                  },
                  "text": {
                    "type": "string",
                    "description": "Markdown text of a text chart."
                  },
                  "rowTemplates": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Live tail row format of each source, by source ID."
                  },
                  "sampling": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Percentage of data the chart samples."
                  },
                  "fresh": {
                    "type": "boolean",
                    "description": "Whether the chart skips cached results."
                  },
                  "funnel_unit_name": {
                    "type": "string",
                    "description": "Word a funnel chart counts in, such as `people`."
                  },
                  "filtered_series": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Series the chart shows, by name."
                  },
                  "filtered_releases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Releases the chart shows."
                  },
                  "force_source_series": {
                    "type": "boolean",
                    "description": "Whether the chart shows one series per source."
                  },
                  "treat_zero_values": {
                    "type": "string",
                    "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
                  },
                  "projection": {
                    "type": "string",
                    "description": "Map projection of a map chart, such as `mercator`."
                  },
                  "published_format": {
                    "type": "string",
                    "description": "Format a published chart is served in, `json` by default."
                  },
                  "published_cache_for": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds a published chart's results are cached, 3 by default."
                  },
                  "y_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "description": "The Y axis value the line is drawn at."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
                  },
                  "x_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The X axis value the line is drawn at, a time or a number."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
                  }
                },
                "description": "Display settings for the chart type, such as unit, axes, legend, stacking and decimal places. An update replaces all of them."
              }
            },
            "description": "Chart settings. `chart_type` is required on create. A funnel's `settings` accept `funnel_unit_name`, the word the chart counts in. The chart is always placed at `x: 0, y: 0, w: 12, h: 10`, and its name comes from the exploration's name. Returned without an `id`.",
            "examples": [
              {
                "chart_type": "line_chart",
                "name": "Error Rate Analysis",
                "description": "Shows error rates across all services",
                "settings": {
                  "unit": "number",
                  "decimal_places": 2,
                  "legend": "shown_below",
                  "stacking": "dont_stack",
                  "x_axis_type": "time"
                }
              }
            ]
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The query's ID.",
                  "readOnly": true
                },
                "query_type": {
                  "type": "string",
                  "enum": [
                    "sql_expression",
                    "tail_query",
                    "static_text",
                    "pql_expression",
                    "tail_query_builder",
                    "query_builder",
                    "funnel_query"
                  ],
                  "description": "Query type. A read-only query can't be edited, only replaced with a writable one. Responses can also hold `promql_query`, `promql_v2_query` and `promql_via_llm` for queries made in the web app.\n\n- `sql_expression`: A query written in SQL. You can write it through the API.\n- `tail_query`: The filter of a tail chart. You can write it through the API.\n- `static_text`: The text of a `static_text_chart`. You can write it through the API.\n- `pql_expression`: A query written in PQL. Read-only.\n- `tail_query_builder`: A tail chart's query made in the query builder. Read-only.\n- `query_builder`: A query made in the query builder. Read-only.\n- `funnel_query`: A funnel's one query. You can write it through the API.",
                  "x-enum-descriptions": {
                    "sql_expression": "A query written in SQL. You can write it through the API.",
                    "tail_query": "The filter of a tail chart. You can write it through the API.",
                    "static_text": "The text of a `static_text_chart`. You can write it through the API.",
                    "pql_expression": "A query written in PQL. Read-only.",
                    "tail_query_builder": "A tail chart's query made in the query builder. Read-only.",
                    "query_builder": "A query made in the query builder. Read-only.",
                    "funnel_query": "A funnel's one query. You can write it through the API."
                  }
                },
                "name": {
                  "type": "string",
                  "description": "The query's name."
                },
                "sql_query": {
                  "type": "string",
                  "description": "The SQL the query runs. Present for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries, and omitted when not set. Read-only except for `sql_expression`."
                },
                "pql_query": {
                  "type": "string",
                  "description": "The PQL the query is written in. Present only for `pql_expression` queries."
                },
                "where_condition": {
                  "type": "string",
                  "description": "The query's filter. Present only for `tail_query` and `tail_query_builder` queries, and omitted when not set."
                },
                "static_text": {
                  "type": "string",
                  "description": "The query's Markdown content. Present only for `static_text` queries, and omitted when not set."
                },
                "source_variable": {
                  "type": "string",
                  "description": "The sources the query reads, either the name of a `source` variable, such as `source`, or `source:` followed by specific sources. Defaults to `source` on create. Omitted when not set."
                },
                "x_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "y_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "point_size": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "coordinates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "where": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Where blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "group_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "having": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Having blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "order_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "funnel_query": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Step name shown on the chart. Defaults to `Step <n>`."
                          },
                          "conditions": {
                            "type": "string",
                            "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                          }
                        },
                        "required": [
                          "conditions"
                        ]
                      },
                      "description": "The funnel's steps in journey order, 2 to 32. An update with `steps` replaces every step."
                    },
                    "session_field": {
                      "type": "string",
                      "description": "Field that ties one journey's events together. Defaults to `session_id`. Use `user.id` to follow an identified user. An empty value resets it to `session_id`."
                    },
                    "breakdown_field": {
                      "type": "string",
                      "description": "Field each step is split by, such as `contexts.browser.name`. An empty value removes the breakdown."
                    },
                    "breakdown": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The field each step is split by, such as `contexts.browser.name`."
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of the breakdown field, always `string`."
                        }
                      },
                      "description": "The breakdown the funnel is split by, with its field in `value`.",
                      "readOnly": true
                    }
                  },
                  "description": "A funnel's steps, session field and breakdown. Present only for `funnel_query` queries. An update changes only the fields you send."
                }
              }
            },
            "description": "The chart's queries, in ID order. Updating an exploration replaces all of its queries. Each query accepts only the keys its `query_type` uses. A `sql_expression` query uses `sql_query` and `source_variable`. A `tail_query` uses `where_condition` and `source_variable`. A `static_text` query uses `static_text`, and a `funnel_query` uses `funnel_query`. A key another type uses, or more than one query on a chart other than `line_chart`, is refused.",
            "examples": [
              [
                {
                  "id": "1",
                  "name": "Main Query",
                  "query_type": "sql_expression",
                  "source_variable": "source",
                  "sql_query": "SELECT {{time}} AS time, count(*) AS value FROM {{source}} WHERE time BETWEEN {{start_time}} AND {{end_time}} GROUP BY time"
                }
              ]
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The variable's name, used as `{{name}}` in queries."
                },
                "variable_type": {
                  "type": "string",
                  "enum": [
                    "source",
                    "date",
                    "datetime",
                    "string",
                    "number",
                    "sql_expression",
                    "select_value",
                    "boolean",
                    "select_with_sql",
                    "multi_select_with_sql",
                    "select_predefined_sql"
                  ],
                  "description": "Variable kind."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's current values as strings, or an empty array when it has none. For a `source` variable, these are the IDs of the selected sources."
                },
                "default_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's default values as strings, or an empty array when it has none."
                },
                "sql_definition": {
                  "type": "string",
                  "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                },
                "structured_value": {
                  "type": "object",
                  "properties": {
                    "selected_label": {
                      "type": "string",
                      "description": "Label of the selected value."
                    },
                    "canonicalSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected sources of a `source` variable. Source IDs in `values` set them."
                    },
                    "serviceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected services of a `source` variable."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "Saved filters, each a label and the SQL that lists its values."
                    }
                  },
                  "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                },
                "allow_multiple_values": {
                  "type": "boolean",
                  "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The filter's label, shown in the variable's menu."
                      },
                      "sql": {
                        "type": "string",
                        "description": "A complete query that returns one column with the filter's options."
                      }
                    }
                  },
                  "description": "The saved filters of a `select_predefined_sql` variable."
                },
                "selected_label": {
                  "type": "string",
                  "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                }
              }
            },
            "description": "Template variables, which the queries use by name. See [Query variables](/docs/logs/dashboards/variables/). An update replaces all variables, so a variable you leave out is removed, except the built-in `time`, `start_time`, `end_time` and `source` variables, which always exist. For a variable that already exists, any of `default_values`, `sql_definition` and `structured_value` you leave out keeps its value, unless `variable_type` changes, which clears them. `allow_multiple_values` you leave out keeps its value too. A variable sent without `values` gets empty `values`, except a `source` variable, which keeps its sources when you leave out both `values` and `structured_value`. `sql_definition` applies only to `select_with_sql` and `multi_select_with_sql` variables. `allow_multiple_values` is saved only for `select_value` and `select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails. A `source` variable's values are the IDs of your sources. In a `rum` exploration, pick each source as its web events, `<table_name>:web_events`. A funnel can't have variables, and its source is set in `source_id`.",
            "examples": [
              [
                {
                  "name": "log_level",
                  "variable_type": "select_value",
                  "values": [
                    "error",
                    "warning",
                    "info"
                  ],
                  "default_values": [
                    "error"
                  ],
                  "allow_multiple_values": false
                }
              ]
            ]
          },
          "source_id": {
            "type": "string",
            "description": "ID of the source a funnel reads. Required when creating a funnel, and accepted only then. Other explorations pick their sources in the `source` variable.",
            "writeOnly": true,
            "examples": [
              "3769"
            ]
          },
          "source_type": {
            "type": "string",
            "enum": [
              "web_events",
              "logs",
              "spans"
            ],
            "description": "The events a funnel reads from its source. When `source_type` is left out or the source doesn't have those events, the funnel reads the first of web events, logs and spans that the source has.",
            "writeOnly": true,
            "examples": [
              "web_events"
            ]
          },
          "product": {
            "type": "string",
            "enum": [
              "telemetry",
              "rum"
            ],
            "description": "The Explore the exploration lives in. Leave it out on create to put the exploration in Telemetry's Explore. A funnel over web events goes in RUM's Explore instead. Changing it moves the exploration to the other Explore.",
            "x-enum-descriptions": {
              "telemetry": "Telemetry's Explore.",
              "rum": "RUM's Explore, which reads an application's web events only."
            },
            "examples": [
              "rum"
            ]
          }
        },
        "required": [
          "name",
          "chart",
          "queries"
        ]
      },
      "ExplorationDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Exploration"
          }
        }
      },
      "ExplorationGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The exploration_group's id."
          },
          "type": {
            "type": "string",
            "const": "exploration_group"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Group name.",
                "examples": [
                  "Production Monitoring"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the group was created.",
                "readOnly": true,
                "examples": [
                  "2026-02-20T10:00:00.000Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the group was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-02-23T14:30:00.000Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the group, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the group.",
                "readOnly": true,
                "examples": [
                  "My Team"
                ]
              }
            }
          }
        }
      },
      "ExplorationGroupCreate": {
        "$ref": "#/components/schemas/ExplorationGroupCreateAttributes"
      },
      "ExplorationGroupCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Production Monitoring"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "ExplorationGroupDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExplorationGroup"
          }
        }
      },
      "ExplorationGroupList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExplorationGroup"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "ExplorationGroupUpdate": {
        "$ref": "#/components/schemas/ExplorationGroupUpdateAttributes"
      },
      "ExplorationGroupUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Production Monitoring"
            ]
          }
        }
      },
      "ExplorationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Exploration"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "ExplorationUpdate": {
        "$ref": "#/components/schemas/ExplorationUpdateAttributes"
      },
      "ExplorationUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Exploration name. Until you name the exploration, a name generated from its query is returned. The chart is named after the exploration, so you never send a chart name.",
            "examples": [
              "Error Rate Analysis"
            ]
          },
          "date_range_from": {
            "type": "string",
            "description": "Start of the default date range, such as `now-3h`. A funnel's range starts at `now-7d` by default. Once set, it can't be cleared.",
            "default": "now-3h",
            "examples": [
              "now-3h"
            ]
          },
          "date_range_to": {
            "type": "string",
            "description": "End of the default date range, such as `now`. Once set, it can't be cleared.",
            "default": "now",
            "examples": [
              "now"
            ]
          },
          "exploration_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group this exploration belongs to. Send `null` or `\"0\"` to remove it from its group.",
            "examples": [
              "456"
            ]
          },
          "chart": {
            "type": "object",
            "properties": {
              "chart_type": {
                "type": "string",
                "enum": [
                  "line_chart",
                  "table_chart",
                  "bar_chart",
                  "number_chart",
                  "heatmap_chart",
                  "anomalies_chart",
                  "pie_chart",
                  "scatter_chart",
                  "gauge_chart",
                  "tail_chart",
                  "static_text_chart",
                  "map_chart",
                  "text_chart",
                  "funnel_chart",
                  "funnel_trend_chart",
                  "hierarchy_chart"
                ],
                "description": "Chart type. A funnel chart can only be switched to a funnel trend chart, which shows the funnel over time, and back.\n\n- `line_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `table_chart`: Accepts `sql_expression` queries.\n- `bar_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `number_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `heatmap_chart`: Accepts `sql_expression` queries.\n- `anomalies_chart`: Accepts `tail_query` queries.\n- `pie_chart`: Accepts `sql_expression` queries.\n- `scatter_chart`: Accepts `sql_expression` queries.\n- `gauge_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `tail_chart`: Accepts `tail_query` queries.\n- `static_text_chart`: Accepts a `static_text` query.\n- `map_chart`: Accepts `sql_expression` queries.\n- `text_chart`: Accepts `sql_expression` and `tail_query` queries.\n- `funnel_chart`: Accepts a `funnel_query` query.\n- `funnel_trend_chart`: Accepts a `funnel_query` query.\n- `hierarchy_chart`: Accepts `sql_expression` queries.",
                "x-enum-descriptions": {
                  "line_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "table_chart": "Accepts `sql_expression` queries.",
                  "bar_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "number_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "heatmap_chart": "Accepts `sql_expression` queries.",
                  "anomalies_chart": "Accepts `tail_query` queries.",
                  "pie_chart": "Accepts `sql_expression` queries.",
                  "scatter_chart": "Accepts `sql_expression` queries.",
                  "gauge_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "tail_chart": "Accepts `tail_query` queries.",
                  "static_text_chart": "Accepts a `static_text` query.",
                  "map_chart": "Accepts `sql_expression` queries.",
                  "text_chart": "Accepts `sql_expression` and `tail_query` queries.",
                  "funnel_chart": "Accepts a `funnel_query` query.",
                  "funnel_trend_chart": "Accepts a `funnel_query` query.",
                  "hierarchy_chart": "Accepts `sql_expression` queries."
                }
              },
              "name": {
                "type": "string",
                "description": "The chart's name. Until you name the exploration, `name` holds a generated name instead.",
                "readOnly": true
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The chart's description, or `null` when it has none."
              },
              "settings": {
                "type": "object",
                "properties": {
                  "unit": {
                    "type": "string",
                    "description": "Unit the values are shown in, such as `percent`, `bytes` or `ms`. Table charts use `column_units` instead."
                  },
                  "custom_unit": {
                    "type": "boolean",
                    "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                  },
                  "decimal_places": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Number of decimal places shown."
                  },
                  "time_column": {
                    "type": "string",
                    "description": "Column on the X axis, `time` by default. For a category bar chart it's the grouping column."
                  },
                  "x_axis_type": {
                    "type": "string",
                    "description": "How the X axis is read. Usually `time`, `value` or `category`."
                  },
                  "y_axis_type": {
                    "type": "string",
                    "description": "How the Y axis of a scatter chart is read. Usually `value` or `category`."
                  },
                  "series_column": {
                    "type": "string",
                    "description": "Column that splits the data into series. On a heatmap it's the Y axis column."
                  },
                  "value_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Result columns that hold the values to chart."
                  },
                  "point_size_column": {
                    "type": "string",
                    "description": "Column that sets each point's size on a scatter chart."
                  },
                  "location_column": {
                    "type": "string",
                    "description": "Column holding the location on a map chart."
                  },
                  "location_label": {
                    "type": "string",
                    "description": "What a map chart's tooltip names, either the closest city or country or the value as sent. Usually `automatic` or `original_value`."
                  },
                  "label_column": {
                    "type": "string",
                    "description": "Column that names each hexagon on a hierarchy chart."
                  },
                  "group_by_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Up to two columns a hierarchy chart groups its hexagons by."
                  },
                  "palette": {
                    "type": "string",
                    "description": "Color scale of a hierarchy chart. Usually `green_to_red` or `red_to_green`."
                  },
                  "min_value": {
                    "type": "number",
                    "description": "Lowest value of a hierarchy chart's color scale."
                  },
                  "max_value": {
                    "type": "number",
                    "description": "Highest value of a hierarchy chart's color scale."
                  },
                  "link_template": {
                    "type": "string",
                    "description": "Link a hierarchy chart opens when you click a hexagon, with `{{column}}` placeholders."
                  },
                  "y_axis_min": {
                    "type": "number",
                    "description": "Lowest value on the Y axis."
                  },
                  "y_axis_max": {
                    "type": "number",
                    "description": "Highest value on the Y axis."
                  },
                  "y_axis_auto_range": {
                    "type": "string",
                    "description": "How a line chart fits its Y axis when no bounds are set. Usually `include_zero` or `fit_data`."
                  },
                  "y_axis_scale": {
                    "type": "string",
                    "description": "Scale of the Y axis. Usually `linear` or `log`."
                  },
                  "min": {
                    "type": "number",
                    "description": "Lower bound of a gauge."
                  },
                  "max": {
                    "type": "number",
                    "description": "Upper bound of a gauge, the goal value."
                  },
                  "treat_missing_values": {
                    "type": "string",
                    "description": "How gaps in the data are drawn. Usually `connected`, `disconnected`, `zero` or `previous`."
                  },
                  "stacking": {
                    "type": "string",
                    "description": "How series are stacked. Usually `dont_stack`, `stack` or `stack_to_100`."
                  },
                  "orientation": {
                    "type": "string",
                    "description": "Direction of the bars on a bar chart. Usually `vertical` or `horizontal`."
                  },
                  "legend": {
                    "type": "string",
                    "description": "Where the legend is shown. Usually `hidden`, `shown_below`, `shown_below_with_statistics` or `shown_right`."
                  },
                  "series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Color of each series, keyed by its `series_name`, as a hex color such as `#22c55e`."
                  },
                  "series_order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Order the series are shown in, by name."
                  },
                  "show_previous_period": {
                    "type": "boolean",
                    "description": "Whether a line chart also shows the previous period."
                  },
                  "color_mode": {
                    "type": "string",
                    "description": "How a number chart colors its value. Usually `auto`, `high_green`, `high_red` or `specific_words`."
                  },
                  "color_upper_threshold": {
                    "type": "number",
                    "description": "Upper threshold of a number chart's colors."
                  },
                  "color_lower_threshold": {
                    "type": "number",
                    "description": "Lower threshold of a number chart's colors."
                  },
                  "color_green_words": {
                    "type": "string",
                    "description": "Values a number chart shows in green, separated by commas."
                  },
                  "color_yellow_words": {
                    "type": "string",
                    "description": "Values a number chart shows in yellow, separated by commas."
                  },
                  "color_red_words": {
                    "type": "string",
                    "description": "Values a number chart shows in red, separated by commas."
                  },
                  "column_units": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "unit": {
                          "type": "string",
                          "description": "Unit the column's values are shown in, such as `auto`, `percent` or `bytes`."
                        },
                        "custom_unit": {
                          "type": "boolean",
                          "description": "Whether `unit` is your own suffix, shown after the value as written and never scaled."
                        }
                      }
                    },
                    "description": "Unit of each table column, by column name."
                  },
                  "percentage_highlight_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Table columns holding ratios from 0 to 1, shown with a bar."
                  },
                  "series_unit": {
                    "type": "string",
                    "description": "Unit of a heatmap's Y axis labels."
                  },
                  "series_custom_unit": {
                    "type": "boolean",
                    "description": "Whether `series_unit` is your own suffix."
                  },
                  "heatmap_color_mode": {
                    "type": "string",
                    "description": "How a heatmap colors its cells. Usually `gradient` or `categorized`."
                  },
                  "value_categories": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "Text shown for the value."
                        },
                        "color": {
                          "type": "string",
                          "description": "Color of the cells with the value, as a hex color such as `#22c55e`."
                        }
                      }
                    },
                    "description": "Label and color of each cell value of a categorized heatmap."
                  },
                  "column_widths": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Width of each table column, by column name, as the chart editor saves it."
                  },
                  "table_width": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Width of the table the `column_widths` were saved for."
                  },
                  "guessed_series_colors": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Colors the chart picked for its series, keyed by `series_name`."
                  },
                  "label": {
                    "type": "string",
                    "description": "A legend placement the chart editor saves next to `legend`, such as `shown_below`. Charts ignore it and place the legend by `legend`."
                  },
                  "text": {
                    "type": "string",
                    "description": "Markdown text of a text chart."
                  },
                  "rowTemplates": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Live tail row format of each source, by source ID."
                  },
                  "sampling": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Percentage of data the chart samples."
                  },
                  "fresh": {
                    "type": "boolean",
                    "description": "Whether the chart skips cached results."
                  },
                  "funnel_unit_name": {
                    "type": "string",
                    "description": "Word a funnel chart counts in, such as `people`."
                  },
                  "filtered_series": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Series the chart shows, by name."
                  },
                  "filtered_releases": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Releases the chart shows."
                  },
                  "force_source_series": {
                    "type": "boolean",
                    "description": "Whether the chart shows one series per source."
                  },
                  "treat_zero_values": {
                    "type": "string",
                    "description": "How zero values are drawn, `keep` or `drop_disconnected`. Defaults to `keep`."
                  },
                  "projection": {
                    "type": "string",
                    "description": "Map projection of a map chart, such as `mercator`."
                  },
                  "published_format": {
                    "type": "string",
                    "description": "Format a published chart is served in, `json` by default."
                  },
                  "published_cache_for": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Seconds a published chart's results are cached, 3 by default."
                  },
                  "y_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "description": "The Y axis value the line is drawn at."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Horizontal lines drawn at values on the Y axis, each with a label and color."
                  },
                  "x_axis_annotations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The X axis value the line is drawn at, a time or a number."
                        },
                        "label": {
                          "type": "string",
                          "description": "Text shown next to the line."
                        },
                        "color": {
                          "type": "string",
                          "description": "The line's color, as a hex color such as `#22c55e`. Left out, the line is gray."
                        }
                      }
                    },
                    "description": "Vertical lines drawn at values on the X axis, each with a label and color. A value is a time or a number, as the X axis reads it."
                  }
                },
                "description": "Display settings for the chart type, such as unit, axes, legend, stacking and decimal places. An update replaces all of them."
              }
            },
            "description": "Chart settings. `chart_type` is required on create. A funnel's `settings` accept `funnel_unit_name`, the word the chart counts in. The chart is always placed at `x: 0, y: 0, w: 12, h: 10`, and its name comes from the exploration's name. Returned without an `id`.",
            "examples": [
              {
                "chart_type": "line_chart",
                "name": "Error Rate Analysis",
                "description": "Shows error rates across all services",
                "settings": {
                  "unit": "number",
                  "decimal_places": 2,
                  "legend": "shown_below",
                  "stacking": "dont_stack",
                  "x_axis_type": "time"
                }
              }
            ]
          },
          "queries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The query's ID.",
                  "readOnly": true
                },
                "query_type": {
                  "type": "string",
                  "enum": [
                    "sql_expression",
                    "tail_query",
                    "static_text",
                    "pql_expression",
                    "tail_query_builder",
                    "query_builder",
                    "funnel_query"
                  ],
                  "description": "Query type. A read-only query can't be edited, only replaced with a writable one. Responses can also hold `promql_query`, `promql_v2_query` and `promql_via_llm` for queries made in the web app.\n\n- `sql_expression`: A query written in SQL. You can write it through the API.\n- `tail_query`: The filter of a tail chart. You can write it through the API.\n- `static_text`: The text of a `static_text_chart`. You can write it through the API.\n- `pql_expression`: A query written in PQL. Read-only.\n- `tail_query_builder`: A tail chart's query made in the query builder. Read-only.\n- `query_builder`: A query made in the query builder. Read-only.\n- `funnel_query`: A funnel's one query. You can write it through the API.",
                  "x-enum-descriptions": {
                    "sql_expression": "A query written in SQL. You can write it through the API.",
                    "tail_query": "The filter of a tail chart. You can write it through the API.",
                    "static_text": "The text of a `static_text_chart`. You can write it through the API.",
                    "pql_expression": "A query written in PQL. Read-only.",
                    "tail_query_builder": "A tail chart's query made in the query builder. Read-only.",
                    "query_builder": "A query made in the query builder. Read-only.",
                    "funnel_query": "A funnel's one query. You can write it through the API."
                  }
                },
                "name": {
                  "type": "string",
                  "description": "The query's name."
                },
                "sql_query": {
                  "type": "string",
                  "description": "The SQL the query runs. Present for `sql_expression`, `pql_expression`, `query_builder`, `tail_query_builder` and `funnel_query` queries, and omitted when not set. Read-only except for `sql_expression`."
                },
                "pql_query": {
                  "type": "string",
                  "description": "The PQL the query is written in. Present only for `pql_expression` queries."
                },
                "where_condition": {
                  "type": "string",
                  "description": "The query's filter. Present only for `tail_query` and `tail_query_builder` queries, and omitted when not set."
                },
                "static_text": {
                  "type": "string",
                  "description": "The query's Markdown content. Present only for `static_text` queries, and omitted when not set."
                },
                "source_variable": {
                  "type": "string",
                  "description": "The sources the query reads, either the name of a `source` variable, such as `source`, or `source:` followed by specific sources. Defaults to `source` on create. Omitted when not set."
                },
                "x_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "X-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "y_axis": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Y-axis blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "point_size": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Point size blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "coordinates": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Coordinate blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Filter blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "where": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Where blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "group_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Grouping blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "having": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Having blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "order_by": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "explore_block_type": {
                        "type": "string",
                        "description": "What the block reads, such as `count`, `field`, `json_value`, `json_value_from_column`, `special_column`, `virtual_field` or `search`."
                      },
                      "value": {
                        "type": "string",
                        "description": "The column or field the block reads, such as `dt`."
                      },
                      "type": {
                        "type": "string",
                        "description": "The value's data type, such as `datetime`."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name the block is shown with. The editor shows `value` when it's empty."
                      },
                      "measure": {
                        "type": "string",
                        "description": "The aggregation applied to the value, such as `avg`, `count`, `uniq`, `max`, `min`, `sum` or `p95`."
                      },
                      "value_type": {
                        "type": "string",
                        "description": "`rate` to chart the value's rate of change."
                      },
                      "operator": {
                        "type": "string",
                        "description": "The comparison of a filter block."
                      },
                      "operator_symbol": {
                        "type": "string",
                        "description": "The filter block's comparison written as a symbol."
                      },
                      "condition_value": {
                        "type": "string",
                        "description": "The value a filter block compares against."
                      },
                      "series_name": {
                        "type": "string",
                        "description": "The name a Y-axis or coordinates block's series is shown as."
                      },
                      "logical_operator": {
                        "type": "string",
                        "description": "How a filter block joins the filters before it, `and` or `or`. Defaults to `and`."
                      },
                      "direction": {
                        "type": "string",
                        "description": "The sort direction of an order block, `asc` or `desc`."
                      },
                      "interval_seconds": {
                        "type": "integer",
                        "format": "int64",
                        "description": "The time bucket size in seconds, for a time block on the X axis."
                      },
                      "kind": {
                        "type": "string",
                        "description": "`metric` for an aggregated value, or `label` for a raw dimension."
                      },
                      "schema": {
                        "type": "string",
                        "description": "The source's storage layout, `row_based` or `column_based`."
                      }
                    }
                  },
                  "description": "Ordering blocks of a `query_builder` or `tail_query_builder` query. Read-only."
                },
                "funnel_query": {
                  "type": "object",
                  "properties": {
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Step name shown on the chart. Defaults to `Step <n>`."
                          },
                          "conditions": {
                            "type": "string",
                            "description": "Live tail query that the step's events match, such as `payload.meta.path=\"/cart\"`."
                          }
                        },
                        "required": [
                          "conditions"
                        ]
                      },
                      "description": "The funnel's steps in journey order, 2 to 32. An update with `steps` replaces every step."
                    },
                    "session_field": {
                      "type": "string",
                      "description": "Field that ties one journey's events together. Defaults to `session_id`. Use `user.id` to follow an identified user. An empty value resets it to `session_id`."
                    },
                    "breakdown_field": {
                      "type": "string",
                      "description": "Field each step is split by, such as `contexts.browser.name`. An empty value removes the breakdown."
                    },
                    "breakdown": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "string",
                          "description": "The field each step is split by, such as `contexts.browser.name`."
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of the breakdown field, always `string`."
                        }
                      },
                      "description": "The breakdown the funnel is split by, with its field in `value`.",
                      "readOnly": true
                    }
                  },
                  "description": "A funnel's steps, session field and breakdown. Present only for `funnel_query` queries. An update changes only the fields you send."
                }
              }
            },
            "description": "The chart's queries, in ID order. Updating an exploration replaces all of its queries. Each query accepts only the keys its `query_type` uses. A `sql_expression` query uses `sql_query` and `source_variable`. A `tail_query` uses `where_condition` and `source_variable`. A `static_text` query uses `static_text`, and a `funnel_query` uses `funnel_query`. A key another type uses, or more than one query on a chart other than `line_chart`, is refused.",
            "examples": [
              [
                {
                  "id": "1",
                  "name": "Main Query",
                  "query_type": "sql_expression",
                  "source_variable": "source",
                  "sql_query": "SELECT {{time}} AS time, count(*) AS value FROM {{source}} WHERE time BETWEEN {{start_time}} AND {{end_time}} GROUP BY time"
                }
              ]
            ]
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The variable's name, used as `{{name}}` in queries."
                },
                "variable_type": {
                  "type": "string",
                  "enum": [
                    "source",
                    "date",
                    "datetime",
                    "string",
                    "number",
                    "sql_expression",
                    "select_value",
                    "boolean",
                    "select_with_sql",
                    "multi_select_with_sql",
                    "select_predefined_sql"
                  ],
                  "description": "Variable kind."
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's current values as strings, or an empty array when it has none. For a `source` variable, these are the IDs of the selected sources."
                },
                "default_values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The variable's default values as strings, or an empty array when it has none."
                },
                "sql_definition": {
                  "type": "string",
                  "description": "The SQL expression whose distinct values are the options of a `select_with_sql` variable, such as `JSONExtractString(raw, 'service')`. The expression runs against the variable's source over the selected range."
                },
                "structured_value": {
                  "type": "object",
                  "properties": {
                    "selected_label": {
                      "type": "string",
                      "description": "Label of the selected value."
                    },
                    "canonicalSourceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected sources of a `source` variable. Source IDs in `values` set them."
                    },
                    "serviceIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Selected services of a `source` variable."
                    },
                    "filters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "The filter's label, shown in the variable's menu."
                          },
                          "sql": {
                            "type": "string",
                            "description": "A complete query that returns one column with the filter's options."
                          }
                        }
                      },
                      "description": "Saved filters, each a label and the SQL that lists its values."
                    }
                  },
                  "description": "The variable's other settings, such as the selected sources of a `source` variable in `canonicalSourceIds` and its services in `serviceIds`, or the saved filters of a `select_predefined_sql` variable. Left out when not set."
                },
                "allow_multiple_values": {
                  "type": "boolean",
                  "description": "Whether a `select_value` or `select_with_sql` variable accepts more than one value at a time."
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "The IDs of the sources a `source` variable selects. Each must be one of your sources."
                },
                "filters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The filter's label, shown in the variable's menu."
                      },
                      "sql": {
                        "type": "string",
                        "description": "A complete query that returns one column with the filter's options."
                      }
                    }
                  },
                  "description": "The saved filters of a `select_predefined_sql` variable."
                },
                "selected_label": {
                  "type": "string",
                  "description": "The label of the selected filter of a `select_predefined_sql` variable. When not sent, the first filter is selected. A label that matches none of `filters` is refused."
                }
              }
            },
            "description": "Template variables, which the queries use by name. See [Query variables](/docs/logs/dashboards/variables/). An update replaces all variables, so a variable you leave out is removed, except the built-in `time`, `start_time`, `end_time` and `source` variables, which always exist. For a variable that already exists, any of `default_values`, `sql_definition` and `structured_value` you leave out keeps its value, unless `variable_type` changes, which clears them. `allow_multiple_values` you leave out keeps its value too. A variable sent without `values` gets empty `values`, except a `source` variable, which keeps its sources when you leave out both `values` and `structured_value`. `sql_definition` applies only to `select_with_sql` and `multi_select_with_sql` variables. `allow_multiple_values` is saved only for `select_value` and `select_with_sql` variables. When a variable is saved with empty `values`, a `select_value` variable gets the first of its `default_values`, and a `string`, `number`, `boolean` or `sql_expression` variable gets all of them. A `select_with_sql` variable whose `sql_definition` is new or changed gets the first option its SQL returns. An ISO 8601 date in a `date` or `datetime` variable is saved in `values` as a Unix timestamp in microseconds. A new or changed `sql_definition` or filter `sql` runs against the selected source, and the change is refused when the query fails. A `source` variable's values are the IDs of your sources. In a `rum` exploration, pick each source as its web events, `<table_name>:web_events`. A funnel can't have variables, and its source is set in `source_id`.",
            "examples": [
              [
                {
                  "name": "log_level",
                  "variable_type": "select_value",
                  "values": [
                    "error",
                    "warning",
                    "info"
                  ],
                  "default_values": [
                    "error"
                  ],
                  "allow_multiple_values": false
                }
              ]
            ]
          },
          "product": {
            "type": "string",
            "enum": [
              "telemetry",
              "rum"
            ],
            "description": "The Explore the exploration lives in. Leave it out on create to put the exploration in Telemetry's Explore. A funnel over web events goes in RUM's Explore instead. Changing it moves the exploration to the other Explore.",
            "x-enum-descriptions": {
              "telemetry": "Telemetry's Explore.",
              "rum": "RUM's Explore, which reads an application's web events only."
            },
            "examples": [
              "rum"
            ]
          }
        }
      },
      "ExtractedMetric": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The extracted_metric's id."
          },
          "type": {
            "type": "string",
            "const": "metric"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the extracted metric, starting with `m-` for a metric and `g-` for a label, such as `m-123`.",
                "readOnly": true,
                "examples": [
                  "m-123"
                ]
              },
              "name": {
                "type": "string",
                "description": "Metric or label name.",
                "examples": [
                  "level"
                ]
              },
              "sql_expression": {
                "type": "string",
                "description": "SQL expression evaluated for each log. Log fields are in the `raw` JSON field, so read them with `JSONExtract(raw, ..., 'Nullable(Type)')`.",
                "examples": [
                  "JSONExtract(raw, 'level', 'Nullable(String)')"
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "string",
                  "string_low_cardinality",
                  "int64_delta",
                  "int64",
                  "uint64_delta",
                  "uint64",
                  "float64_delta",
                  "datetime64_delta",
                  "boolean"
                ],
                "description": "ClickHouse type the value is stored as.",
                "examples": [
                  "string_low_cardinality"
                ]
              },
              "aggregations": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Aggregations to precompute, `avg`, `count`, `uniq`, `max`, `min`, `sum` or `histogram`. An empty array makes this a label rather than a metric.",
                "examples": [
                  [
                    "avg",
                    "histogram",
                    "min",
                    "max"
                  ]
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the metric's source, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              }
            }
          }
        }
      },
      "ExtractedMetricCreate": {
        "$ref": "#/components/schemas/ExtractedMetricCreateAttributes"
      },
      "ExtractedMetricCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Metric or label name.",
            "examples": [
              "level"
            ]
          },
          "sql_expression": {
            "type": "string",
            "description": "SQL expression evaluated for each log. Log fields are in the `raw` JSON field, so read them with `JSONExtract(raw, ..., 'Nullable(Type)')`.",
            "examples": [
              "JSONExtract(raw, 'level', 'Nullable(String)')"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "string_low_cardinality",
              "int64_delta",
              "int64",
              "uint64_delta",
              "uint64",
              "float64_delta",
              "datetime64_delta",
              "boolean"
            ],
            "description": "ClickHouse type the value is stored as.",
            "examples": [
              "string_low_cardinality"
            ]
          },
          "aggregations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Aggregations to precompute, `avg`, `count`, `uniq`, `max`, `min`, `sum` or `histogram`. An empty array makes this a label rather than a metric.",
            "examples": [
              [
                "avg",
                "histogram",
                "min",
                "max"
              ]
            ]
          },
          "build_type": {
            "type": "string",
            "enum": [
              "new_data",
              "historical_logs"
            ],
            "description": "Whether this change also applies to logs already stored.",
            "x-enum-descriptions": {
              "new_data": "Applies the rule to new logs only.",
              "historical_logs": "Also rebuilds the stored metrics from the retained logs, which is expensive."
            },
            "writeOnly": true,
            "default": "new_data",
            "examples": [
              "new_data"
            ]
          }
        },
        "required": [
          "name",
          "sql_expression"
        ]
      },
      "ExtractedMetricDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ExtractedMetric"
          }
        }
      },
      "ExtractedMetricList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExtractedMetric"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "ExtractedMetricUpdate": {
        "$ref": "#/components/schemas/ExtractedMetricUpdateAttributes"
      },
      "ExtractedMetricUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Metric or label name.",
            "examples": [
              "level"
            ]
          },
          "sql_expression": {
            "type": "string",
            "description": "SQL expression evaluated for each log. Log fields are in the `raw` JSON field, so read them with `JSONExtract(raw, ..., 'Nullable(Type)')`.",
            "examples": [
              "JSONExtract(raw, 'level', 'Nullable(String)')"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "string",
              "string_low_cardinality",
              "int64_delta",
              "int64",
              "uint64_delta",
              "uint64",
              "float64_delta",
              "datetime64_delta",
              "boolean"
            ],
            "description": "ClickHouse type the value is stored as.",
            "examples": [
              "string_low_cardinality"
            ]
          },
          "aggregations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Aggregations to precompute, `avg`, `count`, `uniq`, `max`, `min`, `sum` or `histogram`. An empty array makes this a label rather than a metric.",
            "examples": [
              [
                "avg",
                "histogram",
                "min",
                "max"
              ]
            ]
          },
          "build_type": {
            "type": "string",
            "enum": [
              "new_data",
              "historical_logs"
            ],
            "description": "Whether this change also applies to logs already stored.",
            "x-enum-descriptions": {
              "new_data": "Applies the rule to new logs only.",
              "historical_logs": "Also rebuilds the stored metrics from the retained logs, which is expensive."
            },
            "writeOnly": true,
            "default": "new_data",
            "examples": [
              "new_data"
            ]
          }
        }
      },
      "GcpMetric": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The gcp_metric's id."
          },
          "type": {
            "type": "string",
            "const": "gcp_metric"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "metric_type": {
                "type": "string",
                "description": "Google Cloud metric type, such as `compute.googleapis.com/instance/cpu/utilization`.",
                "readOnly": true,
                "examples": [
                  "compute.googleapis.com/instance/cpu/utilization"
                ]
              },
              "display_name": {
                "type": "string",
                "description": "Name Google Cloud shows for the metric.",
                "readOnly": true,
                "examples": [
                  "CPU utilization"
                ]
              },
              "description": {
                "type": "string",
                "description": "What the metric measures, as Google Cloud describes it.",
                "readOnly": true,
                "examples": [
                  "Fractional utilization of the allocated CPU on this instance."
                ]
              },
              "kind": {
                "type": "string",
                "description": "Google Cloud metric kind, `GAUGE`, `DELTA` or `CUMULATIVE`.",
                "readOnly": true,
                "examples": [
                  "GAUGE"
                ]
              },
              "service_name": {
                "type": "string",
                "description": "Google Cloud service the metric belongs to, such as `compute.googleapis.com`.",
                "readOnly": true,
                "examples": [
                  "compute.googleapis.com"
                ]
              },
              "collected": {
                "type": "boolean",
                "description": "Whether the source's `gcp_metrics_filters` collect this metric. Change them via [Update a source](/docs/logs/api/update-source/).",
                "readOnly": true,
                "examples": [
                  true
                ]
              }
            }
          }
        }
      },
      "GcpMetricList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GcpMetric"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "LogPattern": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The log_pattern's id."
          },
          "type": {
            "type": "string",
            "const": "log_pattern"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "message": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The message of the pattern's latest log in the time range, cut to 1000 characters. `null` when its logs have no `message` field.",
                "readOnly": true,
                "examples": [
                  "Timeout after 500ms while calling payments"
                ]
              },
              "occurrences": {
                "type": "integer",
                "format": "int64",
                "description": "Number of logs with this pattern in the time range.",
                "readOnly": true,
                "examples": [
                  3588
                ]
              },
              "first_seen_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the pattern's first log in the time range was received.",
                "readOnly": true,
                "examples": [
                  "2026-11-22T16:04:00Z"
                ]
              },
              "last_seen_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the pattern's latest log in the time range was received.",
                "readOnly": true,
                "examples": [
                  "2026-11-22T17:03:56Z"
                ]
              },
              "samples": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the step starts."
                    },
                    "count": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Number of logs with this pattern in the step."
                    }
                  }
                },
                "description": "The pattern's count per `step`, oldest first, for each step that has logs. Returned only when `step` is set.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "time": "2026-11-22T16:00:00Z",
                      "count": 1204
                    },
                    {
                      "time": "2026-11-22T16:05:00Z",
                      "count": 1187
                    }
                  ]
                ]
              },
              "logs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "dt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the log was received."
                    },
                    "level": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The log's level, from the first of its `level`, `severity`, `severity_text`, `message.level`, `log.level`, `vercel.level` and `outcome` fields it has. `null` when it has none of them."
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The log's message, cut to 1000 characters. `null` when the log has no `message` field."
                    }
                  }
                },
                "description": "The pattern's 10 newest logs in the time range, newest first. Returned by get only.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "dt": "2026-11-22T17:03:56Z",
                      "level": "error",
                      "message": "Timeout after 500ms while calling payments"
                    }
                  ]
                ]
              }
            }
          }
        }
      },
      "LogPatternDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LogPattern"
          }
        }
      },
      "LogPatternList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogPattern"
            }
          }
        }
      },
      "Metric": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The metric's id."
          },
          "type": {
            "type": "string",
            "const": "source_metric"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Metric name.",
                "readOnly": true,
                "examples": [
                  "http_requests_total"
                ]
              },
              "type": {
                "type": "string",
                "description": "The data type the metric is stored as. Ingested metrics are `float64`. A user-defined metric has the type its definition sets.",
                "readOnly": true,
                "examples": [
                  "float64"
                ]
              },
              "origin": {
                "type": "string",
                "enum": [
                  "ingested",
                  "user-defined"
                ],
                "description": "Where the metric comes from.",
                "x-enum-descriptions": {
                  "ingested": "The metric was sent to Better Stack as a metric.",
                  "user-defined": "The metric is defined from the source's logs."
                },
                "readOnly": true,
                "examples": [
                  "ingested"
                ]
              },
              "layout": {
                "type": "string",
                "enum": [
                  "row-based",
                  "column-based"
                ],
                "description": "How the metric is stored, which decides how to query it.",
                "x-enum-descriptions": {
                  "row-based": "The metric shares the `value_*` columns with other metrics and is selected by `name`.",
                  "column-based": "The metric has columns of its own."
                },
                "readOnly": true,
                "examples": [
                  "row-based"
                ]
              },
              "aggregations": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Aggregations stored for the metric, such as `avg`, `max` and `min`.",
                "readOnly": true,
                "examples": [
                  [
                    "avg",
                    "max",
                    "min"
                  ]
                ]
              },
              "data_points": {
                "type": "integer",
                "format": "int64",
                "description": "Data points received in the last 24 hours.",
                "readOnly": true,
                "examples": [
                  182400
                ]
              },
              "active_series": {
                "type": "integer",
                "format": "int64",
                "description": "Distinct series seen in the last 24 hours.",
                "readOnly": true,
                "examples": [
                  37
                ]
              },
              "sql_expression": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The SQL expression a user-defined metric is defined by. `null` for an ingested metric or one defined by `json_dot_notation`. Returned by get only.",
                "readOnly": true
              },
              "json_dot_notation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The JSON field a user-defined metric is read from, when it's defined that way. Returned by get only.",
                "readOnly": true
              },
              "query_examples": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Expressions to select the metric with in a metrics query. Returned by get only.",
                "readOnly": true,
                "examples": [
                  [
                    "avgMergeIf(value_avg, name = 'http_requests_total')",
                    "avgMergeIf(rate_avg, name = 'http_requests_total')   -- per-second rate, for counters"
                  ]
                ]
              },
              "labels": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Labels seen on an ingested metric in the last 24 hours. `null` for a user-defined metric. Returned by get only.",
                "readOnly": true,
                "examples": [
                  [
                    "host",
                    "method",
                    "status"
                  ]
                ]
              }
            }
          }
        }
      },
      "MetricDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Metric"
          }
        }
      },
      "MetricList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Metric"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "PaginationPageNumber": {
        "type": "object",
        "description": "Pick a page with the `page` and `per_page` query parameters. The response has a `pagination` object with links to the other pages.",
        "properties": {
          "first": {
            "type": "string"
          },
          "last": {
            "type": "string"
          },
          "prev": {
            "type": [
              "string",
              "null"
            ]
          },
          "next": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_count": {
            "type": "integer",
            "description": "How many results the whole list holds, across every page."
          }
        }
      },
      "Service": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The service's id."
          },
          "type": {
            "type": "string",
            "const": "service"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "The ID of the source that detected the service.",
                "readOnly": true,
                "examples": [
                  "123456"
                ]
              },
              "name": {
                "type": "string",
                "description": "The service's name.",
                "readOnly": true,
                "examples": [
                  "checkout"
                ]
              },
              "namespace": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The Kubernetes namespace of a service named `<namespace>/<kind>/<name>`. `null` for other services.",
                "readOnly": true
              },
              "platform": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "What the service runs, such as `postgresql`, `nginx` or `rails`. `null` when it isn't known.",
                "readOnly": true,
                "examples": [
                  "postgresql"
                ]
              },
              "platform_title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The platform's name, such as `PostgreSQL`. `null` when the platform isn't known.",
                "readOnly": true,
                "examples": [
                  "PostgreSQL"
                ]
              },
              "matching": {
                "type": "string",
                "enum": [
                  "exact",
                  "prefix",
                  "workload"
                ],
                "description": "How the name matches the service field of logs, spans and metrics.",
                "x-enum-descriptions": {
                  "exact": "Matches the name itself.",
                  "prefix": "Matches every name that starts with it.",
                  "workload": "Matches a Kubernetes service named `<namespace>/<kind>/<name>` by its full name or by `<name>` alone."
                },
                "readOnly": true,
                "examples": [
                  "exact"
                ]
              },
              "source_types": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The kinds of data the service was seen in, such as `logs`, `spans` or `metrics`.",
                "readOnly": true,
                "examples": [
                  [
                    "logs",
                    "spans"
                  ]
                ]
              },
              "name_fields": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "description": "The fields the service's name is read from, as lists keyed by the kind of data, such as `logs` or `spans`. Set them in the source's settings under **Extract services**.",
                "readOnly": true,
                "examples": [
                  {
                    "logs": [
                      "kubernetes.container_name"
                    ],
                    "spans": [
                      "resource.service.name"
                    ]
                  }
                ]
              },
              "kubernetes_labels": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "The Kubernetes labels of the service's workload, without the ones Kubernetes adds itself, such as `pod-template-hash`. An empty object for a service outside Kubernetes.",
                "readOnly": true,
                "examples": [
                  {
                    "app": "checkout"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the service was first detected.",
                "readOnly": true,
                "examples": [
                  "2026-11-10T08:12:44.123Z"
                ]
              },
              "last_seen_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the service was last seen in the source's data. `null` when it isn't known.",
                "readOnly": true,
                "examples": [
                  "2026-11-22T17:03:56.000Z"
                ]
              }
            }
          }
        }
      },
      "ServiceDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Service"
          }
        }
      },
      "ServiceList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "ServiceMap": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The service_map's id."
          },
          "type": {
            "type": "string",
            "const": "service_map"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "The ID of the source the map is drawn from.",
                "readOnly": true,
                "examples": [
                  "123456"
                ]
              },
              "display_mode": {
                "type": "string",
                "enum": [
                  "services",
                  "hosts"
                ],
                "description": "Whether the map's nodes are services or hosts. A map drawn from traces is always `services`.",
                "readOnly": true,
                "examples": [
                  "services"
                ]
              },
              "nodes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The node's name. The `entry` node is named `Unknown`."
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "service",
                        "host",
                        "database",
                        "queue",
                        "entry"
                      ],
                      "description": "What the node is.\n\n- `service`: A service.\n- `host`: A host.\n- `database`: A database, drawn from the traces of the services that call it.\n- `queue`: A message queue, drawn from the traces of the services that call it.\n- `entry`: Stands for requests from outside the traced services, such as users or callers that send no traces.",
                      "x-enum-descriptions": {
                        "service": "A service.",
                        "host": "A host.",
                        "database": "A database, drawn from the traces of the services that call it.",
                        "queue": "A message queue, drawn from the traces of the services that call it.",
                        "entry": "Stands for requests from outside the traced services, such as users or callers that send no traces."
                      }
                    },
                    "platform": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What the node runs, such as `golang`, `java`, `postgres` or `kafka`, as the collector or the traces report it. `null` when it isn't known, or for a host whose applications run on different platforms."
                    },
                    "containers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The containers of the service, or on the host. On a map drawn from traces, the service's processes."
                    },
                    "listen_addresses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The addresses the node listens on, each an IP address and port. On a map drawn from traces, the host names its callers reach it by."
                    },
                    "requests_per_second": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Average requests per second into the node, summed over its incoming connections. `null` when no incoming requests were measured."
                    },
                    "server_error_share": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Share of the node's incoming requests that failed with a server error, from 0 to 1. `null` when no incoming requests were measured."
                    },
                    "client_error_share": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Share of the node's incoming requests that failed with a client error, from 0 to 1. `null` when no incoming requests were measured."
                    },
                    "outbound_requests_per_second": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Average rate of the requests the node makes, per second, summed over its outgoing connections. `null` when no outgoing requests were measured."
                    }
                  }
                },
                "description": "The services or hosts on the map, sorted by name.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "name": "checkout",
                      "kind": "service",
                      "platform": "golang",
                      "containers": [
                        "checkout"
                      ],
                      "listen_addresses": [
                        "172.19.0.12:5050"
                      ]
                    },
                    {
                      "name": "orders",
                      "kind": "queue",
                      "platform": "kafka",
                      "containers": [],
                      "listen_addresses": []
                    }
                  ]
                ]
              },
              "connections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "description": "The name of the node that makes the calls."
                    },
                    "destination": {
                      "type": "string",
                      "description": "The name of the node called. An outside address is named by its DNS name with the port, or by its IP address and port when DNS gives no name. `unknown` when the address isn't known. On a map drawn from traces, an outside address is the host called."
                    },
                    "destination_address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The IP address and port called. On a map drawn from traces, the host, queue or service called. `null` when it isn't known."
                    },
                    "external": {
                      "type": "boolean",
                      "description": "Whether the destination is an outside address rather than a node on the map."
                    },
                    "protocols": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The protocols seen on the connection, such as `HTTP`, `Postgres`, `Redis` or `Kafka`."
                    },
                    "requests_per_second": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Average requests per second in the time range. `null` when no requests were measured."
                    },
                    "server_error_share": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Share of requests that failed with a server error, from 0 to 1. A server error is an HTTP 5xx response or a gRPC status such as `UNAVAILABLE` or `INTERNAL`. `null` when no requests were measured."
                    },
                    "client_error_share": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Share of requests that failed with a client error, from 0 to 1. A client error is an HTTP 4xx response or any other gRPC status except `OK`. `null` when no requests were measured."
                    },
                    "duration_p50_ms": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Median request duration in milliseconds, as the upper bound of the histogram bucket it falls in. `null` when no durations were measured. When `duration_p50_lower_bound` is `true`, the value is the highest bucket bound and the real duration is higher."
                    },
                    "duration_p95_ms": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "95th percentile of request duration in milliseconds, as the upper bound of the histogram bucket it falls in. `null` when no durations were measured. When `duration_p95_lower_bound` is `true`, the value is the highest bucket bound and the real duration is higher."
                    },
                    "duration_p99_ms": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "99th percentile of request duration in milliseconds, as the upper bound of the histogram bucket it falls in. `null` when no durations were measured. When `duration_p99_lower_bound` is `true`, the value is the highest bucket bound and the real duration is higher."
                    },
                    "duration_p50_lower_bound": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the median is above the histogram's highest bucket bound, so the real value is higher than `duration_p50_ms`. `null` on a map drawn from a collector."
                    },
                    "duration_p95_lower_bound": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the 95th percentile is above the histogram's highest bucket bound, so the real value is higher than `duration_p95_ms`. `null` on a map drawn from a collector."
                    },
                    "duration_p99_lower_bound": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the 99th percentile is above the histogram's highest bucket bound, so the real value is higher than `duration_p99_ms`. `null` on a map drawn from a collector."
                    }
                  }
                },
                "description": "The connections from each node, sorted by `source` and `destination`.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "source": "checkout",
                      "destination": "astronomy-db",
                      "destination_address": "172.19.0.14:5432",
                      "external": false,
                      "protocols": [
                        "Postgres"
                      ],
                      "requests_per_second": 0.041066,
                      "server_error_share": 0,
                      "client_error_share": 0,
                      "duration_p50_ms": 5.0,
                      "duration_p95_ms": 5.0,
                      "duration_p99_ms": 25.0,
                      "duration_p50_lower_bound": null,
                      "duration_p95_lower_bound": null,
                      "duration_p99_lower_bound": null
                    },
                    {
                      "source": "ad",
                      "destination": "flagd",
                      "destination_address": "172.19.0.19:8013",
                      "external": false,
                      "protocols": [
                        "HTTP"
                      ],
                      "requests_per_second": 0.001674,
                      "server_error_share": 0.16665,
                      "client_error_share": 0,
                      "duration_p50_ms": 25.0,
                      "duration_p95_ms": 10000.0,
                      "duration_p99_ms": 10000.0,
                      "duration_p50_lower_bound": null,
                      "duration_p95_lower_bound": null,
                      "duration_p99_lower_bound": null
                    }
                  ]
                ]
              }
            }
          }
        }
      },
      "ServiceMapDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ServiceMap"
          }
        }
      },
      "ServiceOperation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The service_operation's id."
          },
          "type": {
            "type": "string",
            "const": "service_operation"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The span name, as the service sent it.",
                "readOnly": true,
                "examples": [
                  "POST /api/checkout"
                ]
              },
              "kind": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The spans' kind, such as `server`, `client` or `internal`. `null` when the spans have no kind.",
                "readOnly": true,
                "examples": [
                  "server"
                ]
              },
              "span_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of spans with this name and kind in the time range.",
                "readOnly": true,
                "examples": [
                  3845
                ]
              },
              "error_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of those spans that failed. A span failed when its status is an error, its HTTP response status is 400 or higher, or its gRPC status isn't `OK`.",
                "readOnly": true,
                "examples": [
                  120
                ]
              },
              "avg_duration_ms": {
                "type": "number",
                "description": "Average duration of the spans in milliseconds.",
                "readOnly": true,
                "examples": [
                  182.416
                ]
              },
              "max_duration_ms": {
                "type": "number",
                "description": "Duration of the slowest span in milliseconds.",
                "readOnly": true,
                "examples": [
                  2214.53
                ]
              }
            }
          }
        }
      },
      "ServiceOperationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceOperation"
            }
          }
        }
      },
      "Source": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The source's id."
          },
          "type": {
            "type": "string",
            "const": "source"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Source name.",
                "examples": [
                  "Nginx"
                ]
              },
              "platform": {
                "type": "string",
                "description": "The platform the source ingests from. For a collector, use [Create a collector](/docs/logs/api/create-a-collector/), which creates its own source.",
                "examples": [
                  "nginx"
                ]
              },
              "data_region": {
                "type": "string",
                "description": "The data region, `europe`, `us`, `singapore` or a dedicated cluster's name from [List data regions](/docs/logs/api/data-regions/). Returned as that name.",
                "examples": [
                  "europe"
                ]
              },
              "cluster": {
                "type": "string",
                "description": "The cluster the source's data is stored on, by its name. To connect Grafana to this data, send it as the `cluster` of [Create a connection](/docs/logs/api/connections/create/).",
                "readOnly": true,
                "examples": [
                  "eu-nbg-2"
                ]
              },
              "source_group_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Source group this source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/).",
                "examples": [
                  "572"
                ]
              },
              "ingesting_paused": {
                "type": "boolean",
                "description": "Whether ingestion is paused for this source.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "logs_retention": {
                "type": "integer",
                "format": "int64",
                "description": "Days logs are kept, one of the retention periods your plan offers.",
                "examples": [
                  7
                ]
              },
              "metrics_retention": {
                "type": "integer",
                "format": "int64",
                "description": "Days metrics are kept, one of the retention periods your plan offers.",
                "examples": [
                  14
                ]
              },
              "live_tail_pattern": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
                "examples": [
                  "{level} {host} {nginx.status} {nginx.method} {nginx.host} {nginx.path} {nginx.client} {nginx.agent} {message}"
                ]
              },
              "live_tail_pattern_spans": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/).",
                "examples": [
                  "{span.name} {duration}"
                ]
              },
              "vrl_transformation_logs": {
                "type": "string",
                "format": "vrl",
                "description": "VRL program Better Stack runs on each log line as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
                "examples": [
                  ".message = upcase!(.message)\n."
                ]
              },
              "vrl_transformation_spans": {
                "type": "string",
                "format": "vrl",
                "description": "VRL program Better Stack runs on each span as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
                "examples": [
                  ".name = downcase!(.name)\n."
                ]
              },
              "blocked_metrics": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
                "default": [],
                "examples": [
                  [
                    "go_gc_duration_seconds",
                    "go_memstats_heap_idle_bytes"
                  ]
                ]
              },
              "scrape_urls": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "URLs to scrape metrics from. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                "default": [],
                "examples": [
                  [
                    "https://example.com/metrics"
                  ]
                ]
              },
              "scrape_frequency_secs": {
                "type": "integer",
                "format": "int64",
                "enum": [
                  15,
                  30,
                  60,
                  120,
                  300
                ],
                "description": "Seconds between scrapes. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                "default": 15,
                "examples": [
                  30
                ]
              },
              "scrape_request_headers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The header's name."
                    },
                    "value": {
                      "type": "string",
                      "description": "The header's value."
                    }
                  }
                },
                "description": "Custom headers sent with each scrape request, each with a `name` and a `value`. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                "x-detect-credentials": true,
                "examples": [
                  [
                    {
                      "name": "X-Scrape-Source",
                      "value": "better-stack"
                    }
                  ]
                ]
              },
              "scrape_request_basic_auth_user": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Username for basic authentication on scrape requests. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                "examples": [
                  "prometheus"
                ]
              },
              "skip_ssl_verify": {
                "type": "boolean",
                "description": "Whether to skip TLS certificate verification when scraping. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
                "default": false,
                "examples": [
                  false
                ]
              },
              "aws_auto_sub_log_groups": {
                "type": "boolean",
                "description": "Whether to subscribe new CloudWatch log groups automatically when they're discovered. Only for the `aws` platform.",
                "examples": [
                  true
                ]
              },
              "gcp_metrics_filters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "include": {
                      "type": "string",
                      "description": "A regular expression for metric types to collect, or `*` for every metric."
                    },
                    "exclude": {
                      "type": "string",
                      "description": "A regular expression for metric types to leave out. Every other metric is collected."
                    }
                  }
                },
                "description": "Which Google Cloud metrics the source collects. Each rule has one key, `include` or `exclude`, holding a regular expression that must match the whole metric type, or `*` for every metric. All rules use the same key. An empty list collects no metrics, which is the default. Each GCP metric's `collected` says whether these rules collect it. Only for the `gcp` platform.",
                "examples": [
                  [
                    {
                      "include": "compute\\.googleapis\\.com/instance/.*"
                    }
                  ]
                ]
              },
              "gcp_log_filter": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Google Cloud Logging query that selects which logs the source receives. `null` forwards every log, which is the default. Google Cloud checks the query when it's saved and refuses an invalid one. Only for the `gcp` platform.",
                "examples": [
                  "resource.type=\"gce_instance\" AND severity>=WARNING"
                ]
              },
              "custom_bucket": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The bucket's name, taken from `endpoint`.",
                    "readOnly": true
                  },
                  "endpoint": {
                    "type": "string",
                    "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
                  },
                  "access_key_id": {
                    "type": "string",
                    "description": "The access key ID Better Stack uses to write to the bucket."
                  },
                  "secret_access_key": {
                    "type": "string",
                    "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
                  },
                  "keep_data_after_retention": {
                    "type": "boolean",
                    "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
                  }
                },
                "description": "Your own S3-compatible bucket to archive data in, or `null` when the source uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). The bucket can't be changed after the source is created. To rotate the key pair, update only `access_key_id` and `secret_access_key`. We check the new pair against the bucket first and refuse the whole request when it fails. A bucket that several sources share is rotated for all of them.",
                "examples": [
                  {
                    "name": "storage-bucket",
                    "endpoint": "https://s3.us-east-1.amazonaws.com/storage-bucket",
                    "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                    "keep_data_after_retention": false
                  }
                ]
              },
              "connected_source_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "IDs of the sources connected to this one, so you can correlate their logs and traces. Connections go both ways. The source is connected to each listed source and to every source those are already connected to.",
                "default": [],
                "examples": [
                  [
                    "12346"
                  ]
                ]
              },
              "service_fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name_key": {
                      "type": "string",
                      "description": "The field to extract the service name from, such as `service.name`."
                    },
                    "type_key": {
                      "type": "string",
                      "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                    }
                  }
                },
                "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. An update replaces the existing list, and `[]` removes them all.",
                "examples": [
                  [
                    {
                      "name_key": "service.name",
                      "type_key": "service.type"
                    }
                  ]
                ]
              },
              "source_types": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Kinds of data the source holds, such as `logs`, `spans`, `metrics`, `exceptions` or `web_events`, sorted by name.",
                "readOnly": true,
                "examples": [
                  [
                    "logs",
                    "metrics",
                    "spans"
                  ]
                ]
              },
              "parent_source_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The source whose table this source shares, when it's connected to one. `query_collections` then names that source's collections. `null` otherwise.",
                "readOnly": true
              },
              "query_collections": {
                "type": "object",
                "properties": {
                  "database": {
                    "type": "string",
                    "description": "The ClickHouse database that holds the source's data."
                  },
                  "table": {
                    "type": "string",
                    "description": "The physical table, as `database.table`."
                  },
                  "recent": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "The collection with the last 30 minutes of data, keyed by the kind of data, such as `logs` or `metrics`."
                  },
                  "s3": {
                    "type": "string",
                    "description": "The collection that holds older rows of every type."
                  },
                  "app_filter": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The condition that keeps only the source's rows in its parent's raw collections. `null` unless the source is connected to a source."
                  },
                  "metrics_app_filter": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The condition that keeps only the source's rows in its parent's metrics collection. `null` unless the source is connected to a source."
                  }
                },
                "description": "ClickHouse names to query the source's data by. A connected source's data is in its parent's collections, and `app_filter` and `metrics_app_filter` keep only its own rows.",
                "readOnly": true,
                "examples": [
                  {
                    "database": "t123",
                    "table": "t123.nginx",
                    "recent": {
                      "logs": "remote(t123_nginx_logs)",
                      "metrics": "remote(t123_nginx_metrics)"
                    },
                    "s3": "s3Cluster(primary, t123_nginx_s3)",
                    "app_filter": null,
                    "metrics_app_filter": null
                  }
                ]
              },
              "last_data_on": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "The last day the source received data, in UTC, such as `2026-06-11`. `null` when the source received no data in the last 30 days. The date can be up to about 15 minutes behind.",
                "readOnly": true,
                "examples": [
                  "2026-06-11"
                ]
              },
              "token": {
                "type": "string",
                "description": "Ingestion token. Returned in every response.",
                "x-sensitive": true,
                "readOnly": true,
                "examples": [
                  "FczKcxEhjEDE58dBX7XaeX1q"
                ]
              },
              "table_name": {
                "type": "string",
                "description": "The name you query the source's data by, such as `nginx`.",
                "readOnly": true,
                "examples": [
                  "nginx"
                ]
              },
              "ingesting_host": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Host to send data to. `null` for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms, whose data Better Stack scrapes.",
                "readOnly": true,
                "examples": [
                  "s95.eu-nbg-2.betterstackdata.com"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the source was created.",
                "readOnly": true,
                "examples": [
                  "2026-05-27T12:30:41.695Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the source was last updated.",
                "readOnly": true,
                "examples": [
                  "2026-06-11T14:00:50.756Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the source, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the source.",
                "readOnly": true,
                "examples": [
                  "Test team"
                ]
              }
            }
          }
        }
      },
      "SourceCreate": {
        "$ref": "#/components/schemas/SourceCreateAttributes"
      },
      "SourceCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Source name.",
            "examples": [
              "Nginx"
            ]
          },
          "platform": {
            "type": "string",
            "enum": [
              "apache2",
              "aws",
              "aws_cloudwatch",
              "aws_ecs",
              "aws_elb",
              "aws_fargate",
              "azure",
              "azure_logs",
              "claude_platform",
              "cloudflare_logpush",
              "cloudflare_prometheus_exporter",
              "cloudflare_worker",
              "datadog_agent",
              "digitalocean",
              "docker",
              "dokku",
              "dotnet",
              "elasticsearch",
              "erlang",
              "fastly",
              "filebeat",
              "flights",
              "fluentbit",
              "fluentd",
              "fly_io",
              "gcp",
              "go",
              "google_cloud_pubsub",
              "haproxy",
              "heroku",
              "http",
              "java",
              "javascript",
              "kubernetes",
              "logstash",
              "minio",
              "mongodb",
              "mysql",
              "nginx",
              "open_telemetry",
              "oracle_cloud",
              "php",
              "postgresql",
              "prometheus",
              "prometheus_scrape",
              "python",
              "rabbitmq",
              "redis",
              "render",
              "rsyslog",
              "ruby",
              "syslog-ng",
              "traefik",
              "ubuntu",
              "vector",
              "vercel_integration",
              "winlogbeat"
            ],
            "description": "The platform the source ingests from. For a collector, use [Create a collector](/docs/logs/api/create-a-collector/), which creates its own source. Can't be changed after the source is created.",
            "examples": [
              "nginx"
            ]
          },
          "data_region": {
            "type": "string",
            "description": "The data region, `europe`, `us`, `singapore` or a dedicated cluster's name from [List data regions](/docs/logs/api/data-regions/). Returned as that name. Can't be changed after the source is created. Defaults to the organization's default data region.",
            "examples": [
              "europe"
            ]
          },
          "source_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source group this source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/).",
            "examples": [
              "572"
            ]
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this source.",
            "default": false,
            "examples": [
              false
            ]
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days logs are kept, one of the retention periods your plan offers.",
            "examples": [
              7
            ]
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days metrics are kept, one of the retention periods your plan offers.",
            "examples": [
              14
            ]
          },
          "live_tail_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the source doesn't receive logs.",
            "examples": [
              "{level} {host} {nginx.status} {nginx.method} {nginx.host} {nginx.path} {nginx.client} {nginx.agent} {message}"
            ]
          },
          "live_tail_pattern_spans": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the source doesn't receive spans.",
            "examples": [
              "{span.name} {duration}"
            ]
          },
          "vrl_transformation_logs": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
            "examples": [
              ".message = upcase!(.message)\n."
            ]
          },
          "vrl_transformation_spans": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
            "examples": [
              ".name = downcase!(.name)\n."
            ]
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
            "default": [],
            "examples": [
              [
                "go_gc_duration_seconds",
                "go_memstats_heap_idle_bytes"
              ]
            ]
          },
          "scrape_urls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs to scrape metrics from. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "default": [],
            "examples": [
              [
                "https://example.com/metrics"
              ]
            ]
          },
          "scrape_frequency_secs": {
            "type": "integer",
            "format": "int64",
            "enum": [
              15,
              30,
              60,
              120,
              300
            ],
            "description": "Seconds between scrapes. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "default": 15,
            "examples": [
              30
            ]
          },
          "scrape_request_headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The header's name."
                },
                "value": {
                  "type": "string",
                  "description": "The header's value."
                }
              }
            },
            "description": "Custom headers sent with each scrape request, each with a `name` and a `value`. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "x-detect-credentials": true,
            "examples": [
              [
                {
                  "name": "X-Scrape-Source",
                  "value": "better-stack"
                }
              ]
            ]
          },
          "scrape_request_basic_auth_user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Username for basic authentication on scrape requests. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "examples": [
              "prometheus"
            ]
          },
          "scrape_request_basic_auth_password": {
            "type": [
              "string",
              "null"
            ],
            "description": "Password for basic authentication on scrape requests. Not returned after it's saved. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "s3cr3t-placeholder"
            ]
          },
          "skip_ssl_verify": {
            "type": "boolean",
            "description": "Whether to skip TLS certificate verification when scraping. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "default": false,
            "examples": [
              false
            ]
          },
          "aws_account_id": {
            "type": "string",
            "description": "Better Stack's own ID for an AWS account that another `aws` source in your organization connected, to reuse that connection. Better Stack's ID differs from the 12-digit AWS account ID. Only for the `aws` platform.",
            "writeOnly": true,
            "examples": [
              "1234"
            ]
          },
          "aws_role_arn": {
            "type": "string",
            "description": "ARN of the IAM role from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "arn:aws:iam::123456789012:role/BetterStackIntegration"
            ]
          },
          "aws_external_id": {
            "type": "string",
            "description": "External ID from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "external-id-placeholder"
            ]
          },
          "aws_auto_sub_log_groups": {
            "type": "boolean",
            "description": "Whether to subscribe new CloudWatch log groups automatically when they're discovered. Only for the `aws` platform. Defaults to `true`.",
            "examples": [
              true
            ]
          },
          "gcp_account_id": {
            "type": "string",
            "description": "Better Stack's own ID for a Google Cloud project that another `gcp` source in your organization connected, to reuse that connection. Better Stack's ID differs from the project's ID and number. Only for the `gcp` platform.",
            "writeOnly": true,
            "examples": [
              "1234"
            ]
          },
          "gcp_project_id": {
            "type": "string",
            "description": "ID of the GCP project to connect. Only for the `gcp` platform.",
            "writeOnly": true,
            "examples": [
              "my-project-123456"
            ]
          },
          "gcp_project_number": {
            "type": "string",
            "description": "Number of the GCP project to connect. Only for the `gcp` platform.",
            "writeOnly": true,
            "examples": [
              "123456789012"
            ]
          },
          "gcp_metrics_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "include": {
                  "type": "string",
                  "description": "A regular expression for metric types to collect, or `*` for every metric."
                },
                "exclude": {
                  "type": "string",
                  "description": "A regular expression for metric types to leave out. Every other metric is collected."
                }
              }
            },
            "description": "Which Google Cloud metrics the source collects. Each rule has one key, `include` or `exclude`, holding a regular expression that must match the whole metric type, or `*` for every metric. All rules use the same key. An empty list collects no metrics, which is the default. Each GCP metric's `collected` says whether these rules collect it. Only for the `gcp` platform.",
            "examples": [
              [
                {
                  "include": "compute\\.googleapis\\.com/instance/.*"
                }
              ]
            ]
          },
          "custom_bucket": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The bucket's name, taken from `endpoint`.",
                "readOnly": true
              },
              "endpoint": {
                "type": "string",
                "description": "The S3-compatible endpoint URL of the bucket. Can't be changed after the bucket is set."
              },
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              },
              "keep_data_after_retention": {
                "type": "boolean",
                "description": "Whether data stays in the bucket after the retention period. Can't be changed after the bucket is set."
              }
            },
            "description": "Your own S3-compatible bucket to archive data in, or `null` when the source uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). The bucket can't be changed after the source is created. To rotate the key pair, update only `access_key_id` and `secret_access_key`. We check the new pair against the bucket first and refuse the whole request when it fails. A bucket that several sources share is rotated for all of them.",
            "examples": [
              {
                "name": "storage-bucket",
                "endpoint": "https://s3.us-east-1.amazonaws.com/storage-bucket",
                "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                "secret_access_key": "s3cr3t-placeholder",
                "keep_data_after_retention": false
              }
            ]
          },
          "connected_source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the sources connected to this one, so you can correlate their logs and traces. Connections go both ways. The source is connected to each listed source and to every source those are already connected to. An update removes no existing connection, and `[]` disconnects the source.",
            "default": [],
            "examples": [
              [
                "12346"
              ]
            ]
          },
          "service_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name_key": {
                  "type": "string",
                  "description": "The field to extract the service name from, such as `service.name`."
                },
                "type_key": {
                  "type": "string",
                  "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                }
              }
            },
            "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. An update replaces the existing list, and `[]` removes them all.",
            "examples": [
              [
                {
                  "name_key": "service.name",
                  "type_key": "service.type"
                }
              ]
            ]
          }
        },
        "required": [
          "name",
          "platform"
        ]
      },
      "SourceDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Source"
          }
        }
      },
      "SourceField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The source_field's id."
          },
          "type": {
            "type": "string",
            "const": "source_field"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string",
                "description": "The field's path in the log or span, such as `nginx.status`.",
                "readOnly": true,
                "examples": [
                  "nginx.status"
                ]
              },
              "path_parts": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The path's segments as quoted `JSONExtract` arguments, so `JSONExtract(raw, <the segments joined by commas>, 'Nullable(String)')` reads the field.",
                "readOnly": true,
                "examples": [
                  [
                    "'nginx'",
                    "'status'"
                  ]
                ]
              },
              "type": {
                "type": "string",
                "description": "The field's data type, such as `String` or `Int64`.",
                "readOnly": true,
                "examples": [
                  "Int64"
                ]
              }
            }
          }
        }
      },
      "SourceFieldList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceField"
            }
          }
        }
      },
      "SourceFieldValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The source_field_value's id."
          },
          "type": {
            "type": "string",
            "const": "source_field_value"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string",
                "description": "The field's value as text, cut to 1000 characters. A number or boolean is written as it appears in the data, such as `503` or `true`.",
                "readOnly": true,
                "examples": [
                  "/api/checkout"
                ]
              },
              "occurrences": {
                "type": "integer",
                "format": "int64",
                "description": "Number of logs or spans with this value in the time range.",
                "readOnly": true,
                "examples": [
                  3845
                ]
              }
            }
          }
        }
      },
      "SourceFieldValueList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceFieldValue"
            }
          }
        }
      },
      "SourceGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The source_group's id."
          },
          "type": {
            "type": "string",
            "const": "source_group"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Group name.",
                "examples": [
                  "Backend sources"
                ]
              },
              "sort_index": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "Display order among your source groups. Lower values come first.",
                "examples": [
                  1
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the group was created.",
                "readOnly": true,
                "examples": [
                  "2025-06-30T17:43:12.192Z"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the group was last updated.",
                "readOnly": true,
                "examples": [
                  "2025-06-30T17:43:12.192Z"
                ]
              },
              "team_id": {
                "type": "string",
                "pattern": "^t[1-9][0-9]*$",
                "description": "Team that owns the group, such as `t123`.",
                "readOnly": true,
                "examples": [
                  "t123"
                ]
              },
              "team_name": {
                "type": "string",
                "description": "Name of the team that owns the group.",
                "readOnly": true,
                "examples": [
                  "Test team"
                ]
              }
            }
          }
        }
      },
      "SourceGroupCreate": {
        "$ref": "#/components/schemas/SourceGroupCreateAttributes"
      },
      "SourceGroupCreateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Backend sources"
            ]
          },
          "sort_index": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Display order among your source groups. Lower values come first.",
            "examples": [
              1
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "SourceGroupDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SourceGroup"
          }
        }
      },
      "SourceGroupList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceGroup"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "SourceGroupUpdate": {
        "$ref": "#/components/schemas/SourceGroupUpdateAttributes"
      },
      "SourceGroupUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name.",
            "examples": [
              "Backend sources"
            ]
          },
          "sort_index": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Display order among your source groups. Lower values come first.",
            "examples": [
              1
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "SourceList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationPageNumber"
          }
        }
      },
      "SourceUpdate": {
        "$ref": "#/components/schemas/SourceUpdateAttributes"
      },
      "SourceUpdateAttributes": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Source name.",
            "examples": [
              "Nginx"
            ]
          },
          "source_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source group this source belongs to, or `null` when it's in no group. Get the IDs via [List source groups](/docs/logs/api/list-all-existing-source-groups/). On update, `\"0\"` also removes it from its group.",
            "examples": [
              "572"
            ]
          },
          "ingesting_paused": {
            "type": "boolean",
            "description": "Whether ingestion is paused for this source.",
            "default": false,
            "examples": [
              false
            ]
          },
          "logs_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days logs are kept, one of the retention periods your plan offers.",
            "examples": [
              7
            ]
          },
          "metrics_retention": {
            "type": "integer",
            "format": "int64",
            "description": "Days metrics are kept, one of the retention periods your plan offers.",
            "examples": [
              14
            ]
          },
          "live_tail_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each log line with. Columns are wrapped in braces, such as `PID: {message_json.pid} {level} {message}`. `null` when the source doesn't receive logs. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the source doesn't receive logs.",
            "examples": [
              "{level} {host} {nginx.status} {nginx.method} {nginx.host} {nginx.path} {nginx.client} {nginx.agent} {message}"
            ]
          },
          "live_tail_pattern_spans": {
            "type": [
              "string",
              "null"
            ],
            "description": "The pattern Live tail shows each span with. Columns are wrapped in braces, such as `{span.name} {duration}`. `null` when the source doesn't receive spans. See [Formatting logs](/docs/logs/using-logtail/formatting-logs/). Send `null` to restore the default format. Refused when the source doesn't receive spans.",
            "examples": [
              "{span.name} {duration}"
            ]
          },
          "vrl_transformation_logs": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each log line as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
            "examples": [
              ".message = upcase!(.message)\n."
            ]
          },
          "vrl_transformation_spans": {
            "type": "string",
            "format": "vrl",
            "description": "VRL program Better Stack runs on each span as it's ingested. `null` restores the platform's default program, and `\"\"` is an empty program. Read more about [VRL transformations](/docs/logs/using-logtail/transforming-ingested-data/logs-vrl/).",
            "examples": [
              ".name = downcase!(.name)\n."
            ]
          },
          "blocked_metrics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Metric names marked as spam, which are dropped when they're ingested. Read more about [marking metrics as spam](/docs/logs/using-logtail/transforming-ingested-data/mark-metrics-as-spam/).",
            "default": [],
            "examples": [
              [
                "go_gc_duration_seconds",
                "go_memstats_heap_idle_bytes"
              ]
            ]
          },
          "scrape_urls": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs to scrape metrics from. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "default": [],
            "examples": [
              [
                "https://example.com/metrics"
              ]
            ]
          },
          "scrape_frequency_secs": {
            "type": "integer",
            "format": "int64",
            "enum": [
              15,
              30,
              60,
              120,
              300
            ],
            "description": "Seconds between scrapes. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "default": 15,
            "examples": [
              30
            ]
          },
          "scrape_request_headers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The header's name."
                },
                "value": {
                  "type": "string",
                  "description": "The header's value."
                }
              }
            },
            "description": "Custom headers sent with each scrape request, each with a `name` and a `value`. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "x-detect-credentials": true,
            "examples": [
              [
                {
                  "name": "X-Scrape-Source",
                  "value": "better-stack"
                }
              ]
            ]
          },
          "scrape_request_basic_auth_user": {
            "type": [
              "string",
              "null"
            ],
            "description": "Username for basic authentication on scrape requests. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "examples": [
              "prometheus"
            ]
          },
          "scrape_request_basic_auth_password": {
            "type": [
              "string",
              "null"
            ],
            "description": "Password for basic authentication on scrape requests. Not returned after it's saved. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "s3cr3t-placeholder"
            ]
          },
          "skip_ssl_verify": {
            "type": "boolean",
            "description": "Whether to skip TLS certificate verification when scraping. Only for the `prometheus_scrape` and `cloudflare_prometheus_exporter` platforms.",
            "default": false,
            "examples": [
              false
            ]
          },
          "aws_account_id": {
            "type": "string",
            "description": "Better Stack's own ID for an AWS account that another `aws` source in your organization connected, to reuse that connection. Better Stack's ID differs from the 12-digit AWS account ID. Only for the `aws` platform.",
            "writeOnly": true,
            "examples": [
              "1234"
            ]
          },
          "aws_role_arn": {
            "type": "string",
            "description": "ARN of the IAM role from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "arn:aws:iam::123456789012:role/BetterStackIntegration"
            ]
          },
          "aws_external_id": {
            "type": "string",
            "description": "External ID from Better Stack's CloudFormation stack. Only for the `aws` platform.",
            "x-sensitive": true,
            "writeOnly": true,
            "examples": [
              "external-id-placeholder"
            ]
          },
          "aws_auto_sub_log_groups": {
            "type": "boolean",
            "description": "Whether to subscribe new CloudWatch log groups automatically when they're discovered. Only for the `aws` platform. Defaults to `true`.",
            "examples": [
              true
            ]
          },
          "gcp_account_id": {
            "type": "string",
            "description": "Better Stack's own ID for a Google Cloud project that another `gcp` source in your organization connected, to reuse that connection. Better Stack's ID differs from the project's ID and number. Only for the `gcp` platform.",
            "writeOnly": true,
            "examples": [
              "1234"
            ]
          },
          "gcp_project_id": {
            "type": "string",
            "description": "ID of the GCP project to connect. Only for the `gcp` platform.",
            "writeOnly": true,
            "examples": [
              "my-project-123456"
            ]
          },
          "gcp_project_number": {
            "type": "string",
            "description": "Number of the GCP project to connect. Only for the `gcp` platform.",
            "writeOnly": true,
            "examples": [
              "123456789012"
            ]
          },
          "gcp_metrics_filters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "include": {
                  "type": "string",
                  "description": "A regular expression for metric types to collect, or `*` for every metric."
                },
                "exclude": {
                  "type": "string",
                  "description": "A regular expression for metric types to leave out. Every other metric is collected."
                }
              }
            },
            "description": "Which Google Cloud metrics the source collects. Each rule has one key, `include` or `exclude`, holding a regular expression that must match the whole metric type, or `*` for every metric. All rules use the same key. An empty list collects no metrics, which is the default. Each GCP metric's `collected` says whether these rules collect it. Only for the `gcp` platform.",
            "examples": [
              [
                {
                  "include": "compute\\.googleapis\\.com/instance/.*"
                }
              ]
            ]
          },
          "gcp_log_filter": {
            "type": [
              "string",
              "null"
            ],
            "description": "Google Cloud Logging query that selects which logs the source receives. `null` forwards every log, which is the default. Google Cloud checks the query when it's saved and refuses an invalid one. Only for the `gcp` platform. Set it once the source's GCP project is connected, in a later request than the one that connects it.",
            "examples": [
              "resource.type=\"gce_instance\" AND severity>=WARNING"
            ]
          },
          "custom_bucket": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "access_key_id": {
                "type": "string",
                "description": "The access key ID Better Stack uses to write to the bucket."
              },
              "secret_access_key": {
                "type": "string",
                "description": "The secret access key for `access_key_id`. Write-only, so it's never returned."
              }
            },
            "description": "Your own S3-compatible bucket to archive data in, or `null` when the source uses Better Stack storage. Read more about [hosting data in your own bucket](/docs/logs/host-data-in-your-own-bucket/). The bucket can't be changed after the source is created. To rotate the key pair, update only `access_key_id` and `secret_access_key`. We check the new pair against the bucket first and refuse the whole request when it fails. A bucket that several sources share is rotated for all of them.",
            "examples": [
              {
                "name": "storage-bucket",
                "endpoint": "https://s3.us-east-1.amazonaws.com/storage-bucket",
                "access_key_id": "AKIAIOSFODNN7EXAMPLE",
                "secret_access_key": "s3cr3t-placeholder",
                "keep_data_after_retention": false
              }
            ]
          },
          "connected_source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the sources connected to this one, so you can correlate their logs and traces. Connections go both ways. The source is connected to each listed source and to every source those are already connected to. An update removes no existing connection, and `[]` disconnects the source.",
            "default": [],
            "examples": [
              [
                "12346"
              ]
            ]
          },
          "service_fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name_key": {
                  "type": "string",
                  "description": "The field to extract the service name from, such as `service.name`."
                },
                "type_key": {
                  "type": "string",
                  "description": "The field to extract the service's platform from, such as `service.type`. Platforms such as Nginx, PostgreSQL or Redis are recognized in its value."
                }
              }
            },
            "description": "Log fields that break data down by service. Each entry needs a `name_key`, and `type_key` can be `null` to skip it. An update replaces the existing list, and `[]` removes them all.",
            "examples": [
              [
                {
                  "name_key": "service.name",
                  "type_key": "service.type"
                }
              ]
            ]
          }
        }
      },
      "TelemetryError": {
        "type": "object",
        "description": "An object whose `errors` key holds the message.",
        "properties": {
          "errors": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Human-readable failure message."
          },
          "required_attributes": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Required attributes."
          },
          "invalid_attributes": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Invalid attributes."
          },
          "invalid_values": {
            "type": [
              "string",
              "object",
              "array"
            ],
            "description": "Invalid values."
          }
        }
      },
      "Trace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The trace's id."
          },
          "type": {
            "type": "string",
            "const": "trace"
          },
          "attributes": {
            "type": "object",
            "properties": {
              "trace_id": {
                "type": "string",
                "description": "The trace's ID.",
                "readOnly": true,
                "examples": [
                  "8260a352ac09d8099d76828730511db6"
                ]
              },
              "start_time": {
                "type": "string",
                "format": "date-time",
                "description": "When the trace's first span started, in UTC with microseconds.",
                "readOnly": true,
                "examples": [
                  "2026-11-22T16:18:47.901782Z"
                ]
              },
              "duration_ms": {
                "type": "number",
                "description": "Milliseconds from the start of the first span to the end of the last one. Listing traces reads this source's spans, and getting a trace reads its connected sources' spans too.",
                "readOnly": true,
                "examples": [
                  67055.097
                ]
              },
              "root_service": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The service of the trace's root span. When the time range doesn't hold the root span, it's the service of the trace's first span. `null` when that span has no service. Returned by list only.",
                "readOnly": true,
                "examples": [
                  "frontend"
                ]
              },
              "root_operation": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The name of the trace's root span. When the time range doesn't hold the root span, it's the name of the trace's first span. `null` when that span has no name. Returned by list only.",
                "readOnly": true,
                "examples": [
                  "GET /checkout"
                ]
              },
              "span_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of spans found for the trace. Listing traces counts this source's spans, and getting a trace counts its connected sources' spans too.",
                "readOnly": true,
                "examples": [
                  169
                ]
              },
              "error_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of failed spans. A span failed when its status is an error, its HTTP response status is 400 or higher, or its gRPC status isn't `OK`. Listing traces reads this source's spans, and getting a trace reads its connected sources' spans too.",
                "readOnly": true,
                "examples": [
                  2
                ]
              },
              "services": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The services the trace's spans come from, in the order they first appear. Returned by get only.",
                "readOnly": true,
                "examples": [
                  [
                    "load-generator",
                    "frontend",
                    "checkout",
                    "payment"
                  ]
                ]
              },
              "spans": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "depth": {
                      "type": "integer",
                      "format": "int64",
                      "description": "How deep the row sits in the tree, from `0` for a root span."
                    },
                    "span_id": {
                      "type": "string",
                      "description": "The span's ID. On a collapsed row, the ID of its slowest span."
                    },
                    "parent_span_id": {
                      "type": "string",
                      "description": "The ID of the parent span. Left out on a root span."
                    },
                    "name": {
                      "type": "string",
                      "description": "The span's name."
                    },
                    "kind": {
                      "type": "string",
                      "description": "The span's kind, such as `server`, `client` or `internal`."
                    },
                    "span_type": {
                      "type": "string",
                      "enum": [
                        "db",
                        "http",
                        "rpc",
                        "messaging",
                        "app"
                      ],
                      "description": "What the span does, read from its attributes.\n\n- `db`: A database call.\n- `http`: An HTTP request.\n- `rpc`: A remote procedure call.\n- `messaging`: A message queue operation.\n- `app`: Anything else.",
                      "x-enum-descriptions": {
                        "db": "A database call.",
                        "http": "An HTTP request.",
                        "rpc": "A remote procedure call.",
                        "messaging": "A message queue operation.",
                        "app": "Anything else."
                      }
                    },
                    "service": {
                      "type": "string",
                      "description": "The service the span comes from. Empty when the span names none."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "The ID of the source the span was read from, which is this source or one of its connected sources."
                    },
                    "offset_ms": {
                      "type": "number",
                      "description": "Milliseconds from the trace's start to the start of the span. On a collapsed row, to the start of its first span."
                    },
                    "duration_ms": {
                      "type": "number",
                      "description": "The span's duration in milliseconds. On a collapsed row, the total of its spans' durations."
                    },
                    "span_count": {
                      "type": "integer",
                      "format": "int64",
                      "description": "How many spans the row stands for. A row of more than 1 is a collapsed row, which groups similar sibling spans under one parent, such as the same database query, route or call."
                    },
                    "avg_duration_ms": {
                      "type": "number",
                      "description": "Average duration of the collapsed row's spans in milliseconds. Left out when `span_count` is 1."
                    },
                    "max_duration_ms": {
                      "type": "number",
                      "description": "Duration of the collapsed row's slowest span in milliseconds. Left out when `span_count` is 1."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "error"
                      ],
                      "description": "Whether the span failed.\n\n- `ok`: The span didn't fail.\n- `error`: The span failed, or on a collapsed row, any of its spans failed.",
                      "x-enum-descriptions": {
                        "ok": "The span didn't fail.",
                        "error": "The span failed, or on a collapsed row, any of its spans failed."
                      }
                    },
                    "event_count": {
                      "type": "integer",
                      "format": "int64",
                      "description": "Number of events recorded on the span, or on all of a collapsed row's spans."
                    },
                    "detail": {
                      "type": "string",
                      "description": "One line about what the span did, such as the database and statement, the HTTP method, URL and response status, or the called method, cut to 300 characters. Empty when the span has none of these attributes."
                    },
                    "exceptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The exception's type. Left out when it has none."
                          },
                          "message": {
                            "type": "string",
                            "description": "The exception's message, cut to 200 characters. Left out when it has none."
                          }
                        }
                      },
                      "description": "Up to 5 exceptions recorded on the span or the collapsed row's spans, as an empty list when there are none."
                    }
                  }
                },
                "description": "The trace's spans as a tree, one row per span in depth-first order, starting with the root spans. Repeated sibling spans are collapsed into one row. A span whose parent isn't in the trace starts a tree of its own after the root spans. At most 500 rows are returned. Returned by get only.",
                "readOnly": true,
                "examples": [
                  [
                    {
                      "depth": 0,
                      "span_id": "8b72f69cf7620b9c",
                      "name": "user_checkout_multi",
                      "kind": "internal",
                      "span_type": "app",
                      "service": "load-generator",
                      "source_id": "4689",
                      "offset_ms": 336.909,
                      "duration_ms": 15512.637,
                      "span_count": 1,
                      "status": "ok",
                      "event_count": 0,
                      "detail": "",
                      "exceptions": []
                    },
                    {
                      "depth": 1,
                      "span_id": "ab74fd4608ddcc2d",
                      "parent_span_id": "8b72f69cf7620b9c",
                      "name": "user_add_to_cart",
                      "kind": "internal",
                      "span_type": "app",
                      "service": "load-generator",
                      "source_id": "4689",
                      "offset_ms": 337.203,
                      "duration_ms": 494.702,
                      "span_count": 4,
                      "avg_duration_ms": 123.676,
                      "max_duration_ms": 181.529,
                      "status": "ok",
                      "event_count": 0,
                      "detail": "",
                      "exceptions": []
                    },
                    {
                      "depth": 2,
                      "span_id": "c84588e3c3ba8a81",
                      "parent_span_id": "ab74fd4608ddcc2d",
                      "name": "POST",
                      "kind": "client",
                      "span_type": "http",
                      "service": "load-generator",
                      "source_id": "4689",
                      "offset_ms": 833.212,
                      "duration_ms": 15012.933,
                      "span_count": 1,
                      "status": "error",
                      "event_count": 0,
                      "detail": "POST http://frontend-proxy:8080/api/checkout -> 504",
                      "exceptions": []
                    }
                  ]
                ]
              },
              "truncated_row_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of rows left out of `spans` past the first 500. Returned by get only.",
                "readOnly": true,
                "examples": [
                  0
                ]
              },
              "orphaned_span_count": {
                "type": "integer",
                "format": "int64",
                "description": "Number of spans whose parent span isn't in the trace, for example because it wasn't sampled or falls outside the time range. A span without its parent starts a tree of its own in `spans`. Returned by get only.",
                "readOnly": true,
                "examples": [
                  0
                ]
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Problems reading the trace, such as a connected source that couldn't be queried, whose spans are then missing from `spans`. An empty list when there are none. Returned by get only.",
                "readOnly": true,
                "examples": [
                  []
                ]
              }
            }
          }
        }
      },
      "TraceDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Trace"
          }
        }
      },
      "TraceList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trace"
            }
          }
        }
      }
    }
  }
}
