Get Schedules

Below filters are available for get schedules

  • teamID: String

  • scheduleIDs: [Int!]

  • participants: [String!]

  • escalationPolicies: [String!]

  • myOncall: Boolean

  • noEscalationPolicies: Boolean

  • search: String

  • limit: Int

  • offset: Int

query{
  schedules(filters:{
    teamID:"62442e4182c4725938208e11",
    scheduleIDs:[],
    participants:[],
    escalationPolicies:[],
    myOncall:false,
    noEscalationPolicies:false,
    search:"migrated",
    limit:1,
    offset:0
  }){
    ID
    orgID
    teamID
    name
    description
    timeZone
    paused
    owner {
      type
      ID
    }
    rotations {
      ID
      name
      color
      startDate
      period
      participantGroups {
        participants {
          type
          ID
        }
      }
      changeParticipantsUnit
      changeParticipantsFrequency
      endDate
      endsAfterIterations
    }
    escalationPolicies {
      ID
      name
    }
    overrides(from: $from, till: $till) {
      ID
      scheduleID
      startTime
      endTime
      reason
      overriddenParticipant {
        participants {
          ID
          type
        }
        everyone
      }
      overrideWith {
        participants {
          ID
          type
        }
      }
    }
  }
}

Response:


           
{
    "data": {
        "schedules": [
            {
                "ID": 71597,
                "orgID": "5d1353590086040012ea889e",
                "teamID": "6129a901518568defa925231",
                "name": "Test 3",
                "description": "",
                "timeZone": "Asia/Kolkata",
                "paused": false,
                "owner": {
                    "type": "user",
                    "ID": "6666ce20c97c539549483727"
                },
                "rotations": [
                    {
                        "ID": 86619,
                        "name": "Weekly Business Hours",
                        "color": "#D4D4F9B3",
                        "startDate": "2025-04-21T00:00:00Z",
                        "period": "custom",
                        "participantGroups": [
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "6577e4f3384d73a5fea34ba3"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "637f441fd9c186f1e1eae502"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "6489d58e5f9e9cee8b7acd48"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "639c4ad1a6857d69d88db905"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "63fde9324d3b101d20d4e094"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "6134a6fc74bb9b0b73d35a60"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "5b8f4a86f2332d4fc4b5ad28"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "62b32482f4942abd7ed8e3f9"
                                    }
                                ]
                            }
                        ],
                        "changeParticipantsUnit": "week",
                        "changeParticipantsFrequency": 1,
                        "endDate": null,
                        "endsAfterIterations": null
                    }
                ],
                "escalationPolicies": [],
                "overrides": [
                    {
                        "ID": 57588,
                        "scheduleID": 71597,
                        "startTime": "2025-06-06T02:30:00Z",
                        "endTime": "2025-06-06T12:30:00Z",
                        "reason": "Another Meeting",
                        "overriddenParticipant": {
                            "participants": [
                                {
                                    "ID": "5b8f4a86f2332d4fc4b5ad28",
                                    "type": "user"
                                }
                            ],
                            "everyone": null
                        },
                        "overrideWith": {
                            "participants": [
                                {
                                    "ID": "63fde9324d3b101d20d4e094",
                                    "type": "user"
                                }
                            ]
                        }
                    }
                ]
            },
            {
                "ID": 70804,
                "orgID": "5d1353590086040012ea889e",
                "teamID": "6129a901518568defa925231",
                "name": "Lon TZ, extra hour in event issue",
                "description": "",
                "timeZone": "Europe/London",
                "paused": false,
                "owner": {
                    "type": "user",
                    "ID": "63e0bec286c6f0040378453c"
                },
                "rotations": [
                    {
                        "ID": 85760,
                        "name": "Daily 24 x 7",
                        "color": "#FFF6BFB3",
                        "startDate": "2025-03-23T00:00:00Z",
                        "period": "weekly",
                        "participantGroups": [
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "637f441fd9c186f1e1eae502"
                                    }
                                ]
                            }
                        ],
                        "changeParticipantsUnit": "rotation",
                        "changeParticipantsFrequency": 1,
                        "endDate": null,
                        "endsAfterIterations": null
                    }
                ],
                "escalationPolicies": [],
                "overrides": []
            },
            {
                "ID": 70803,
                "orgID": "5d1353590086040012ea889e",
                "teamID": "6129a901518568defa925231",
                "name": "TZ Kolk, extra 1 hour event issue",
                "description": "",
                "timeZone": "Asia/Kolkata",
                "paused": false,
                "owner": {
                    "type": "user",
                    "ID": "63e0bec286c6f0040378453c"
                },
                "rotations": [
                    {
                        "ID": 85759,
                        "name": "Daily 24 x 7",
                        "color": "#D4D4F9B3",
                        "startDate": "2025-03-23T00:00:00Z",
                        "period": "weekly",
                        "participantGroups": [
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "6577e4f3384d73a5fea34ba3"
                                    }
                                ]
                            }
                        ],
                        "changeParticipantsUnit": "rotation",
                        "changeParticipantsFrequency": 1,
                        "endDate": null,
                        "endsAfterIterations": null
                    }
                ],
                "escalationPolicies": [],
                "overrides": []
            },
            {
                "ID": 70694,
                "orgID": "5d1353590086040012ea889e",
                "teamID": "6129a901518568defa925231",
                "name": "Test notif",
                "description": "",
                "timeZone": "Asia/Kolkata",
                "paused": false,
                "owner": {
                    "type": "user",
                    "ID": "63e0bec286c6f0040378453c"
                },
                "rotations": [
                    {
                        "ID": 85641,
                        "name": "Daily 24 x 7",
                        "color": "#FFF6BFB3",
                        "startDate": "2025-03-21T00:00:00Z",
                        "period": "daily",
                        "participantGroups": [
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "6577e4f3384d73a5fea34ba3"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "637f441fd9c186f1e1eae502"
                                    }
                                ]
                            }
                        ],
                        "changeParticipantsUnit": "rotation",
                        "changeParticipantsFrequency": 1,
                        "endDate": null,
                        "endsAfterIterations": null
                    }
                ],
                "escalationPolicies": [],
                "overrides": []
            },
            {
                "ID": 69701,
                "orgID": "5d1353590086040012ea889e",
                "teamID": "6129a901518568defa925231",
                "name": "Prod Issue",
                "description": "",
                "timeZone": "Asia/Kolkata",
                "paused": false,
                "owner": {
                    "type": "user",
                    "ID": "63eb5e41932c4c7b9d7560a0"
                },
                "rotations": [
                    {
                        "ID": 84556,
                        "name": "Daily 24 x 7",
                        "color": "#FFD9C7B3",
                        "startDate": "2025-03-10T00:00:00Z",
                        "period": "daily",
                        "participantGroups": [
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "6577e4f3384d73a5fea34ba3"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "637f441fd9c186f1e1eae502"
                                    }
                                ]
                            },
                            {
                                "participants": [
                                    {
                                        "type": "user",
                                        "ID": "639c4ad1a6857d69d88db905"
                                    }
                                ]
                            }
                        ],
                        "changeParticipantsUnit": "rotation",
                        "changeParticipantsFrequency": 1,
                        "endDate": null,
                        "endsAfterIterations": null
                    }
                ],
                "escalationPolicies": [],
                "overrides": []
            }
        ]
    }
}
      

Last updated

Was this helpful?