Search + K

Command Palette

Search for a command to run...

Sign In

Create a rollup job

Deprecated
PUT /_rollup/job/{id}
Copy endpoint

WARNING: From 8.15.0, calling this API in a cluster with no rollup usage will fail with a message about the deprecation and planned removal of rollup features. A cluster needs to contain either a rollup job or a rollup index in order for this API to be allowed to run.

The rollup job configuration contains all the details about how the job should run, when it indexes documents, and what future queries will be able to run against the rollup index.

There are three main sections to the job configuration: the logistical details about the job (for example, the cron schedule), the fields that are used for grouping, and what metrics to collect for each group.

Jobs are created in a STOPPED state. You can start them with the start rollup jobs API.

Required authorization

  • Cluster privileges: manage,manage_rollup

Parameters

path Path Parameters

Name Type
id required

Identifier for the rollup job. This can be any alphanumeric string and uniquely identifies the data that is associated with the rollup job. The ID is persistent; it is stored with the rolled up data. If you create a job, let it run for a while, then delete the job, the data that the job rolled up is still be associated with this job ID. You cannot create a new job with the same ID since that could lead to problems with mismatched job configurations.

type TypesId = string

Request Body

application/json required
{
cron: string;
groups: RollupTypesGroupings
interface RollupTypesGroupings {
date_histogram?: RollupTypesDateHistogramGrouping;
histogram?: RollupTypesHistogramGrouping;
terms?: RollupTypesTermsGrouping;
}
;
index_pattern: string;
metrics?: RollupTypesFieldMetric
interface RollupTypesFieldMetric {
field: TypesField;
metrics: RollupTypesMetric[];
}
[]
;
page_size: number;
rollup_index: TypesIndexName
type TypesIndexName = string
;
timeout?: TypesDuration

A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

type TypesDuration = string | "-1" | "0"
;
headers?: TypesHttpHeaders
interface TypesHttpHeaders {
[key: string]: string[] | string;
}
;
}

Responses

200 application/json
interface TypesAcknowledgedResponseBase {
acknowledged: boolean;
}