Skip to main content
PUT
/
sla
/
schedules
/
{scheduleId}
Update a Report Schedule
curl --request PUT \
  --url https://api.altostrat.io/sla/schedules/{scheduleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Monthly Executive SLA Summary",
  "disabled": false,
  "daily": true,
  "weekly": true,
  "monthly": true,
  "day_of_week": "monday",
  "day_of_month": 1,
  "sla_target": 99.95,
  "show_only_breached_sites_in_pdf": false,
  "calculate_sla_within_schedule_hours": true,
  "business_hours_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "site_selection_mode": "tags",
  "site_selection_logic": "or",
  "site_selection_rules": [
    {
      "key": "Region",
      "value": "APAC"
    }
  ],
  "grouping_rules": [
    {
      "key": "Region",
      "aggregation": "avg"
    }
  ],
  "sites": [
    "f47ac10b-58cc-4372-a567-0e02b2c3d479"
  ],
  "recipients": [
    "e47ac10b-58cc-4372-a567-0e02b2c3d479"
  ],
  "timezone": "Australia/Sydney",
  "ignore_power_outages": false,
  "notification_group": "network_admins_group"
}'
{
  "id": "sla_2ayc4Yy6w3g7Y2j4g4g4Yy6w3g7",
  "name": "Monthly Executive SLA Summary",
  "disabled": false,
  "daily": true,
  "weekly": true,
  "monthly": true,
  "day_of_week": "monday",
  "day_of_month": 1,
  "sla_target": 99.95,
  "show_only_breached_sites_in_pdf": false,
  "calculate_sla_within_schedule_hours": true,
  "business_hours_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "site_selection_mode": "tags",
  "site_selection_logic": "or",
  "site_selection_rules": [
    {
      "key": "Region",
      "value": "APAC"
    }
  ],
  "grouping_rules": [
    {
      "key": "Region",
      "aggregation": "avg"
    }
  ],
  "sites": [
    "f47ac10b-58cc-4372-a567-0e02b2c3d479"
  ],
  "recipients": [
    "e47ac10b-58cc-4372-a567-0e02b2c3d479"
  ],
  "timezone": "Australia/Sydney",
  "ignore_power_outages": false,
  "notification_group": "network_admins_group",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Enter your authentication token.

Path Parameters

scheduleId
string
required

The unique identifier for the SLA report schedule to update, prefixed with sla_.

Example:

"sla_2ayc4Yy6w3g7Y2j4g4g4Yy6w3g7"

Body

application/json

The updated SLA report schedule configuration.

The properties required to create or update an SLA report schedule.

name
string
required

A human-readable name for the report schedule.

Example:

"Monthly Executive SLA Summary"

sla_target
number
required

The target SLA percentage. Sites with uptime below this value will be marked as breached.

Example:

99.95

business_hours_id
string<uuid>
required

The UUID of the Business Hours schedule to use for SLA calculations.

Example:

"a1b2c3d4-e5f6-7890-1234-567890abcdef"

site_selection_mode
enum<string>
required

Determines how sites are selected for the report. manual uses the sites array. tags uses dynamic selection based on site_selection_rules.

Available options:
manual,
tags
Example:

"tags"

timezone
string
required

The IANA timezone identifier for scheduling the report (e.g., 'America/New_York'). Reports run at 8 AM in this timezone.

Example:

"Australia/Sydney"

notification_group
string
required

The ID of a notification group to send the report to.

Example:

"network_admins_group"

disabled
boolean
default:false

If true, the schedule is paused and will not generate reports automatically.

daily
boolean

If true, the report runs every day. Only one of daily, weekly, or monthly should be true.

weekly
boolean

If true, the report runs once a week on the specified day_of_week.

monthly
boolean

If true, the report runs once a month on the specified day_of_month.

day_of_week
enum<string>

Required if weekly is true. The day of the week to run the report.

Available options:
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday
Example:

"monday"

day_of_month
integer

Required if monthly is true. The day of the month to run the report.

Required range: 1 <= x <= 28
Example:

1

show_only_breached_sites_in_pdf
boolean
default:false

If true, the generated PDF will only list sites that breached the SLA target.

calculate_sla_within_schedule_hours
boolean
default:true

If true, SLA is calculated only within the specified business hours. If false, it's calculated over 24/7.

site_selection_logic
enum<string>

When site_selection_mode is tags, this determines how multiple rules are combined. or includes sites matching any rule. and includes sites matching all rules.

Available options:
or,
and
Example:

"or"

site_selection_rules
object[]

A list of rules to dynamically select sites based on tags. Required if site_selection_mode is tags.

grouping_rules
object[]

An optional list of rules to group sites in the report by a specific tag value (e.g., group by 'Region').

sites
string<uuid>[]

A list of site UUIDs to include in the report. Required if site_selection_mode is manual.

recipients
string<uuid>[]

A list of recipient UUIDs to notify when the report is ready.

ignore_power_outages
boolean
default:false

If true, downtime caused by power outages will be excluded from SLA calculations.

Response

The schedule was updated successfully.

The configuration for a scheduled SLA report.

id
string

The unique server-generated identifier for the schedule, prefixed with sla_.

Example:

"sla_2ayc4Yy6w3g7Y2j4g4g4Yy6w3g7"

name
string

A human-readable name for the report schedule.

Example:

"Monthly Executive SLA Summary"

disabled
boolean
default:false

If true, the schedule is paused and will not generate reports automatically.

daily
boolean

If true, the report runs every day. Only one of daily, weekly, or monthly should be true.

weekly
boolean

If true, the report runs once a week on the specified day_of_week.

monthly
boolean

If true, the report runs once a month on the specified day_of_month.

day_of_week
enum<string>

The day of the week to run the report if weekly is true.

Available options:
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday
Example:

"monday"

day_of_month
integer

The day of the month to run the report if monthly is true.

Required range: 1 <= x <= 28
Example:

1

sla_target
number

The target SLA percentage. Sites with uptime below this value will be marked as breached.

Example:

99.95

show_only_breached_sites_in_pdf
boolean
default:false

If true, the generated PDF will only list sites that breached the SLA target.

calculate_sla_within_schedule_hours
boolean
default:true

If true, SLA is calculated only within the specified business hours. If false, it's calculated over 24/7.

business_hours_id
string<uuid>

The UUID of the Business Hours schedule to use for SLA calculations.

Example:

"a1b2c3d4-e5f6-7890-1234-567890abcdef"

site_selection_mode
enum<string>

Determines how sites are selected for the report. manual uses the sites array. tags uses dynamic selection based on site_selection_rules.

Available options:
manual,
tags
Example:

"tags"

site_selection_logic
enum<string>

When site_selection_mode is tags, this determines how multiple rules are combined. or includes sites matching any rule. and includes sites matching all rules.

Available options:
or,
and
Example:

"or"

site_selection_rules
object[]

A list of rules to dynamically select sites based on tags. Required if site_selection_mode is tags.

grouping_rules
object[]

An optional list of rules to group sites in the report by a specific tag value (e.g., group by 'Region').

sites
string<uuid>[]

A list of site UUIDs to include in the report. Required if site_selection_mode is manual.

recipients
string<uuid>[]

A list of recipient UUIDs to notify when the report is ready.

timezone
string

The IANA timezone identifier for scheduling the report (e.g., 'America/New_York'). Reports run at 8 AM in this timezone.

Example:

"Australia/Sydney"

ignore_power_outages
boolean
default:false

If true, downtime caused by power outages will be excluded from SLA calculations.

notification_group
string | null

The ID of a notification group to send the report to.

Example:

"network_admins_group"

created_at
string<date-time>

The timestamp when the schedule was created.

updated_at
string<date-time>

The timestamp when the schedule was last updated.