Download PDF
Download page Schedule API.
Schedule API
関連ページ:
The schedule API lets you create, configure, and manage the evaluation time frame for health rules of an application. The metrics associated with a health rule are evaluated according to a schedule that you control.
注意
- Syntax validation of the JSON payload is done when creating the schedule.
- Ensure that you pick a time zone as specified in this list.
Create a New Schedule
Creates a new schedule with the specified JSON payload. For complete payload details, refer Property Details.
Resource URL
POST <controller_url>/controller/alerting/rest/v1
/applications/<application_id>/schedules
Request/Response Format
JSON
Example Request
This example creates a health rule schedule that evaluates the health rule once. For more examples, 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. For more details, refer Property Details.
Resource URL
GET <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules
応答形式
JSON
応答の例
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. For complete payload details, refer Property Details.
Resource URL
GET <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules/{schedule-id}
応答形式
JSON
応答の例
This example retrieves the details of a schedule. For more examples, 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. For complete payload details, refer Property Details.
Resource URL
PUT <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules/{schedule-id}
Request/Response Format
JSON
Example Request
This example updates a schedule that evaluates the health rule once. For more examples, 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
Deletes a schedule with the specified ID. For property details, refer Property Details.
Resource URL
DELETE <controller_url>/controller/alerting/rest/v1/applications/<application_id>/schedules/{schedule-id}
応答コード
コード | 説明 |
---|---|
200 | Fetched successfully |
201 | Created successfully |
204 | 正常に削除されました |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | リソースが見つかりません |
409 | すでに存在します |
Property Details
スケジュール
Payload details for the health rule schedule.
プロパティ名 | タイプ | Description and Valid Values | ||||||
---|---|---|---|---|---|---|---|---|
id | 整数 | Auto-generated by the system and returned in the response. It is a ReadOnly value. | ||||||
名前* | string | Name of schedule to be associated with the health rule for evaluation. Minimum length: 1 | ||||||
説明 | string | Description of the schedule with evaluation details. Example: Health rules are evaluated daily at 12 noon. Default value: true | ||||||
timezone* | string | Timezone Id - Unique identifier of the time zone. Refer Time Zones for more details. Example: America/Los_Angeles | ||||||
scheduleConfiguration* |
|
OneTimeSchedule
This schedule evaluates the health rule once.
プロパティ名 | タイプ | 説明 |
---|---|---|
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 schedule start time in 24-hour format. Pattern:
|
endDate* | string | The schedule end date in DD/MM/YYYY format. Pattern:
|
endTime* | string | The schedule end time in 24-hour format. Pattern:
|
DailySchedule
A recurring schedule to evaluate the health rule every day.
プロパティ名 | タイプ | 説明 |
---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. |
startTime* | string | The schedule start time in 24-hour format. pattern:
|
endTime* | string | The schedule end time in 24-hour format. pattern:
|
WeeklySchedule
A recurring schedule to evaluate the health rule every week.
プロパティ名 | タイプ | 説明 | ||||||
---|---|---|---|---|---|---|---|---|
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 schedule start time in 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.
プロパティ名 | タイプ | 説明 |
---|---|---|
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 schedule start time in 24-hour format. pattern:
|
endDate* | string | The schedule end date in DD/MM/YYYY format. pattern:
|
endTime* | string | The schedule end time in 24-hour format. pattern:
|
MonthlySpecificDaySchedule
A recurring schedule to evaluate the health rule every month on a specific date.
プロパティ名 | タイプ | 説明 | ||||||
---|---|---|---|---|---|---|---|---|
scheduleFrequency* | string | The frequency to evaluate the health rule(s). See Enums. | ||||||
startTime* | string | The schedule start time in 24-hour format. pattern:
| ||||||
endTime* | string | The schedule end time in 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.
プロパティ名 | タイプ | 説明 |
---|---|---|
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.
プロパティ名 | タイプ | 説明 |
---|---|---|
id | 整数 | Auto-generated by the system and returned in the response. |
名前* | string | Name of the schedule associated with the health rule for evaluation. |
説明 | 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.