Scheduled Mutes API

Contents

Create a scheduled mute

POST /v2/schedules/

Path Parameters

NameTypeDescription

name*

String

A name that uniquely identifies this scheduled mute.

start_time*

String

A 24-hour time string at which the scheduled mute will begin.

duration*

String

Mute time in minutes.

timezone

String

The timezone string for this scheduled mute’s start time. Valid values are “UTC-12”...”UTC-1”, “UTC”, “UTC+1”...”UTC+14”. Defaults to “UTC” if not specified.

repeat

String

The list of days at which the scheduled mute will repeat on. Becomes a one-time scheduled mute if not specified. Valid values are “mon”, “tue”, “wed”, “thu”, “fri”, “sat” and “sun”.

Request format:

{
   "name": "string",
   "start_time": "14:20",
   "duration": 123,
   "timezone": "UTC-2",
   "repeat": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"]
}

Curl example

curl -H "Content-Type: application/json" -X POST -d \
'{"name": "Mute on weekends", "start_time": "00:00", "duration": 1440, "timezone": "UTC+2", "repeat": ["sat", "sun"]}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/"

Creates a scheduled mute named “Mute on weekends” that starts at 12 AM in timezone UTC+2, with a mute duration of 24 hours, and repeats every Saturday and Sunday.


Search scheduled mutes

GET /v2/schedules/?

Returns a JSON object containing information on scheduled mutes matching the search query. Returns all scheduled mutes if the parameter is left empty.

Path Parameters

NameTypeDescription

name

String

Format: &name=<scheduled_mute_name1>&name=<scheduled_mute_name2>

The scheduled mute name to search for. Can specify multiple scheduled mute names to search for more than 1. Performs an OR operation so a query such as

&name=<scheduled_mute_name1>&name=<scheduled_mute_name2>

will return info on both scheduled_mute_name1 and scheduled_mute_name2.

id

String

Format: &id=<scheduled_mute_id1>&id=<scheduled_mute_id2>

The scheduled mute ID to search for. Can specify multiple scheduled mute IDs to search for more than 1. Performs an OR operation so a query such as

&name=<scheduled_mute_id1>&name=<scheduled_mute_id2>

will return info on both scheduled_mute_id1 and scheduled_mute_id2.

duration

String

Format: &duration=<duration1>&id=<duration2>

Searches for scheduled mutes by their duration. Can specify multiple durations to search for. Performs an OR operation so a query such as

&duration=30&duration=10

will return scheduled mutes with a 10-minute duration or a 30-minute duration.

start_time

String

Format: &start_time=<start_time1>&start_time=<start_time2>

Searches for scheduled mutes by their start time. Can specify multiple start times to search for. Performs an OR operation so a query such as

&start_time=12:00&start_time=20:00

will return scheduled mutes that start at either 12 PM or 8 PM.

timezone

String

Format: &timezone=<timezone1>&timezone=<timezone2>

Searches for scheduled mutes by their timezone. Can specify multiple time zones to search for. Performs an OR operation so a query such as

&timezone=UTC+2&timezone=UTC-14

will return scheduled mutes that have either UTC+2 or UTC-14 time zones.

repeat

String

Format: &repeat=<day1>&repeat=<day2>

Searches for scheduled mutes by their repeat days. Can specify multiple repeat days to search for. Performs an OR operation so a query such as

&repeat=sun&repeat=thu

will return scheduled mutes that repeat on either Sunday or Thursday.

page

String

Format: &page=1

The page number to query. Used if there are more items that can be displayed in a single request (default: 1).

max

String

Format: &max=50

The maximum number of items to display. Limit of 100 (default: 100).

Curl example:

curl -X GET "https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/?"

Specifying multiple fields performs an OR operation and returns scheduled mutes that match either criterion.


Search information on a single scheduled mute

GET /v2/schedules/<scheduled_mute_id>/

Returns information on a single scheduled mute identified by <scheduled_mute_id>.

Curl example:

curl -X GET "https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/123-456-789/"

Obtain information on the scheduled mute identified by the ID 123-456-789.


Update a scheduled mute

PUT /v2/schedules/<scheduled_mute_id>/

Updates the attributes of a scheduled mute identified by <scheduled_mute_id>.

Path Parameters

NameTypeDescription

name

String

A name that uniquely identifies this scheduled mute.

start_time

String

A 24-hour time string at which the scheduled mute will begin

dduration

String

Mute time in minutes.

timezone

String

The timezone string for this scheduled mute’s start time. Valid values are “UTC-12”...”UTC-1”, “UTC”, “UTC+1”...”UTC+14”. Defaults to “UTC” if not specified.

repeat

String

The list of days at which the scheduled mute will repeat on. Becomes a one-time scheduled mute if not specified. Valid values are “mon”, “tue”, “wed”, “thu”, “fri”, “sat” and “sun”.

Curl example:

curl -H "Content-Type: application/json" -X PUT \
-d '{"start_time": "14:50", "timezone": "UTC+12"}' \
"https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/123-456-789/"

Updates the start time and timezone of the scheduled mute with the id 123-456-789.

Each field is optional and only the specified fields are updated.


Delete a scheduled mute

DELETE /v2/schedules/<scheduled_mute_id>/

Deletes a scheduled mute identified by <scheduled_mute_id>.

Curl example:

curl -X DELETE "https://YOUR-API-KEY@api.hostedgraphite.com/v2/schedules/123-456-789/"

Delete the scheduled mute identified by the ID 123-456-789.

Last updated