Skip to main content

Retrieve Build Schedules

Retrieve a build schedule by id

The following query retrieves a build schedule by id:

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
}
}
}
Show cURL example Try in explorer

Retrieve all build schedules belonging to a given account

The following query retrieves all build schedules belonging to a given account:

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
}
}
}
}
}
Show cURL example Try in explorer
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).