POST /accounts/{account_id}/workers/observability/queries

Persist query for later use.

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
name String Yes

Query name

description String Yes
parameters Object Yes
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. Supports nested groups via kind: 'group'.

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.

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.