Events

The Event Object

Create a Event

POST https://api.pagertree.com/api/v4/events

Allowed Parameters

def event_params
  params.permit(
    :parent_id,
    :start_datetime,
    :end_datetime,
    :layer,
    :time_zone,
    :repeat,
    :frequency,
    :frequency_unit,
    :repeat_end_datetime,
    :rotation,
    days_of_week: [],
    schedule_ids: [],
    account_user_ids: [],
  )
end

Required Parameters

  • start_datetime

  • end_datetime

  • layer

  • time_zone

  • at least 1 Account User ID

  • if repeat is true

    • frequency

    • frequency_unit

Retrieve an Event

GET https://api.pagertree.com/api/v4/events/:id

Update an Event

PUT https://api.pagertree.com/api/v4/events/:id

Delete an Event

DELETE https://api.pagertree.com/api/v4/events/:id

List all Events

GET https://api.pagertree.com/api/v4/events

Override an Event

Overrides an existing event with a new one (handles breaking up the event, just like the UI).

POST https://api.pagertree.com/api/v4/events/:id/override

Required Parameters

Example Request

POST https://api.pagertree.com/api/v4/events/:id/override
{
  "start_time": "2022-11-01 08:00",
  "end_time": "2022-11-01 17:00",
  "layer": 1,
  "time_zone": "Arizona",
  "account_user_ids": ["01GGR2FB6045ZAXXXXXXXXXXXX"],
  "action_time": "2022-11-01T00:00:00.000-07:00"
}

Add an Event Exception

Adds an exception for a repeating event (aka "delete a single occurrence").

POST https://api.pagertree.com/api/v4/events/:id/add_exception

Required Parameters

Example Request

POST https://api.pagertree.com/api/v4/events/:id/add_exception
{
  "action_time": "2022-11-01T00:00:00.000-07:00"
}

Terminate an Event

Deletes the occurrence and all future occurrences of a repeating event.

POST https://api.pagertree.com/api/v4/events/:id/terminate_on

Required Parameters

Example Request

POST https://api.pagertree.com/api/v4/events/:id/terminate_on
{
  "action_time": "2022-11-01T00:00:00.000-07:00"
}

List all Event Time Zones

Returns the list of all valid time zones currently supported by PagerTree.

It's possible these change over time as new time zones are added and removed from the world.

GET https://api.pagertree.com/api/v4/events/time_zones

Valid Time Zone Names

As a convenience, we have listed supported time zones (as of September 25, 2022) below:

  • International Date Line West

  • American Samoa

  • Midway Island

  • Hawaii

  • Alaska

  • Pacific Time (US & Canada)

  • Tijuana

  • Arizona

  • Chihuahua

  • Mazatlán

  • Mountain Time (US & Canada)

  • Central America

  • Central Time (US & Canada)

  • Guadalajara

  • Mexico City

  • Monterrey

  • Saskatchewan

  • Bogota

  • Eastern Time (US & Canada)

  • Indiana (East)

  • Lima

  • Quito

  • Atlantic Time (Canada)

  • Caracas

  • Georgetown

  • La Paz

  • Puerto Rico

  • Santiago

  • Newfoundland

  • Brasilia

  • Buenos Aires

  • Greenland

  • Montevideo

  • Mid-Atlantic

  • Azores

  • Cape Verde Is.

  • Edinburgh

  • Lisbon

  • London

  • Monrovia

  • UTC

  • Amsterdam

  • Belgrade

  • Berlin

  • Bern

  • Bratislava

  • Brussels

  • Budapest

  • Casablanca

  • Copenhagen

  • Dublin

  • Ljubljana

  • Madrid

  • Paris

  • Prague

  • Rome

  • Sarajevo

  • Skopje

  • Stockholm

  • Vienna

  • Warsaw

  • West Central Africa

  • Zagreb

  • Zurich

  • Athens

  • Bucharest

  • Cairo

  • Harare

  • Helsinki

  • Jerusalem

  • Kaliningrad

  • Kyiv

  • Pretoria

  • Riga

  • Sofia

  • Tallinn

  • Vilnius

  • Baghdad

  • Istanbul

  • Kuwait

  • Minsk

  • Moscow

  • Nairobi

  • Riyadh

  • St. Petersburg

  • Volgograd

  • Tehran

  • Abu Dhabi

  • Baku

  • Muscat

  • Samara

  • Tbilisi

  • Yerevan

  • Kabul

  • Ekaterinburg

  • Islamabad

  • Karachi

  • Tashkent

  • Chennai

  • Kolkata

  • Mumbai

  • New Delhi

  • Sri Jayawardenepura

  • Kathmandu

  • Almaty

  • Astana

  • Dhaka

  • Urumqi

  • Rangoon

  • Bangkok

  • Hanoi

  • Jakarta

  • Krasnoyarsk

  • Novosibirsk

  • Beijing

  • Chongqing

  • Hong Kong

  • Irkutsk

  • Kuala Lumpur

  • Perth

  • Singapore

  • Taipei

  • Ulaanbaatar

  • Osaka

  • Sapporo

  • Seoul

  • Tokyo

  • Yakutsk

  • Adelaide

  • Darwin

  • Brisbane

  • Canberra

  • Guam

  • Hobart

  • Melbourne

  • Port Moresby

  • Sydney

  • Vladivostok

  • Magadan

  • New Caledonia

  • Solomon Is.

  • Srednekolymsk

  • Auckland

  • Fiji

  • Kamchatka

  • Marshall Is.

  • Wellington

  • Chatham Is.

  • Nuku'alofa

  • Samoa

  • Tokelau Is.

Last updated