File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
docs/pages/product/apis-integrations/rest-api Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,7 @@ Trigger pre-aggregation build jobs or retrieve statuses of such jobs.
279279| ` selector.datasources ` | Array of data source names which have pre-aggregations defined | ❌ |
280280| ` selector.cubes ` | Array of cube names which contain pre-aggregations | ❌ |
281281| ` selector.preAggregations ` | Array of pre-aggregation names | ❌ |
282+ | ` selector.dateRange ` | Date Range tuple [ 'range-date-start', 'range-date-end'] | ❌ |
282283
283284To trigger pre-aggregation builds, send a ` POST ` request with a payload
284285including ` post ` as the ` action ` and ` selector ` properties. The response will
@@ -340,6 +341,27 @@ curl \
340341 https://localhost:4000/cubejs-api/v1/pre-aggregations/jobs
341342```
342343
344+ Example request triggering builds of the ` main ` pre-aggregation defined in the
345+ ` orders ` cube within date range with some security context data
346+ and an ` America/Los_Angeles ` timezone:
347+
348+ ``` bash{outputLines: 2-13}
349+ curl \
350+ -d '{
351+ "action": "post",
352+ "selector": {
353+ "contexts": [{ "securityContext": { "tenantId": "tenant1" } }],
354+ "timezones": ["America/Los_Angeles"],
355+ "preAggregations": ["orders.main"],
356+ "dateRange": ["2020-01-01", "2020-02-01"]
357+ }
358+ }' \
359+ -H "Authorization: EXAMPLE-API-TOKEN" \
360+ -H "Content-Type: application/json" \
361+ -X POST \
362+ https://localhost:4000/cubejs-api/v1/pre-aggregations/jobs
363+ ```
364+
343365Example response:
344366
345367``` json
You can’t perform that action at this time.
0 commit comments