Skip to content
Start here

List values

client.workers.observability.telemetry.values(TelemetryValuesParams { account_id, datasets, key, 5 more } params, RequestOptionsoptions?): SinglePage<TelemetryValuesResponse { dataset, key, type, value } >
POST/accounts/{account_id}/workers/observability/telemetry/values

List unique values found in your events.

Security
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
User Service Key

Used when interacting with the Origin CA certificates API. View/change your key.

Example:X-Auth-User-Service-Key: v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719
Accepted Permissions (at least one required)
Workers Observability Write
ParametersExpand Collapse
params: TelemetryValuesParams { account_id, datasets, key, 5 more }
account_id: string

Path param: Your Cloudflare account ID.

datasets: Array<string>

Body param: Leave this empty to use the default datasets

key: string

Body param

timeframe: Timeframe

Body param

from: number
to: number
type: "string" | "boolean" | "number"

Body param

One of the following:
"string"
"boolean"
"number"
filters?: Array<UnionMember0 { filterCombination, filters, kind } | WorkersObservabilityFilterLeaf { key, operation, type, 2 more } >

Body param: Apply filters before listing values. Supports nested groups via kind: ‘group’. Maximum nesting depth is 4.

One of the following:
UnionMember0 { filterCombination, filters, kind }
filterCombination: "and" | "or" | "AND" | "OR"
One of the following:
"and"
"or"
"AND"
"OR"
filters: Array<unknown>
kind: "group"
WorkersObservabilityFilterLeaf { key, operation, type, 2 more }

Filtering best practices: use observability_keys and observability_values to confirm available fields and values. If searching for errors, filter for $metadata.error exists.

key: string

Filter field name. IMPORTANT: do not guess keys. Always use verified keys from previous query results or the observability_keys response. Preferred keys: $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, $metadata.error.

operation: "includes" | "not_includes" | "starts_with" | 25 more
One of the following:
"includes"
"not_includes"
"starts_with"
"regex"
"exists"
"is_null"
"in"
"not_in"
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
"="
"!="
">"
">="
"<"
"<="
"INCLUDES"
"DOES_NOT_INCLUDE"
"MATCH_REGEX"
"EXISTS"
"DOES_NOT_EXIST"
"IN"
"NOT_IN"
"STARTS_WITH"
type: "string" | "number" | "boolean"
One of the following:
"string"
"number"
"boolean"
kind?: "filter"
value?: string | number | boolean

Filter comparison value. IMPORTANT: must match actual values in your logs. Verify using previous query results or the /values endpoint. Ensure value type matches the field type. String comparisons are case-sensitive unless using specific operations. Regex uses ClickHouse RE2 syntax (no lookaheads/lookbehinds); examples: ^5\d{2}$ for HTTP 5xx, \bERROR\b for word boundary.

One of the following:
string
number
boolean
limit?: number

Body param

needle?: Needle

Body param: Search for a specific substring in the event.

value: string | number | boolean
maxLength1000
One of the following:
string
number
boolean
isRegex?: boolean
matchCase?: boolean
ReturnsExpand Collapse
TelemetryValuesResponse { dataset, key, type, value }
dataset: string
key: string
type: "string" | "boolean" | "number"
One of the following:
"string"
"boolean"
"number"
value: string | number | boolean
One of the following:
string
number
boolean

List values

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const telemetryValuesResponse of client.workers.observability.telemetry.values({
  account_id: 'account_id',
  datasets: ['string'],
  key: 'key',
  timeframe: { from: 0, to: 0 },
  type: 'string',
})) {
  console.log(telemetryValuesResponse.dataset);
}
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "messages": [
    {
      "message": "Successful request"
    }
  ],
  "result": [
    {
      "dataset": "dataset",
      "key": "key",
      "type": "string",
      "value": "string"
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "messages": [
    {
      "message": "Successful request"
    }
  ],
  "result": [
    {
      "dataset": "dataset",
      "key": "key",
      "type": "string",
      "value": "string"
    }
  ],
  "success": true
}