List keys
List all the keys in your telemetry events.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYUser Service Key
Used when interacting with the Origin CA certificates API. View/change your key.
X-Auth-User-Service-Key: v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719Accepted Permissions (at least one required)
Workers Observability WriteParametersExpand Collapse
params ObservabilityTelemetryKeysParams
Filters param.Field[[]ObservabilityTelemetryKeysParamsFilter]OptionalBody param: Apply filters to narrow key discovery. Supports nested groups via kind: ‘group’. Maximum nesting depth is 4.
Body param: Apply filters to narrow key discovery. Supports nested groups via kind: ‘group’. Maximum nesting depth is 4.
type ObservabilityTelemetryKeysParamsFiltersObject struct{…}
FilterCombination ObservabilityTelemetryKeysParamsFiltersObjectFilterCombination
Filters []ObservabilityTelemetryKeysParamsFiltersObjectFilter
type ObservabilityTelemetryKeysParamsFiltersObjectFiltersObject struct{…}
FilterCombination ObservabilityTelemetryKeysParamsFiltersObjectFiltersObjectFilterCombination
type ObservabilityTelemetryKeysParamsFiltersObjectFiltersWorkersObservabilityFilterLeaf struct{…}A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.
A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.
Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.
Operation ObservabilityTelemetryKeysParamsFiltersObjectFiltersWorkersObservabilityFilterLeafOperationComparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.
Comparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.
Type ObservabilityTelemetryKeysParamsFiltersObjectFiltersWorkersObservabilityFilterLeafTypeData type of the filter field. Must match the actual type of the key being filtered.
Data type of the filter field. Must match the actual type of the key being filtered.
Discriminator for leaf filter nodes. Always ‘filter’ when present; may be omitted.
Value ObservabilityTelemetryKeysParamsFiltersObjectFiltersWorkersObservabilityFilterLeafValueUnionOptionalComparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).
Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).
type ObservabilityTelemetryKeysParamsFiltersWorkersObservabilityFilterLeaf struct{…}A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.
A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.
Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.
Operation ObservabilityTelemetryKeysParamsFiltersWorkersObservabilityFilterLeafOperationComparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.
Comparison operator. String operators: includes, not_includes, starts_with, ends_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.
Type ObservabilityTelemetryKeysParamsFiltersWorkersObservabilityFilterLeafTypeData type of the filter field. Must match the actual type of the key being filtered.
Data type of the filter field. Must match the actual type of the key being filtered.
Discriminator for leaf filter nodes. Always ‘filter’ when present; may be omitted.
Value ObservabilityTelemetryKeysParamsFiltersWorkersObservabilityFilterLeafValueUnionOptionalComparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).
Comparison value. Must match actual values in your data — verify with the values endpoint. Ensure the value type (string/number/boolean) matches the field type. String comparisons are case-sensitive. Regex uses RE2 syntax (no lookaheads/lookbehinds).
Body param: If the user suggests a key, use this to narrow down the list of keys returned. Make sure matchCase is false to avoid case sensitivity issues.
Body param: If the user suggests a key, use this to narrow down the list of keys returned. Make sure matchCase is false to avoid case sensitivity issues.
Body param: Advanced usage: set limit=1000+ to retrieve comprehensive key options without needing additional filtering.
ReturnsExpand Collapse
type ObservabilityTelemetryKeysResponse struct{…}
List keys
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/option"
"github.com/stainless-sdks/cloudflare-go/workers"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
page, err := client.Workers.Observability.Telemetry.Keys(context.TODO(), workers.ObservabilityTelemetryKeysParams{
AccountID: cloudflare.F("account_id"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"errors": [
{
"message": "message"
}
],
"messages": [
{
"message": "Successful request"
}
],
"result": [
{
"key": "key",
"lastSeenAt": 0,
"type": "string"
}
],
"success": true
}Returns Examples
{
"errors": [
{
"message": "message"
}
],
"messages": [
{
"message": "Successful request"
}
],
"result": [
{
"key": "key",
"lastSeenAt": 0,
"type": "string"
}
],
"success": true
}