1
1
[role="xpack"]
2
2
[testenv="basic"]
3
3
[[rollup-get-rollup-caps]]
4
- === Get rollup job capabilities API
4
+ === Get { rollup- job} capabilities API
5
5
++++
6
6
<titleabbrev>Get rollup caps</titleabbrev>
7
7
++++
8
8
9
+ Returns the capabilities of any {rollup-jobs} that have been configured for a
10
+ specific index or index pattern.
11
+
9
12
experimental[]
10
13
11
- This API returns the capabilities of any rollup jobs that have been configured
12
- for a specific index or index pattern.
14
+ [[rollup-get-rollup-caps-request]]
15
+ ==== {api-request-title}
16
+
17
+ `GET _rollup/data/<index>`
18
+
19
+ [[rollup-get-rollup-caps-prereqs]]
20
+ ==== {api-prereq-title}
13
21
14
- This API is useful because a rollup job is often configured to rollup only a
22
+ * If the {es} {security-features} are enabled, you must have `monitor`,
23
+ `monitor_rollup`, `manage` or `manage_rollup` cluster privileges to use this API.
24
+ For more information, see <<security-privileges>>.
25
+
26
+ [[rollup-get-rollup-caps-desc]]
27
+ ==== {api-description-title}
28
+
29
+ This API is useful because a {rollup-job} is often configured to rollup only a
15
30
subset of fields from the source index. Furthermore, only certain aggregations
16
31
can be configured for various fields, leading to a limited subset of
17
32
functionality depending on that configuration.
@@ -22,33 +37,20 @@ This API enables you to inspect an index and determine:
22
37
2. If yes to the first question, what fields were rolled up, what aggregations
23
38
can be performed, and where does the data live?
24
39
25
- ==== Request
26
-
27
- `GET _rollup/data/{index}`
28
-
29
- //===== Description
30
-
31
- ==== Path Parameters
32
-
33
- `index`::
34
- (string) Index, indices or index-pattern to return rollup capabilities for. `_all` may be used to fetch
35
- rollup capabilities from all jobs
36
-
37
-
38
- ==== Request Body
39
-
40
- There is no request body for the Get Rollup Caps API.
40
+ [[rollup-get-rollup-path-params]]
41
+ ==== {api-path-parms-title}
41
42
42
- ==== Authorization
43
+ `<index>`::
44
+ (string) Index, indices or index-pattern to return rollup capabilities for.
45
+ `_all` may be used to fetch rollup capabilities from all jobs.
43
46
44
- You must have `monitor`, `monitor_rollup`, `manage` or `manage_rollup` cluster privileges to use this API.
45
- For more information, see
46
- <<security-privileges>>.
47
47
48
- ==== Examples
48
+ [[rollup-get-rollup-example]]
49
+ ==== {api-examples-title}
49
50
50
- Imagine we have an index named `sensor-1` full of raw data. We know that the data will grow over time, so there
51
- will be a `sensor-2`, `sensor-3`, etc. Let's create a Rollup job that targets the index pattern `sensor-*` to accommodate
51
+ Imagine we have an index named `sensor-1` full of raw data. We know that the
52
+ data will grow over time, so there will be a `sensor-2`, `sensor-3`, etc. Let's
53
+ create a {rollup-job} that targets the index pattern `sensor-*` to accommodate
52
54
this future scaling:
53
55
54
56
[source,console]
@@ -83,7 +85,8 @@ PUT _rollup/job/sensor
83
85
--------------------------------------------------
84
86
// TEST[setup:sensor_index]
85
87
86
- We can then retrieve the rollup capabilities of that index pattern (`sensor-*`) via the following command:
88
+ We can then retrieve the rollup capabilities of that index pattern (`sensor-*`)
89
+ via the following command:
87
90
88
91
[source,console]
89
92
--------------------------------------------------
@@ -139,17 +142,21 @@ Which will yield the following response:
139
142
}
140
143
----
141
144
142
- The response that is returned contains information that is similar to the original Rollup configuration, but formatted
143
- differently. First, there are some house-keeping details: the Rollup job's ID, the index that holds the rolled data,
144
- the index pattern that the job was targeting.
145
+ The response that is returned contains information that is similar to the
146
+ original rollup configuration, but formatted differently. First, there are some
147
+ house-keeping details: the {rollup-job} ID, the index that holds the rolled data,
148
+ and the index pattern that the job was targeting.
145
149
146
- Next it shows a list of fields that contain data eligible for rollup searches. Here we see four fields: `node`, `temperature`,
147
- `timestamp` and `voltage`. Each of these fields list the aggregations that are possible. For example, you can use a min, max
148
- or sum aggregation on the `temperature` field, but only a `date_histogram` on `timestamp`.
150
+ Next it shows a list of fields that contain data eligible for rollup searches.
151
+ Here we see four fields: `node`, `temperature`, `timestamp` and `voltage`. Each
152
+ of these fields list the aggregations that are possible. For example, you can
153
+ use a min, max or sum aggregation on the `temperature` field, but only a
154
+ `date_histogram` on `timestamp`.
149
155
150
- Note that the `rollup_jobs` element is an array; there can be multiple, independent jobs configured for a single index
151
- or index pattern. Each of these jobs may have different configurations, so the API returns a list of all the various
152
- configurations available.
156
+ Note that the `rollup_jobs` element is an array; there can be multiple,
157
+ independent jobs configured for a single index or index pattern. Each of these
158
+ jobs may have different configurations, so the API returns a list of all the
159
+ various configurations available.
153
160
154
161
We could also retrieve the same information with a request to `_all`:
155
162
@@ -159,7 +166,8 @@ GET _rollup/data/_all
159
166
--------------------------------------------------
160
167
// TEST[continued]
161
168
162
- But note that if we use the concrete index name (`sensor-1`), we'll retrieve no rollup capabilities:
169
+ But note that if we use the concrete index name (`sensor-1`), we'll retrieve no
170
+ rollup capabilities:
163
171
164
172
[source,console]
165
173
--------------------------------------------------
@@ -174,7 +182,9 @@ GET _rollup/data/sensor-1
174
182
}
175
183
----
176
184
177
- Why is this? The original rollup job was configured against a specific index pattern (`sensor-*`) not a concrete index
178
- (`sensor-1`). So while the index belongs to the pattern, the rollup job is only valid across the entirety of the pattern
179
- not just one of it's containing indices. So for that reason, the Rollup Capabilities API only returns information based
180
- on the originally configured index name or pattern.
185
+ Why is this? The original {rollup-job} was configured against a specific index
186
+ pattern (`sensor-*`) not a concrete index (`sensor-1`). So while the index
187
+ belongs to the pattern, the {rollup-job} is only valid across the entirety of
188
+ the pattern not just one of it's containing indices. So for that reason, the
189
+ get rollup capabilities API only returns information based on the originally
190
+ configured index name or pattern.
0 commit comments