get_oncalls
Lists current on-call entries, or every entry within a date range, for schedules, escalation policies, and users. Use it to see who is on call now or across a span of time.
Instructions
List on-call entries for schedules, policies, or time ranges.
Behavior varies by time parameters:
Without since/until: Returns current on-calls Example: get_oncalls(current_user_context=False, schedule_ids=["PSCHED123"])
With since/until: Returns all on-calls in range Example: get_oncalls(current_user_context=False, schedule_ids=["PSCHED123"], since="2024-03-20T00:00:00Z", until="2024-03-27T00:00:00Z")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (optional) | |
| since | No | Start of query range in ISO8601 format (default: current datetime) | |
| until | No | End of query range in ISO8601 format (default: current datetime, max range: 90 days in the future). Cannot be before `since`. | |
| include | No | List of fields to include in the response. If specified, only these fields will be returned for each on-call entry | |
| earliest | No | Only earliest on-call per policy/level/user combo (optional) | |
| user_ids | No | Filter by users (optional, excludes current_user_context) | |
| schedule_ids | No | Filter by schedules (optional) | |
| current_user_context | No | Use escalation policies the current user is a target of (default: True); errors if the current user is a target of no escalation policy and no schedule_ids are given. | |
| escalation_policy_ids | No | Filter by policies (optional, excludes current_user_context) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||