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

# Create an ingest route.

> **Beta — schema may still change; breaking changes are coordinated with affected customers. Suitable for evaluation, not production reliance.**

Creates an ingest route. The destination ID must be the ID of a source
dataset whose type matches the `type` path parameter. Returns the created
route.


# 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": []
    }
  ],
  "paths": {
    "/v1/ingest/routes/{type}": {
      "post": {
        "x-badges": [
          {
            "name": "beta",
            "position": "before",
            "color": "#FFCC00"
          }
        ],
        "summary": "Create an ingest route.",
        "description": "> **Beta — schema may still change; breaking changes are coordinated with affected customers. Suitable for evaluation, not production reliance.**\n\nCreates an ingest route. The destination ID must be the ID of a source\ndataset whose type matches the `type` path parameter. Returns the created\nroute.\n",
        "operationId": "CreateIngestRoute",
        "tags": [
          "Ingest Routes"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestRoutes-CreateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IngestRoutes-Type"
          }
        ],
        "responses": {
          "201": {
            "description": "Ingest route created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestRoutes-Resource"
                }
              }
            }
          },
          "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"
      },
      "User": {
        "title": "User",
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "title": "User Identifier",
            "$ref": "#/components/schemas/ObjectId"
          },
          "label": {
            "title": "User Label",
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          }
        }
      },
      "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"
        ]
      },
      "ObjectRef": {
        "title": "ObjectRef",
        "type": "object",
        "description": "A reference to another resource. Always carries the id; the optional `record` field carries the brief metadata, populated when expand=true. Brief expansion applies to one layer only — fields inside `record` that are themselves ObjectRefs (e.g. `record.managedBy`) are returned id-only, never with their own `record` populated. CEL filter expressions can deeper-resolve via lazy wrapper resolution if needed.\n",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "record": {
            "$ref": "#/components/schemas/ObjectBrief"
          }
        }
      },
      "ObjectBrief": {
        "title": "ObjectBrief",
        "type": "object",
        "description": "Brief record fields for an ObjectRef. This type is polymorphic: additional fields pointing to specific object types (e.g. dataset, dashboard, monitor) may be added in the future as needed.\n",
        "required": [
          "label",
          "description",
          "iconUrl",
          "managedBy"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string"
          },
          "managedBy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ObjectRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner/manager of this object. Always returned as an id-only ObjectRef even when the parent was requested with expand=true: `expand` populates a single layer of brief data, so `record.managedBy` on a brief is itself never expanded. Pass the inner id back through a separate request (or filter via CEL, which lazily resolves) to access the manager's brief."
          }
        }
      },
      "IngestRoutes-Type": {
        "title": "IngestRoutesType",
        "type": "string",
        "description": "The observation type a route applies to. Each type corresponds to a source dataset schema and to the ingest endpoints that emit compatible data. `any` is the generic schema with `FIELDS` and `EXTRA` columns; the rest are direct-write source datasets. See the `type` path parameter for the endpoint mappings.",
        "enum": [
          "otellogs",
          "otelmetrics",
          "oteltraces",
          "prometheus",
          "k8sentity",
          "any"
        ]
      },
      "NullableObjectId": {
        "type": [
          "string",
          "null"
        ],
        "format": "ObjectId"
      },
      "IngestRoutes-Resource": {
        "title": "IngestRoutesObject",
        "type": "object",
        "description": "An ingest route resource. This is one rule defining a route for observations of a certain type.",
        "required": [
          "id",
          "createdBy",
          "createdAt",
          "updatedBy",
          "updatedAt",
          "type",
          "pipeline",
          "layout",
          "destinationId",
          "secondaryDestinationId",
          "enabled",
          "managedBy"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ObjectId",
            "readOnly": true,
            "description": "Unique identifier for this ingest route."
          },
          "createdBy": {
            "$ref": "#/components/schemas/User",
            "readOnly": true,
            "description": "User who created this route. Always returned as an ID-only object; pass expand=true to populate `record`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Time at which this route was created."
          },
          "updatedBy": {
            "$ref": "#/components/schemas/User",
            "readOnly": true,
            "description": "User who last updated this route. Always returned as an ID-only object; pass expand=true to populate `record`."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Time at which this route was last updated."
          },
          "type": {
            "$ref": "#/components/schemas/IngestRoutes-Type",
            "readOnly": true,
            "description": "The observation type this route applies to. Set at creation and cannot be changed."
          },
          "pipeline": {
            "type": "string",
            "readOnly": true,
            "description": "OPAL expression acting as the match predicate for this route. An observation is routed here when the expression evaluates true. Compiled against the schema of the destination source dataset.\n\nAn empty string identifies the type's default route, which matches every observation not matched by a higher-priority route. See the `pipeline` field on the create request for the restrictions that apply per type."
          },
          "layout": {
            "type": "object",
            "readOnly": true,
            "description": "Opaque JSON blob round-tripped to the frontend; not interpreted by the server."
          },
          "destinationId": {
            "$ref": "#/components/schemas/ObjectId",
            "readOnly": true,
            "description": "Primary destination dataset ID. Observations matching this route are written here."
          },
          "secondaryDestinationId": {
            "$ref": "#/components/schemas/NullableObjectId",
            "readOnly": true,
            "description": "Secondary destination dataset ID. When set, observations matching this route are duplicated to both the primary and secondary destination datasets."
          },
          "enabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether this route is evaluated against incoming data. A disabled route is skipped entirely, as though it did not exist. New routes are created disabled; see the create request for details."
          },
          "managedBy": {
            "readOnly": true,
            "description": "Identifies the owner/manager of this route. Managed routes cannot be created, modified, or deleted through the API. Always returned as an ID-only object; pass expand=true to populate `record` (label, description, iconUrl).",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ObjectRef"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "IngestRoutes-CreateRequest": {
        "title": "IngestRoutesCreateRequest",
        "type": "object",
        "description": "A new route is created **disabled**, and is ignored by the ingest pipeline until you enable it with a PATCH. The one exception is the default route, which is always enabled.\n\nA new route is assigned the lowest priority among non-default routes, so it is evaluated last. Use `PATCH /v1/ingest/routes/{type}` to reorder.\n\nCreating the first route for a type also creates that type's default route automatically, so that no observation is left unrouted.",
        "required": [
          "pipeline",
          "destinationId"
        ],
        "properties": {
          "pipeline": {
            "type": "string",
            "description": "OPAL expression acting as the match predicate for this route, compiled against the destination dataset's schema. A compile error is rejected with a 400.\n\nPass an empty string to create the type's default route, the catch-all evaluated after every other route. Once a default route exists, an empty pipeline is rejected with a 400.\n\nTwo restrictions apply per type:\n\n- `oteltraces` supports only the default route. A non-empty pipeline is rejected with a 400.\n- Some types restrict which columns the expression may reference: `prometheus`, `k8sentity`, and `oteltraces` allow only `meta`; `otelmetrics` allows `meta` and `metric`. `otellogs` and `any` are unrestricted. Referencing any other column is rejected with a 400.\n\nUnlike a drop filter, a route predicate that fails at evaluation time fails the whole bundle rather than failing open. Expressions are therefore rejected at creation if they reference columns that cannot be resolved."
          },
          "layout": {
            "type": "object",
            "description": "Opaque JSON blob round-tripped to the frontend; not interpreted by the server."
          },
          "destinationId": {
            "$ref": "#/components/schemas/ObjectId",
            "description": "Primary destination dataset ID. Must be a source dataset whose type matches the `type` path parameter."
          },
          "secondaryDestinationId": {
            "$ref": "#/components/schemas/ObjectId",
            "description": "Optional secondary destination dataset ID, subject to the same type check as `destinationId`. When set, matching observations are written to both destinations. Omit to leave unset; use PATCH with an explicit `null` to clear it later."
          }
        }
      }
    },
    "parameters": {
      "IngestRoutes-Type": {
        "in": "path",
        "name": "type",
        "schema": {
          "$ref": "#/components/schemas/IngestRoutes-Type"
        },
        "required": true,
        "description": "The type of the ingest route to query. These types correspond to the various source dataset schemas supported by Observe.\n`any` refers to the \"default\" generic source dataset schema with the `FIELDS` and `EXTRA` columns. All of the others\ncorrespond to direct-write source datasets. Each type is also associated with particular ingest HTTP endpoints that emit\ncompatible data for that type. Incoming data on a given endpoint is routable to any dataset of the corresponding type.\n\nThe following [type -> ingest path] mappings are defined:\n\n- `otellogs` <-> `/v1/otel/v1/logs`\n- `otelmetrics` <-> `/v1/otel/v1/metrics`\n- `oteltraces` <-> `/v1/otel/v1/traces`\n- `prometheus` <-> `/v1/prometheus`\n- `k8sentity` <-> `/v1/kubernetes`\n- `any` <-> `/v1/*`\n",
        "example": "otellogs"
      }
    },
    "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"
            }
          }
        }
      }
    }
  }
}
````