API Reference

Teams

The Team Object

PropertyTypeDescription
namestringThe name of the team
escalation_policy_idstringThe ID of the active escalation policy for this team.
schedule_idstringThe ID of the active schedule for this team.
member_account_user_idsstring[]IDs of account users the take on the member role for this team.
admin_account_user_idsstring[]IDs of the account users that take on the admin role for this team.
drop_notificationsstringnone|team_all|team_admins|oncall_rotation|specific_users
handoff_notificationsstringnone|team_all|team_admins|oncall_rotation|specific_users
drop_notification_account_user_idsstring[]If drop_notifications set to specific_users, the account user IDs to send drop notifications to.
handoff_notification_account_user_idsstring[]If handoff_notifications set to specific_users, the account user IDs to send drop notifications to.
notesstringNotes to be displayed for this team.
attachmentshash:filename, :url

Create a Team

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

Allowed Parameters

def team_params
  params.permit(
    :meta,
    :name,
    :notes,
    :drop_notifications,
    :handoff_notifications,
    member_account_user_ids: [],
    admin_account_user_ids: [],
    drop_notification_account_user_ids: [],
    handoff_notification_account_user_ids: []
  )
end

Required Parameters

  • name
  • at least 1 account user as a member role
  • at least 1 account user as an admin role

Note: A default schedule and escalation policy will be created by PagerTree.

Retrieve a Team

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

Update a Team

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

Delete a Team

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

List all Teams

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

Current On-Call

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

Shortcut for schedule current on-call method.

GET https://api.pagertree.com/api/v4/teams/:id/current_oncall
Previous
Schedules