Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/reference/ml/apis/eventresource.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ An events resource has the following properties:
(string) A description of the scheduled event.

`end_time`::
(string) The timestamp for the end of the scheduled event. The datetime string
is in ISO 8601 format.
(date) The timestamp for the end of the scheduled event
in milliseconds since the epoch or ISO 8601 format.

`event_id`::
(string) An automatically-generated identifier for the scheduled event.

`start_time`::
(string) The timestamp for the beginning of the scheduled event. The datetime
string is in ISO 8601 format.
(date) The timestamp for the beginning of the scheduled event
in milliseconds since the epoch or ISO 8601 format.

For more information, see
{xpack-ref}/ml-calendars.html[Calendars and Scheduled Events].
1 change: 1 addition & 0 deletions docs/reference/ml/apis/get-calendar.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ You can get information for a single calendar or for all calendars by using

==== Request Body

`page`::
`from`:::
(integer) Skips the specified number of calendars.

Expand Down
4 changes: 3 additions & 1 deletion docs/reference/ml/apis/post-calendar-event.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ of which must have a start time, end time, and description.
==== Request Body

`events`::
(array) A list of one of more scheduled events. See <<ml-event-resource>>.
(array) A list of one of more scheduled events. The event's start and end times
may be specified as integer milliseconds since the epoch or as a string in ISO 8601
format. See <<ml-event-resource>>.


==== Authorization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public RestDeleteForecastAction(Settings settings, RestController controller) {
"}/_forecast/{" + Forecast.FORECAST_ID.getPreferredName() + "}", this,
DELETE, MachineLearning.PRE_V7_BASE_PATH + "anomaly_detectors/{" + Job.ID.getPreferredName() +
"}/_forecast/{" + Forecast.FORECAST_ID.getPreferredName() + "}", deprecationLogger);
controller.registerHandler(
DELETE, MachineLearning.BASE_PATH + "anomaly_detectors/{" + Job.ID.getPreferredName() +
"}/_forecast/", this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
}
}
},
"body": null
"body": {
"description": "The from and size parameters optionally sent in the body"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@
- length: { calendars: 1}
- match: { calendars.0.calendar_id: calendar2 }

- do:
ml.get_calendars:
body: >
{
"page": {
"from": 1,
"size": 2
}
}
- match: { count: 3 }
- length: { calendars: 2}
- match: { calendars.0.calendar_id: calendar2 }
- match: { calendars.1.calendar_id: calendar3 }

---
"Test PageParams with ID is invalid":
- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,11 @@ setup:
forecast_id: _all
allow_no_forecasts: true
- match: { acknowledged: true }

---
"Test delete all where no forecast_id is set":
- do:
ml.delete_forecast:
job_id: delete-forecast-job
allow_no_forecasts: true
- match: { acknowledged: true }