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
- https://analytics.{region}.algolia.com
- https://analytics.algolia.com
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 |
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 |
filters[].operator |
String | No |
Comparison operator applied to a filter field, one of: |
filters[].domain |
String | No |
Domain the field belongs to. |
filters[].kind |
String | Yes |
Field to filter on. With no |
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 |
|
parameters[].kind |
String | Yes |
Parameter identifier, for example |
domain |
String | No |
Default domain propagated to entries that omit their own. |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.