# Retrieve Build Schedules https://api-docs.lumar.io/docs/protect/build-schedules/retrieve-build-schedules ## Retrieve a build schedule by id The following query retrieves a build schedule by id: ```graphql query GetBuildSchedule($buildScheduleId: ObjectID!) { node(id: $buildScheduleId) { ... on BuildSchedule { name startAt repetitionRate nextRunAt lastRunStartedAt account { id name } buildScheduleTestSuites { nodes { id testSuite { id name } lastRunBuild { id status createdAt } } } createdAt updatedAt } } } ``` ## Retrieve all build schedules belonging to a given account The following query retrieves all build schedules belonging to a given account: ```graphql query GetAccountBuildSchedules($accountId: ObjectID!) { node(id: $accountId) { ... on Account { buildSchedules { nodes { name startAt repetitionRate nextRunAt lastRunStartedAt account { id name } buildScheduleTestSuites { nodes { id testSuite { id name } lastRunBuild { id status createdAt } } } createdAt updatedAt } } } } } ``` :::caution `buildScheduleTestSuites` is used to obtain all links between the current build schedule and test suites, together with last build executed part of this link (`lastRunBuild`). :::