Skip to content

Commit 67f2f14

Browse files
authored
Adds missing doc details for ML get calendar APIs
1 parent 3c44fb0 commit 67f2f14

File tree

5 files changed

+64
-30
lines changed

5 files changed

+64
-30
lines changed

output/schema/schema.json

+37-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/ml/get_calendar_events/MlGetCalendarEventsRequest.ts

+14-4
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,31 @@ import { integer } from '@_types/Numeric'
2323
import { DateString } from '@_types/Time'
2424

2525
/**
26+
* Retrieves information about the scheduled events in calendars.
2627
* @rest_spec_name ml.get_calendar_events
2728
* @since 6.2.0
2829
* @stability stable
30+
* @cluster_privileges monitor_ml
2931
*/
3032
export interface Request extends RequestBase {
3133
path_parts: {
34+
/** A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.*/
3235
calendar_id: Id
3336
}
3437
query_parameters: {
35-
job_id?: Id // undocumented
36-
// these params below should all be in the request body, but the tests are failing
37-
// https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html#ml-get-calendar-event-request-body
38+
/** Specifies to get events with timestamps earlier than this time. */
3839
end?: DateString
40+
/** Skips the specified number of events.
41+
* @server_default 0
42+
*/
3943
from?: integer
40-
start?: string
44+
/** Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of `_all` or `*`. */
45+
job_id?: Id
46+
/** Specifies the maximum number of events to obtain.
47+
* @server_default 100
48+
*/
4149
size?: integer
50+
/** Specifies to get events with timestamps after this time. */
51+
start?: string
4252
}
4353
}

specification/ml/get_calendars/MlGetCalendarsRequest.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,29 @@ import { Id } from '@_types/common'
2323
import { integer } from '@_types/Numeric'
2424

2525
/**
26+
* Retrieves configuration information for calendars.
2627
* @rest_spec_name ml.get_calendars
2728
* @since 6.2.0
2829
* @stability stable
30+
* @cluster_privileges monitor_ml
2931
*/
3032
export interface Request extends RequestBase {
3133
path_parts: {
32-
/** A string that uniquely identifies a calendar. */
34+
/** A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier.*/
3335
calendar_id?: Id
3436
}
3537
query_parameters: {
36-
/** Skips the specified number of calendars. */
38+
/** Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier.
39+
* @server_default 0
40+
*/
3741
from?: integer
38-
/** Specifies the maximum number of calendars to obtain. */
42+
/** Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier.
43+
* @server_default 10000
44+
*/
3945
size?: integer
4046
}
4147
body: {
48+
/** This object is supported only when you omit the calendar identifier. */
4249
page?: Page
4350
}
4451
}

specification/ml/get_calendars/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { Id } from '@_types/common'
2222
export class Calendar {
2323
/** A string that uniquely identifies a calendar. */
2424
calendar_id: Id
25+
/** A description of the calendar. */
2526
description?: string
2627
/** An array of anomaly detection job identifiers. */
2728
job_ids: Id[]

0 commit comments

Comments
 (0)