Docs
WebsiteLoginFree Trial
  • Getting Started
    • OnCall Users
    • Team Admins
    • Account Admins
  • Architecture Guide
  • Common UI Design Patterns
  • Alerts
  • Teams
  • Schedules
  • Escalation Policies
  • Integrations
  • Broadcasts
  • Users
  • Notifications
  • Reports
  • Billing
  • Accounts
  • Stakeholders
  • Maintenance Windows
  • Routers
  • Notification Rules
  • Single Sign On (SSO)
  • Integration Guides
    • Introduction
    • 66uptime
    • Apex Ping
    • AppDynamics
    • Auvik
    • AWS CloudWatch
    • Azure Monitor
    • Cloudflare
    • Cronitor
    • Datadog
    • Dead Man's Snitch
    • Echoes HQ
    • ElastAlert
    • Email
    • Form
    • Freshdesk
    • Freshservice
    • Google Hangouts Chat
    • Grafana
    • Healthchecks.io
    • HetrixTools
    • Honeybadger
    • Hydrozen
    • Jira Server
    • JotForm
    • Kapacitor
    • LogicMonitor
    • Mattermost
      • Outgoing Webhook
      • Post to Channel
    • Meta Workplace
    • Microsoft Teams
    • New Relic
    • Outgoing Webhook
    • Pingdom
    • Prometheus
    • PRTG Network Monitor
    • Pulsetic
    • Sentry
    • ServerGuard24
    • Site24x7
    • Slack
      • Notifications
      • Outgoing Webhook
      • Post to Channel
    • SolarWinds
    • Stackdriver
    • StatusCake
    • Twilio
      • Incoming SMS
      • Live Call Routing
    • Typeform
    • Uptime
    • Uptime Kuma
    • UptimeRobot
    • Webhook
    • Zendesk
  • API
    • Introduction
    • Authentication
    • Errors
    • Pagination and Filters
    • Common Model Attributes
    • Account Users
    • Alerts
    • Broadcasts
    • Comments
    • Escalation Policies
    • Events
    • Integrations
    • Logs
    • Maintenance Windows
    • Notification Rules
    • Routers
    • Schedules
    • Teams
    • Users
  • Command Line Interface (CLI)
    • PagerTree CLI: Command Line Interface
Powered by GitBook
On this page
  • The Schedule Object
  • Create a Schedule
  • Retrieve a Schedule
  • Update a Schedule
  • Delete a Schedule
  • List all Schedules
  • Flush a Schedule
  • Current On-Call
  • Window Events
  • Events

Was this helpful?

  1. API

Schedules

PreviousRoutersNextTeams

Last updated 2 months ago

Was this helpful?

  • represent an on-call calendar. A schedule has many .

  • Schedules are independent objects. The is responsible for assigning itself a primary schedule and an .

The Schedule Object

Property
Type
Description

name

string

The name of the schedule

Create a Schedule

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

Allowed Parameters

def schedule_params
  params.permit(
    :name
  )
end

Required Parameters

  • name

Retrieve a Schedule

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

Update a Schedule

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

Delete a Schedule

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

List all Schedules

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

Flush a Schedule

DELETE https://api.pagertree.com/api/v4/schedules/:id/flush

Current On-Call

Returns on-call event attendees for now. (Handles repeating events and rotations)

GET https://api.pagertree.com/api/v4/schedules/:id/current_oncall

Window Events

Return on-call event attendees for a specified time frame. (Handles repeating events and rotations)

Query Parameter
Description

start

UTC string of start time to consider (ex: 2022-10-12 07:00:00)

end

UTC string of end time to consider (ex: 2022-10-12 07:00:00)

GET https://api.pagertree.com/api/v4/schedules/:id/window_events?start=2022-10-12 07:00:00&end=2022-10-13 07:00:00

Events

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

# example with parameters and operators
GET  https://api.pagertree.com/api/v4/schedules/:id/events?ops=start_datetime:gte,end_datetime:lte&start_datetime=2022-10-12 07:00:00&end_datetime=2022-10-13 07:00:00

Removes all events from the schedule. See .

Return that are assigned to this schedule. (Does not handle repeating events and rotations. Unprocessed representation of events.)

Schedules
Events
Team object
Escalation Policy
Events
flush schedule documentation