mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
HLRC: ML Get Calendar Events (#35747)
* HLRC: ML Get Calendar Events * Addressing PR comments
This commit is contained in:
parent
643bb20137
commit
84db1e42c0
11 changed files with 628 additions and 0 deletions
65
docs/java-rest/high-level/ml/get-calendar-events.asciidoc
Normal file
65
docs/java-rest/high-level/ml/get-calendar-events.asciidoc
Normal file
|
@ -0,0 +1,65 @@
|
|||
--
|
||||
:api: get-calendar-events
|
||||
:request: GetCalendarEventsRequest
|
||||
:response: GetCalendarEventsResponse
|
||||
--
|
||||
[id="{upid}-{api}"]
|
||||
=== Get Calendar Events API
|
||||
Retrieves a calendars events.
|
||||
It accepts a +{request}+ and responds
|
||||
with a +{response}+ object.
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Get Calendars Request
|
||||
|
||||
A +{request}+ requires a non-null calendar ID.
|
||||
Using the literal `_all` returns the events for all calendars.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
<1> Constructing a new request for the specified calendarId
|
||||
|
||||
==== Optional Arguments
|
||||
The following arguments are optional:
|
||||
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-page]
|
||||
--------------------------------------------------
|
||||
<1> The page parameters `from` and `size`. `from` specifies the number of events to skip.
|
||||
`size` specifies the maximum number of events to get. Defaults to `0` and `100` respectively.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-start]
|
||||
--------------------------------------------------
|
||||
<1> Specifies to get events with timestamps after this time.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-end]
|
||||
--------------------------------------------------
|
||||
<1> Specifies to get events with timestamps earlier than this time.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-jobid]
|
||||
--------------------------------------------------
|
||||
<1> Get events for the job. When this option is used calendar_id must be `_all`
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Get calendars Response
|
||||
|
||||
The returned +{response}+ contains the requested events:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
||||
<1> The count of events that were matched
|
||||
<2> The events retrieved
|
|
@ -266,6 +266,7 @@ The Java High Level REST Client supports the following Machine Learning APIs:
|
|||
* <<{upid}-get-categories>>
|
||||
* <<{upid}-get-calendars>>
|
||||
* <<{upid}-put-calendar>>
|
||||
* <<{upid}-get-calendar-events>>
|
||||
* <<{upid}-post-calendar-event>>
|
||||
* <<{upid}-put-calendar-job>>
|
||||
* <<{upid}-delete-calendar-job>>
|
||||
|
@ -304,6 +305,7 @@ include::ml/get-influencers.asciidoc[]
|
|||
include::ml/get-categories.asciidoc[]
|
||||
include::ml/get-calendars.asciidoc[]
|
||||
include::ml/put-calendar.asciidoc[]
|
||||
include::ml/get-calendar-events.asciidoc[]
|
||||
include::ml/post-calendar-event.asciidoc[]
|
||||
include::ml/put-calendar-job.asciidoc[]
|
||||
include::ml/delete-calendar-job.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue