Create Build Schedules
The following mutation creates a build schedule for a given account:
- Query
- cURL
mutation CreateBuildSchedule($accountId: ObjectID!, $name: String!, $startAt: Date!, $repetitionRate: BuildScheduleRepetitionRate) {
createBuildSchedule(input: {
accountId: $accountId
name: $name
startAt: $startAt
repetitionRate: $repetitionRate
}) {
buildSchedule {
id
name
startAt
repetitionRate
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateBuildSchedule($accountId: ObjectID!, $name: String!, $startAt: Date!, $repetitionRate: BuildScheduleRepetitionRate) { createBuildSchedule(input: { accountId: $accountId name: $name startAt: $startAt repetitionRate: $repetitionRate }) { buildSchedule { id name startAt repetitionRate } } }"}' https://api.lumar.io/graphql
caution
name
is unique per Account.repetitionRate
is optional, meaning that build schedules can be non-repeatable.