[Transform] Transform _schedule_now API (#92948)

This commit is contained in:
Przemysław Witek 2023-02-02 19:03:16 +01:00 committed by GitHub
parent a71210c111
commit f60401a61c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1011 additions and 5 deletions

View file

@ -18,6 +18,7 @@ _transform/
* <<reset-transform,Reset {transforms}>>
* <<start-transform,Start {transforms}>>
* <<stop-transform,Stop {transforms}>>
* <<schedule-now-transform,Schedule Now {transforms}>>
* <<update-transform,Update {transforms}>>
For the full list, see <<transform-apis>>.

View file

@ -15,6 +15,8 @@ include::reset-transform.asciidoc[leveloffset=+2]
include::start-transform.asciidoc[leveloffset=+2]
//STOP
include::stop-transform.asciidoc[leveloffset=+2]
//SCHEDULE_NOW
include::schedule-now-transform.asciidoc[leveloffset=+2]
//UPDATE-UPGRADE
include::update-transform.asciidoc[leveloffset=+2]
include::upgrade-transforms.asciidoc[leveloffset=+2]

View file

@ -0,0 +1,63 @@
[role="xpack"]
[testenv="basic"]
[[schedule-now-transform]]
= Schedule Now {transform} API
[subs="attributes"]
++++
<titleabbrev>Shedule Now {transform}</titleabbrev>
++++
Schedules now a {transform}.
[[schedule-now-transform-request]]
== {api-request-title}
`POST _transform/<transform_id>/_schedule_now`
[[schedule-now-transform-prereqs]]
== {api-prereq-title}
* Requires the `manage_transform` cluster privilege. This privilege is included
in the `transform_admin` built-in role.
[schedule-now-transform-desc]]
== {api-description-title}
If you _schedule_now a {transform}, it will process the new data instantly,
without waiting for the configured `frequency` interval.
After _schedule_now API is called, the transform will be processed again at
`now + frequency` unless _schedule_now API is called again in the meantime.
[[schedule-now-transform-path-parms]]
== {api-path-parms-title}
`<transform_id>`::
(Required, string)
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=transform-id]
[[schedule-now-transform-query-parms]]
== {api-query-parms-title}
`timeout`::
(Optional, time)
Period to wait for a response. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to `30s`.
[[schedule-now-transform-examples]]
== {api-examples-title}
[source,console]
--------------------------------------------------
POST _transform/ecommerce_transform/_schedule_now
--------------------------------------------------
// TEST[skip:setup kibana sample data]
When the {transform} is scheduled now, you receive the following results:
[source,console-result]
----
{
"acknowledged" : true
}
----

View file

@ -10,5 +10,6 @@
* <<reset-transform>>
* <<start-transform>>
* <<stop-transform>>
* <<schedule-now-transform>>
* <<update-transform>>
* <<upgrade-transforms>>