POST /3/patterns/distribution

Buckets one or more numeric fields into histograms and returns an object keyed by histogram<Field>, each mapping a bin label to a count. distributions and parameters are required; filters is optional. Discover valid field kinds per domain with /3/patterns/fields.

Servers

Request headers

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

Default value: "application/json"

Query parameters

Name Type Required Description
index String No

Comma-separated list of indices the request runs on, used for authorization. Required for index-restricted API keys and must match the indices supplied in the request body's indices parameter; optional for unrestricted keys.

Request body fields

Name Type Required Description
filters[] Array No

Filter conditions.

filters[].parameter Object No
filters[].parameter.domain String No

Domain the parameter belongs to.

filters[].parameter.kind String Yes

Parameter identifier that resolves to a value supplied in parameters.

filters[].operator String No

Comparison operator applied to a filter field, one of: =, !=, >, <, >=, <=, IN, TAG_TREE, CONTAINS, STARTS_WITH, CONTAINS_PREFIX. Requires a parameter to carry the operand.

filters[].domain String No

Domain the field belongs to.

filters[].kind String Yes

Field to filter on. With no operator, the field must be boolean.

distributions[] Array Yes

Histogram specifications.

distributions[].domain String No

Domain the field belongs to.

distributions[].kind String Yes

Numeric field to bucket into a histogram.

distributions[].continuous Boolean No

Set to true for continuous kinds; use float bins.

Default value: false

distributions[].bins[] Array Yes

Bin edges.

parameters[] Array Yes

Literal values referenced by the query.

parameters[].domain String No

Domain the parameter belongs to.

parameters[].value Yes

Literal value. Its JSON type depends on kind (array of strings for indices, string for dates, tags, and country, number for numeric operands, and so on).

parameters[].kind String Yes

Parameter identifier, for example indices, startDate, endDate, tags, or country.

domain String No

Default domain propagated to entries that omit their own.

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.