Download PDF
Download page Schedule API.
Schedule API
This page describes the Schedule API methods you can use to create, configure, and manage the evaluation time frame for the health rules of an application. The metrics associated with a health rule are evaluated according to a schedule that you control. See Health Rule Schedules.
- Syntax validation of the JSON payload is done when creating the schedule.
- Ensure that you pick a time zone the Time Zone List.
Create a New Schedule
Creates a new schedule with the specified JSON payload. See Property Details.
Resource URL
POST <controller_url>/controller/alerting/rest/v1
/applications/<application_id>/schedules
Request/Response Format
JSON
Example
This example creates a health rule schedule that evaluates the health rule once. See Download Examples.
{
"name": "Daily Schedule",
"description": "Daily Schedule",
"timezone": "America/Los_Angeles",
"scheduleConfiguration": {
"scheduleFrequency": "DAILY",
"startTime": "06:00",
"endTime": "18:00"
}
}
{
"id": 62,
"name": "Daily Schedule",
"description": "Daily Schedule",
"timezone": "America/Los_Angeles",
"scheduleConfiguration": {
"scheduleFrequency": "DAILY",
"startTime": "06:00",
"endTime": "18:00"
}
}
Retrieve a List of Schedules for a Given Application
Returns a list of schedule(s) details for a health rule associated with the specified application ID. This API returns the schedule ID, name, and description of the schedule. See Property Details.
Resource URL
GET <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules
Response Format
JSON
Example Response
This example returns a list of schedules applicable to a given application ID.
[
{
"id": 62,
"name": "Daily Schedule",
"description": "Daily Schedule",
"timezone": "America/Los_Angeles"
},
{
"id": 12,
"name": "End of Business Hour: 5pm-6pm, Mon-Fri",
"description": "This schedule is active Monday through Friday, during end of business hour",
"timezone": "Asia/Kolkata"
},
{
"id": 61,
"name": "Schedule1",
"description": "Custom Schedule",
"timezone": "America/Los_Angeles"
},
{
"id": 11,
"name": "Weekday lunch: 12pm-1pm, Mon-Fri",
"description": "This schedule is active Monday through Friday, during lunch hour",
"timezone": "Asia/Kolkata"
},
{
"id": 10,
"name": "Weekday mornings: 8am-12pm, Mon-Fri",
"description": "This schedule is active Monday through Friday, during morning hours",
"timezone": "Asia/Kolkata"
},
{
"id": 7,
"name": "Weekdays: 8am-5pm, Mon-Fri",
"description": "This schedule is active Monday through Friday, during business hours",
"timezone": "Asia/Kolkata"
},
{
"id": 9,
"name": "Weekends: 12am-11pm, Sat-Sun",
"description": "This schedule is active all day and night on the weekend",
"timezone": "Asia/Kolkata"
},
{
"id": 8,
"name": "Weeknights: 11pm-6am, Mon-Fri",
"description": "This schedule is active Monday through Friday, during night time batch runs",
"timezone": "Asia/Kolkata"
}
]
Retrieve the Details of a Specified Schedule
Retrieves a schedule with a specified ID. See Property Details.
Resource URL
GET <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules/{schedule-id}
Response Format
JSON
Example Response
This example retrieves the details of a schedule. See Download Examples.
{
"id": 12,
"name": "End of Business Hour: 5pm-6pm, Mon-Fri",
"description": "This schedule is active Monday through Friday, during end of business hour",
"timezone": "Asia/Kolkata",
"scheduleConfiguration": {
"scheduleFrequency": "WEEKLY",
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY"
],
"startTime": "17:00",
"endTime": "18:00"
}
}
Update a Schedule
Updates an existing schedule with a specified JSON payload. See Property Details.
Resource URL
PUT <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules/{schedule-id}
Request/Response Format
JSON
Example
This example updates a schedule that evaluates the health rule once. See Download Examples.
{
"name": "One Time Schedule",
"description": "One Time Schedule",
"timezone": "America/Los_Angeles",
"scheduleConfiguration": {
"scheduleFrequency": "ONE_TIME",
"startTime": "06:00",
"endTime": "18:00",
"startDate": "01/01/2019",
"endDate": "01/01/2019"
}
}
This example confirms that the schedule was updated successfully.
{
"id": 62,
"name": "One Time Schedule",
"description": "One Time Schedule",
"timezone": "America/Los_Angeles",
"scheduleConfiguration": {
"scheduleFrequency": "ONE_TIME",
"startDate": "01/01/2019",
"startTime": "06:00",
"endDate": "01/01/2019",
"endTime": "18:00"
}
}
Delete a Schedule
Delete a schedule with the specified ID. See Property Details.
Resource URL
DELETE <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules/{schedule-id}
Response Codes
Code | Description |
---|---|
200 | Fetched successfully |
201 | Created successfully |
204 | Deleted successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Resource not found |
409 | Already exists |
Property Details
Schedule
Payload details for the health rule schedule.
Property Name | Type | Description and Valid Values | ||||||
---|---|---|---|---|---|---|---|---|
id | integer | Auto-generated by the system and returned in the response. It is a | ||||||
| string | Name of schedule to be associated with the health rule for evaluation. Minimum length: 1 | ||||||
description | string | Description of the schedule with evaluation details. Example: Health rules are evaluated daily at 12 noon. Default value: | ||||||
| string | Timezone Id - Unique identifier of the time zone. See Time Zones. Example: America/Los_Angeles | ||||||
|
|
OneTimeSchedule
This schedule evaluates the health rule once.
Property Name | Type | Description |
---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. |
startDate* | string | The scheduled start date in DD/MM/YYYY format. Pattern:
|
startTime* | string | The scheduled start time in a 24-hour format. Pattern:
|
endDate* | string | The scheduled end date in DD/MM/YYYY format. Pattern:
|
endTime* | string | The scheduled end time in a 24-hour format. Pattern:
|
DailySchedule
A recurring schedule to evaluate the health rule every day.
Property Name | Type | Description |
---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. |
startTime* | string | The scheduled start time in a 24-hour format. pattern:
|
endTime* | string | The scheduled end time in a 24-hour format. pattern:
|
WeeklySchedule
A recurring schedule to evaluate the health rule every week.
Property Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. | ||||||
days* | string | The day of the week to evaluate the health rule. minItems: 1 maxItems: 7
| ||||||
startTime* | string | The scheduled start time in a 24-hour format. pattern:
| ||||||
endTime* | string | The schedule end time in 24-hour format. pattern:
|
MonthlySpecificDateSchedule
A recurring schedule to evaluate the health rule every month on a specific date.
Property Name | Type | Description |
---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. |
startDate* | string | The schedule start date in DD/MM/YYYY format. pattern:
|
startTime* | string | The scheduled start time in a 24-hour format. pattern:
|
endDate* | string | The scheduled end date in DD/MM/YYYY format. pattern:
|
endTime* | string | The scheduled end time in a 24-hour format. pattern:
|
MonthlySpecificDaySchedule
A recurring schedule to evaluate the health rule every month on a specific date.
Property Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. | ||||||
startTime* | string | The scheduled start time in a 24-hour format. pattern:
| ||||||
endTime* | string | The schedules end time in a 24-hour format. pattern:
| ||||||
day* | string | The day of the week to evaluate the health rule. minItems: 1 maxItems: 7
| ||||||
occurrence* | string | The occurrence of the day within a month. Enums:
|
CustomSchedule
A custom schedule to evaluate the health rule based on specific requirements and timezone. Use UNIX cron expressions to define properties.
Property Name | Type | Description |
---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. |
startCron* | string | The beginning of the UNIX cron expression. |
endCron* | string | The end of the UNIX cron expression. |
ScheduleSummaryElement
The details of the schedule you have defined that are returned when you retrieve the schedules API.
Property Name | Type | Description |
---|---|---|
id | integer | Auto-generated by the system and returned in the response. |
name* | string | Name of the schedule associated with the health rule for evaluation. |
description | string | Description of the schedule and evaluation details. |
timezone* | string | Timezone ID - Unique identifier of the time zone. |
*This property is required (mandatory).
Download Examples
Download a set of examples that help you configure a schedule, Schedule Examples.zip.
Download SWAGGER YAML file
Download the Swagger YAML spec schedule_openapi.yml.