---
updatedAt: 2026-09-08T20:26:09.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# Validate a drop filter expression

Compile the given OPAL pipeline against the source dataset's schema without persisting anything. Always returns 200 if the request body is well-formed; the response `errors` array is empty when the pipeline is valid and populated when compilation failed.

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Observe by Snowflake API",
    "description": "# Overview\nWelcome to the Observe API Docs!\n\nThe Observe API is a RESTful API. POST bodies and responses are typically JSON-encoded.\n\n## Authentication\nRequests to the Observe API are authenticated with an API token. The token can be supplied using HTTP Bearer authentication:\n```\n// passing token as bearer token\ncurl -H \"Authorization: Bearer <customerid> <token>\" https://<customerid>.<observe-domain>.com/v1/...\n```\n",
    "version": "1.0.230307"
  },
  "servers": [
    {
      "url": "https://{customerid}.observeinc.com",
      "description": "US west server",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        }
      }
    },
    {
      "url": "https://{customerid}.{cluster}.observeinc.com",
      "description": "Specific regional cluster (prod)",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        },
        "cluster": {
          "enum": [
            "eu-1",
            "ap-1"
          ],
          "default": "eu-1",
          "description": "For regional clusters, choose one."
        }
      }
    },
    {
      "url": "https://{customerid}.{domain}.com",
      "description": "Specific Observe server",
      "variables": {
        "customerid": {
          "default": "OBSERVE_CUSTOMERID",
          "description": "The customer ID for your instance."
        },
        "domain": {
          "default": "OBSERVE_DOMAIN",
          "description": "The Observe domain for your instance."
        }
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Drop Filters",
      "x-displayName": "Drop Filter",
      "description": "Manage drop filters used to reduce ingest volume by dropping a\nconfigurable fraction of observations matching an OPAL predicate.\nLearn more about [drop filters](https://docs.observeinc.com/docs/drop-filters).\n"
    }
  ],
  "paths": {
    "/v1/ingest/filters/validate": {
      "post": {
        "summary": "Validate a drop filter expression",
        "description": "Compile the given OPAL pipeline against the source dataset's schema without persisting anything. Always returns 200 if the request body is well-formed; the response `errors` array is empty when the pipeline is valid and populated when compilation failed.",
        "operationId": "ValidateIngestFilterExpression",
        "tags": [
          "Drop Filters"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestFilters-ValidateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation completed (may include compiler errors)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestFilters-ValidateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse-400"
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse-401"
          },
          "403": {
            "$ref": "#/components/responses/ErrorResponse-403"
          },
          "429": {
            "$ref": "#/components/responses/ErrorResponse-429"
          },
          "5XX": {
            "$ref": "#/components/responses/ErrorResponse-5XX"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Authorization: Bearer <customerid> <apitoken>\n"
      }
    },
    "schemas": {
      "ObjectId": {
        "type": "string",
        "format": "ObjectId"
      },
      "ErrorMessage": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A stable, machine-readable identifier for the kind of error."
          },
          "message": {
            "type": "string",
            "description": "Error message"
          }
        },
        "required": [
          "type",
          "message"
        ]
      },
      "DatasetContentType": {
        "title": "DatasetContentType",
        "type": "string",
        "description": "The type of data a dataset contains. For Resource datasets, this is\ndetermined by the dataset kind. For other kinds, it is derived from the\ndataset's interface bindings. Returns Unknown if no recognized interface\nis found.\n",
        "enum": [
          "Unknown",
          "Resource",
          "Log",
          "Metric",
          "OTelSpan",
          "OTelTrace"
        ]
      },
      "DatasetBrief": {
        "title": "DatasetBrief",
        "type": "object",
        "description": "Brief record fields for a DatasetRef (label, description, iconUrl, contentType). Field naming mirrors ObjectBrief in this same file (iconUrl, not icon) for consistency across reference-brief pairs.\n",
        "required": [
          "label",
          "description",
          "iconUrl",
          "contentType"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string"
          },
          "contentType": {
            "$ref": "#/components/schemas/DatasetContentType",
            "description": "The type of data the referenced dataset contains — Resource, Log,\nMetric, OTelSpan, OTelTrace, or Unknown. Derived from the dataset's\nkind and interface bindings.\n"
          }
        }
      },
      "DatasetRef": {
        "title": "DatasetRef",
        "type": "object",
        "description": "A reference to a dataset. Always carries the id; the optional `record` field carries the brief metadata, populated when expand=true. Mirrors ObjectRef (see ObjectRef / ObjectBrief in this file).\n",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "record": {
            "$ref": "#/components/schemas/DatasetBrief"
          }
        }
      },
      "IngestFilters-ValidateRequest": {
        "title": "IngestFiltersValidateRequest",
        "type": "object",
        "description": "A pipeline to compile, plus the dataset whose schema it compiles against.",
        "required": [
          "pipeline",
          "sourceDataset"
        ],
        "properties": {
          "pipeline": {
            "type": "string",
            "description": "OPAL pipeline expression to compile."
          },
          "sourceDataset": {
            "$ref": "#/components/schemas/DatasetRef",
            "description": "Source dataset reference. Only the `id` is consumed; any `record` payload is ignored."
          }
        }
      },
      "IngestFilters-CompilerErrorPos": {
        "title": "IngestFiltersCompilerErrorPos",
        "type": "object",
        "description": "A single position within the pipeline text.",
        "properties": {
          "row": {
            "type": "integer",
            "format": "int32",
            "description": "Line number, starting at 1."
          },
          "col": {
            "type": "integer",
            "format": "int32",
            "description": "Column number within the line, starting at 1."
          }
        }
      },
      "IngestFilters-CompilerErrorSpan": {
        "title": "IngestFiltersCompilerErrorSpan",
        "type": "object",
        "description": "A half-open range within the pipeline text, from `start` up to `end`.",
        "properties": {
          "start": {
            "$ref": "#/components/schemas/IngestFilters-CompilerErrorPos",
            "description": "First position covered by the error."
          },
          "end": {
            "$ref": "#/components/schemas/IngestFilters-CompilerErrorPos",
            "description": "Position just past the last one covered by the error."
          }
        }
      },
      "IngestFilters-CompilerError": {
        "title": "IngestFiltersCompilerError",
        "type": "object",
        "description": "A single compiler error from compiling the OPAL pipeline.",
        "required": [
          "type",
          "message"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Stable identifier for the kind of compiler error."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the error."
          },
          "span": {
            "$ref": "#/components/schemas/IngestFilters-CompilerErrorSpan",
            "description": "Location of the error within the pipeline text. Absent when the compiler could not attribute the error to a specific position."
          }
        }
      },
      "IngestFilters-ValidateResponse": {
        "title": "IngestFiltersValidateResponse",
        "type": "object",
        "description": "Result of compiling the pipeline. A 200 does not mean the pipeline is valid: check that `errors` is empty.",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "description": "Compiler errors, in source order. Empty when the pipeline compiled successfully.",
            "items": {
              "$ref": "#/components/schemas/IngestFilters-CompilerError"
            }
          }
        },
        "examples": [
          {
            "errors": []
          },
          {
            "errors": [
              {
                "type": "unknown_column",
                "message": "column \"sevrity\" does not exist",
                "span": {
                  "start": {
                    "row": 1,
                    "col": 8
                  },
                  "end": {
                    "row": 1,
                    "col": 15
                  }
                }
              }
            ]
          }
        ]
      }
    },
    "responses": {
      "ErrorResponse-400": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "ErrorResponse-401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "ErrorResponse-403": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "ErrorResponse-429": {
        "description": "Rate limit reached",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorMessage"
            }
          }
        }
      },
      "ErrorResponse-5XX": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorMessage"
            }
          }
        }
      }
    }
  }
}
````