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

# List tags

Returns a paginated list of tags (both correlation and metric kinds)
defined across the tenant's datasets. Each entry groups all per-dataset
definitions of a single `(name, kind)` pair.

Use `GET /v1/tags/values` to search tag *values*.

## Filtering and ordering with CEL

The `filter` and `orderBy` query parameters are evaluated as
[Common Expression Language (CEL)](https://cel.dev) expressions over
each tag in the response.

### Available CEL fields

- `name` (string) — tag name; supports `.matches("regex")`
- `kind` (string) — `"Correlation"` or `"Metric"`
- `datasetCount` (int) — number of distinct datasets defining the tag
- `mappings` (list) — per-dataset definitions; supports `.exists(m, ...)`
  quantifier. Each `m` exposes:
    - `m.dataset.id` (int) — dataset id
    - `m.dataset.label` (string) — dataset label (available without
      `expand`); matches the `dataset.record.label` returned in the body
    - `m.path.field` (string)
    - `m.path.path` (string)
    - `m.origin.id` (int, null for Metric) — dataset where the mapping
      was originally declared. Equals `m.dataset.id` when declared
      directly on that dataset; differs when inherited from upstream.
    - `m.origin.label` (string, null for Metric) — label of the origin
      dataset; guard with `m.origin != null` before accessing.
    - `m.createdBy.id` (int, null for Metric)

### Available CEL functions

The tag CEL environment registers the [CEL standard
definitions](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/cel#StdLib)
(operators, `in`, `?:`, `size()`, `string.contains`, `string.startsWith`,
`string.endsWith`, `matches`, etc.) plus the following extension
libraries from
[cel-go v0.28.0](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext):

- [`ext.Strings`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Strings) — `charAt`, `indexOf`, `join`, `lowerAscii`, `replace`, `split`, `substring`, `trim`, `upperAscii`, `format`
- [`ext.Lists`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Lists) — `lists.flatten`, `lists.range`, `lists.slice`
- [`ext.Math`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Math) — `math.greatest`, `math.least`
- [`ext.Sets`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Sets) — `sets.contains`, `sets.equivalent`, `sets.intersects`
- [`ext.Regex`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Regex) — `re.capture`, `re.extract`
- [`ext.Encoders`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Encoders) — `base64.encode`, `base64.decode`
- [`ext.Bindings`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Bindings) — `cel.bind` for let-binding sub-expressions
- [`ext.Protos`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Protos) — protobuf helpers
- [`cel.OptionalTypes`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/cel#OptionalTypes) — `optional.of`, `optional.ofNonZero`, `optional.none`

### Defaults

- Default page size: 50; maximum: 100.
- Default order: `kind` ascending, then `name` ascending.

Set `expand=true` to inline the `dataset.record` brief (label,
description, iconUrl, contentType) on every dataset reference.

Set `sampleValues=true` to attach a bounded sample of each tag's
values (see the `sampleValues` parameter).


# 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/tags": {
      "get": {
        "summary": "List tags",
        "description": "Returns a paginated list of tags (both correlation and metric kinds)\ndefined across the tenant's datasets. Each entry groups all per-dataset\ndefinitions of a single `(name, kind)` pair.\n\nUse `GET /v1/tags/values` to search tag *values*.\n\n## Filtering and ordering with CEL\n\nThe `filter` and `orderBy` query parameters are evaluated as\n[Common Expression Language (CEL)](https://cel.dev) expressions over\neach tag in the response.\n\n### Available CEL fields\n\n- `name` (string) — tag name; supports `.matches(\"regex\")`\n- `kind` (string) — `\"Correlation\"` or `\"Metric\"`\n- `datasetCount` (int) — number of distinct datasets defining the tag\n- `mappings` (list) — per-dataset definitions; supports `.exists(m, ...)`\n  quantifier. Each `m` exposes:\n    - `m.dataset.id` (int) — dataset id\n    - `m.dataset.label` (string) — dataset label (available without\n      `expand`); matches the `dataset.record.label` returned in the body\n    - `m.path.field` (string)\n    - `m.path.path` (string)\n    - `m.origin.id` (int, null for Metric) — dataset where the mapping\n      was originally declared. Equals `m.dataset.id` when declared\n      directly on that dataset; differs when inherited from upstream.\n    - `m.origin.label` (string, null for Metric) — label of the origin\n      dataset; guard with `m.origin != null` before accessing.\n    - `m.createdBy.id` (int, null for Metric)\n\n### Available CEL functions\n\nThe tag CEL environment registers the [CEL standard\ndefinitions](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/cel#StdLib)\n(operators, `in`, `?:`, `size()`, `string.contains`, `string.startsWith`,\n`string.endsWith`, `matches`, etc.) plus the following extension\nlibraries from\n[cel-go v0.28.0](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext):\n\n- [`ext.Strings`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Strings) — `charAt`, `indexOf`, `join`, `lowerAscii`, `replace`, `split`, `substring`, `trim`, `upperAscii`, `format`\n- [`ext.Lists`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Lists) — `lists.flatten`, `lists.range`, `lists.slice`\n- [`ext.Math`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Math) — `math.greatest`, `math.least`\n- [`ext.Sets`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Sets) — `sets.contains`, `sets.equivalent`, `sets.intersects`\n- [`ext.Regex`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Regex) — `re.capture`, `re.extract`\n- [`ext.Encoders`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Encoders) — `base64.encode`, `base64.decode`\n- [`ext.Bindings`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Bindings) — `cel.bind` for let-binding sub-expressions\n- [`ext.Protos`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/ext#Protos) — protobuf helpers\n- [`cel.OptionalTypes`](https://pkg.go.dev/github.com/google/cel-go@v0.28.0/cel#OptionalTypes) — `optional.of`, `optional.ofNonZero`, `optional.none`\n\n### Defaults\n\n- Default page size: 50; maximum: 100.\n- Default order: `kind` ascending, then `name` ascending.\n\nSet `expand=true` to inline the `dataset.record` brief (label,\ndescription, iconUrl, contentType) on every dataset reference.\n\nSet `sampleValues=true` to attach a bounded sample of each tag's\nvalues (see the `sampleValues` parameter).\n",
        "operationId": "ListDatasetTags",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "CEL expression that response tags must match. Must evaluate to\n`bool`. Must be URL-encoded. See the operation description for\navailable fields.\n",
            "schema": {
              "type": "string"
            },
            "examples": {
              "byNameRegex": {
                "summary": "Tags whose name matches a regex",
                "value": "name.matches(\"^env.*\")"
              },
              "byExactName": {
                "summary": "Tags with an exact name",
                "value": "name == \"service\""
              },
              "correlationOnDataset": {
                "summary": "Correlation tags defined on dataset 41000123",
                "value": "kind == \"Correlation\" && mappings.exists(m, m.dataset.id == 41000123)"
              },
              "anyTagOnDataset": {
                "summary": "Any tag (either kind) defined on a particular dataset",
                "value": "mappings.exists(m, m.dataset.id == 41000123)"
              },
              "byDatasetNameSubstring": {
                "summary": "Tags whose dataset name contains a substring (case-insensitive)",
                "value": "mappings.exists(m, m.dataset.label.lowerAscii().contains(\"orders\"))"
              },
              "byDatasetNameRegex": {
                "summary": "Tags on datasets whose name matches a regex",
                "value": "mappings.exists(m, m.dataset.label.matches(\"(?i)^orders\"))"
              },
              "declaredDirectly": {
                "summary": "Correlation tags declared directly on a dataset (not inherited)",
                "value": "kind == \"Correlation\" && mappings.exists(m, m.origin != null && m.origin.id == m.dataset.id)"
              },
              "inheritedFromUpstream": {
                "summary": "Correlation tags inherited from a different upstream dataset",
                "value": "kind == \"Correlation\" && mappings.exists(m, m.origin != null && m.origin.id != m.dataset.id)"
              },
              "inheritedFromSpecificDataset": {
                "summary": "Correlation tags inherited specifically from dataset 41000999",
                "value": "mappings.exists(m, m.origin != null && m.origin.id == 41000999 && m.dataset.id != 41000999)"
              }
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "required": false,
            "description": "CSV CEL expressions; default `kind,name`. Prefix an item with `-`\nfor descending. Supported expressions evaluate to comparable values\n(e.g. `name`, `kind`, `datasetCount`).\n",
            "schema": {
              "type": "string"
            },
            "example": "kind,name"
          },
          {
            "$ref": "#/components/parameters/OffsetParam"
          },
          {
            "$ref": "#/components/parameters/LimitParam"
          },
          {
            "$ref": "#/components/parameters/ExpandParam"
          },
          {
            "name": "sampleValues",
            "in": "query",
            "required": false,
            "description": "When `true`, each returned tag includes up to 20 sample values in\n`sampleValues`. This is a bounded, non-paginated sample, NOT the\nfull value set. Sampling is best-effort: `sampleValues` may be\nempty or absent for a tag whose values could not be retrieved.\nUse `GET /v1/tags/values` to search across tag values.\n",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tags retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag-ListResponse"
                }
              }
            }
          },
          "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"
          }
        }
      },
      "Meta": {
        "description": "List Response Metadata",
        "type": "object",
        "required": [
          "totalCount"
        ],
        "properties": {
          "totalCount": {
            "description": "The total number of resources available, independent of pagination.\nThe API may return -1 if the total count is unknown or cannot be computed\nin reasonable time.\n",
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "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"
          }
        }
      },
      "Dataset-FieldPath": {
        "title": "FieldPath",
        "type": "object",
        "required": [
          "field",
          "path"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        }
      },
      "TagKind": {
        "title": "TagKind",
        "type": "string",
        "enum": [
          "Metric",
          "Correlation"
        ],
        "description": "Kind of tag."
      },
      "Tag-Mapping": {
        "title": "TagMapping",
        "type": "object",
        "description": "A single per-dataset definition of a tag.\n",
        "required": [
          "dataset",
          "path",
          "origin",
          "discoveryRuleAlias",
          "createdBy"
        ],
        "properties": {
          "dataset": {
            "$ref": "#/components/schemas/DatasetRef"
          },
          "path": {
            "$ref": "#/components/schemas/Dataset-FieldPath"
          },
          "origin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DatasetRef"
              },
              {
                "type": "null"
              }
            ],
            "description": "The dataset in which this mapping was originally declared. When\nthe tag was declared directly on `dataset`, `origin.id` equals\n`dataset.id`. When the tag was inherited from an upstream\ndataset, `origin` points to that upstream dataset. Only\nmeaningful for `kind=Correlation`; always `null` for\n`kind=Metric`. Mirrors the GraphQL `TagSourceInfo.origin`\nconvention.\n"
          },
          "discoveryRuleAlias": {
            "type": [
              "string",
              "null"
            ],
            "description": "The discovery rule alias that created this mapping, or `null` when\nthe mapping was not created by a discovery rule. Only meaningful\nfor `kind=Correlation`; always `null` for `kind=Metric`. If the tag\nis inherited from an upstream dataset, this field points to the\ndiscovery rule alias that created the mapping on the origin\ndataset.\n"
          },
          "createdBy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/User"
              },
              {
                "type": "null"
              }
            ],
            "description": "User who declared this mapping on `origin`. Only meaningful for\n`kind=Correlation`; always `null` for `kind=Metric`.\n"
          }
        }
      },
      "Tag-Resource": {
        "title": "TagObject",
        "type": "object",
        "description": "A tag (correlation or metric) along with every dataset that defines\nit. Tags are identified by `(name, kind)`; there is no ObjectId for\na tag — `name` is the natural identifier within a kind.\n",
        "required": [
          "name",
          "kind",
          "datasetCount",
          "mappings"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Tag name. Natural identifier within `kind`."
          },
          "kind": {
            "$ref": "#/components/schemas/TagKind"
          },
          "datasetCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of distinct datasets in which this tag is defined."
          },
          "mappings": {
            "type": "array",
            "description": "Per-dataset definitions of the tag. Always populated; use the\n`mappings.exists(m, m.dataset.id == ...)` CEL quantifier to\nfilter tags scoped to a specific dataset.\n\nLimited to 20 entries.\n",
            "items": {
              "$ref": "#/components/schemas/Tag-Mapping"
            }
          },
          "sampleValues": {
            "type": "array",
            "description": "Up to 20 sample values observed for this tag, scoped to the\ndatasets the caller can view. Present only when the request sets\n`sampleValues=true`. This is a bounded, non-paginated sample, NOT\nthe full value set; it may be empty or absent when values could\nnot be retrieved. Use `GET /v1/tags/values` to search values.\n",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Tag-ListResponse": {
        "title": "TagListResponse",
        "type": "object",
        "required": [
          "tags",
          "meta"
        ],
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag-Resource"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      }
    },
    "parameters": {
      "LimitParam": {
        "name": "limit",
        "in": "query",
        "description": "Maximum number of items to return in the response",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "OffsetParam": {
        "name": "offset",
        "in": "query",
        "description": "Number of items to skip before starting to collect the result set",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "ExpandParam": {
        "name": "expand",
        "in": "query",
        "description": "Whether to expand resources referenced in the response to include additional fields",
        "schema": {
          "type": "boolean"
        }
      }
    },
    "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"
            }
          }
        }
      }
    }
  }
}
````