POST /accounts/{account_id}/workers/observability/telemetry/query

Runs a temporary or saved query

Servers

Path parameters

Name Type Required Description
account_id String Yes

Your Cloudflare account ID.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
dry Boolean No

Whether to perform a dry run without saving the results of the query. Useful for validation

Default value: false

ignoreSeries Boolean No

Whether to ignore time-series data in the results and return only aggregated values

Default value: false

timeframe Object Yes

Time range for the query execution

timeframe.to Number Yes

End timestamp for the query timeframe (Unix timestamp in milliseconds)

timeframe.from Number Yes

Start timestamp for the query timeframe (Unix timestamp in milliseconds)

parameters Object No

Optional parameters to pass to the query execution

parameters.datasets[] Array No

Set the Datasets to query. Leave it empty to query all the datasets.

parameters.filters[] Array No

Configure the Filters to apply to the query.

parameters.filters[].key String Yes
parameters.filters[].operation String Yes

Valid values:

  • "not_in"
  • "eq"
  • "regex"
  • ">"
  • "NOT_IN"
  • "is_null"
  • "<"
  • "INCLUDES"
  • "!="
  • "<="
  • "includes"
  • "lte"
  • "not_includes"
  • "MATCH_REGEX"
  • "starts_with"
  • "gt"
  • "gte"
  • "exists"
  • "="
  • "EXISTS"
  • "lt"
  • "in"
  • "IN"
  • "DOES_NOT_INCLUDE"
  • ">="
  • "DOES_NOT_EXIST"
  • "neq"
  • "STARTS_WITH"
parameters.filters[].type String Yes

Valid values:

  • "string"
  • "boolean"
  • "number"
parameters.filters[].value No
parameters.limit Integer No

Set a limit on the number of results / records returned by the query

parameters.filterCombination String No

Set a Flag to describe how to combine the filters on the query.

Valid values:

  • "AND"
  • "and"
  • "or"
  • "OR"
parameters.orderBy Object No

Configure the order of the results returned by the query.

parameters.orderBy.order String No

Set the order of the results

Valid values:

  • "desc"
  • "asc"
parameters.orderBy.value String Yes

Configure which Calculation to order the results by.

parameters.needle Object No

Define an expression to search using full-text search.

parameters.needle.value String Yes
parameters.needle.matchCase Boolean No
parameters.needle.isRegex Boolean No
parameters.groupBys[] Array No

Define how to group the results of the query.

parameters.groupBys[].type String Yes

Valid values:

  • "string"
  • "boolean"
  • "number"
parameters.groupBys[].value String Yes
parameters.havings[] Array No

Configure the Having clauses that filter on calculations in the query result.

parameters.havings[].key String Yes
parameters.havings[].operation String Yes

Valid values:

  • "gt"
  • "gte"
  • "eq"
  • "lte"
  • "neq"
  • "lt"
parameters.havings[].value Number Yes
parameters.calculations[] Array No

Create Calculations to compute as part of the query.

parameters.calculations[].operator String Yes

Valid values:

  • "count"
  • "MAX"
  • "p10"
  • "COUNT_DISTINCT"
  • "P05"
  • "sum"
  • "median"
  • "p90"
  • "P99"
  • "MIN"
  • "P999"
  • "P75"
  • "P25"
  • "P01"
  • "stddev"
  • "p001"
  • "COUNT"
  • "P95"
  • "VARIANCE"
  • "min"
  • "p01"
  • "p25"
  • "p75"
  • "p99"
  • "p95"
  • "STDDEV"
  • "AVG"
  • "MEDIAN"
  • "P10"
  • "max"
  • "variance"
  • "uniq"
  • "P90"
  • "p05"
  • "P001"
  • "avg"
  • "p999"
  • "SUM"
parameters.calculations[].key String No
parameters.calculations[].keyType String No

Valid values:

  • "string"
  • "boolean"
  • "number"
parameters.calculations[].alias String No
view String No

View type for presenting the query results.

Valid values:

  • "patterns"
  • "requests"
  • "calculations"
  • "traces"
  • "events"
  • "invocations"

Default value: "calculations"

offsetBy Number No

Number of events to skip for pagination. Used in conjunction with offset

chart Boolean No

Whether to include timeseties data in the response

limit Number No

Maximum number of events to return.

Default value: 50

queryId String Yes

Unique identifier for the query to execute

offsetDirection String No

Direction for offset-based pagination (e.g., 'next', 'prev')

granularity Number No

Time granularity for aggregating results (in milliseconds). Controls the bucketing of time-series data

compare Boolean No

Whether to include comparison data with previous time periods

offset String No

Cursor for pagination to retrieve the next set of results

patternType String No

Type of pattern to search for when using pattern-based views

Valid values:

  • "error"
  • "message"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.