Replace schedules of reports in a batch
- OpenAPI 3.1.0 document: https://api.rollstack.com/public/v1/openapi.json
- The whole reference in Markdown: https://docs.rollstack.com/llms-full.txt
- An index of the reference: https://docs.rollstack.com/llms.txt
POST https://api.rollstack.com/public/v1/reports/batch-update-schedules
Gives up to 50 reports of any type the same schedules, replacing all of each report's current ones, as updateReportSchedules does for one; an empty list removes them all. Each schedule updates its whole report. Only the reports' editors may. Answers one result per report, each naming its id, with its new schedules: a report you can't edit fails on its own and keeps its schedules, while the others are still changed.
Requires the slide_decks:write scope.
Operation ID: batchUpdateReportSchedules.
Headers
Idempotency-Key(string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.
Request body, required
application/json
ids(array of string, required): The reports to act on, of anytype, by theiridfromlistReports. From 1 to 50 ids; an id listed twice is acted on once.schedules(array of object, required): The new schedules of every report. They replace all of each report's current schedules; send an empty list to remove them all. Each schedule updates the whole report: to update only some syncs of a report, set its schedules withupdateReportSchedules. Up to 10.frequency(string, required): How often the schedule runs.hourlyruns every day at each time inselectedTimes, and takes nocronExpression.daily,weekly,monthlyandquarterlyrun whenevercronExpressionfires, and take noselectedTimes. For those, the frequency doesn't change when the report runs, but the app uses it to describe and edit the schedule, so pick the one that matches your cron expression. One ofhourly,daily,weekly,monthly,quarterly.cronExpression(string): When adaily,weekly,monthlyorquarterlyschedule runs: a five-field cron expression (minute, hour, day of month, month, day of week) in the schedule'stimezone, such as0 9 * * 1for every Monday at 9:00, or0 9 L * *for 9:00 on the last day of each month. Required for those frequencies; omit it forhourly. Rollstack checks schedules every 15 minutes, so the minute field must include 0, 15, 30 or 45, and runs at other minutes are skipped. At most 100 characters. Example:0 9 * * 1.selectedTimes(array of string): The times of day anhourlyschedule runs, every day, as 24-hourHH:mmin the schedule'stimezone, such as09:00or13:45. Required forhourly; omit it for other frequencies. Each time must be on the quarter hour (:00,:15,:30or:45). From 1 to 96 times.startDate(string (date-time), required): When the schedule starts: it never runs the report before this date and time. This is a local date and time in the schedule'stimezone, written as if it were UTC:2026-11-02T09:00:00Zmeans 9:00 on November 2, 2026 in that timezone, not 9:00 UTC. For frequencies other thanhourly, set it to the date and time of the first run: the app shows its time as the schedule's time, and when someone changes the schedule's frequency or days there, it rebuildscronExpressionat that time. Example:2026-11-02T09:00:00Z.endDate(string (date-time) or null): When the schedule ends: it never runs the report after this date and time. Omit it or passnullfor a schedule that never ends. LikestartDate, this is a local date and time in the schedule'stimezone, written as if it were UTC. Must be later thanstartDate. Set it later than the last run you want: a run at exactly this time may be skipped. Defaults tonull. Example:2027-11-02T09:00:00Z.timezone(string, required): The timezone the schedule runs in. Its run times (cronExpressionorselectedTimes),startDateandendDateare all local times in this timezone, so a schedule set for 9:00 keeps running at 9:00 local time when daylight saving time starts or ends. Given as an IANA timezone name, such asAmerica/New_York. UTC offsets such as+05:30aren't accepted. Example:America/New_York.
Response 200
Success
application/json
results(array of object, required): One result per report, each naming itsid.- When
statusisdoneid(string, required): The report, by itsidfromids.status(done, required): The call succeeded on this report.result(array of object, required): The report's schedules, asgetReportSchedulesanswers them.id(string, required): Unique identifier for the schedule.updateReportSchedulesreplaces every schedule, so the ids change each time you call it.frequency(string, required): How often the schedule runs.hourlyruns every day at each time inselectedTimes.daily,weekly,monthlyandquarterlyrun whenevercronExpressionfires; those made in the app run every day, on chosen weekdays, on chosen days of the month, or every three months, respectively.yearlycan't be set through the API or the app, and also runs oncronExpression. One ofdaily,weekly,monthly,quarterly,hourly,yearly.cronExpression(string, required): When the schedule runs, as a five-field cron expression (minute, hour, day of month, month, day of week) in the schedule'stimezone. For anhourlyschedule, Rollstack generates it fromselectedTimesand runs the report at those times instead. Monthly schedules made in the app can useLand#, such as0 9 L * *(last day of the month) or0 9 ? * 1#1(first Monday).selectedTimes(array of string, required): The times of day anhourlyschedule runs, every day, as 24-hourHH:mmin the schedule'stimezone. Other frequencies don't use it; it's empty on those set through the API.startDate(string (date-time), required): When the schedule starts: it never runs the report before this date and time. This is a local date and time in the schedule'stimezone, written as if it were UTC:2026-11-02T09:00:00Zmeans 9:00 on November 2, 2026 in that timezone, not 9:00 UTC.endDate(string (date-time) or null, required): When the schedule ends: it never runs the report after this date and time.nullif the schedule never ends. LikestartDate, this is a local date and time in the schedule'stimezone, written as if it were UTC.timezone(string, required): The timezone the schedule runs in. Its run times (cronExpressionorselectedTimes),startDateandendDateare all local times in this timezone, so a schedule set for 9:00 keeps running at 9:00 local time when daylight saving time starts or ends. Given as an IANA timezone name, such asAmerica/New_York.syncIds(array of string or null, required): The syncs, fromlistReportSyncs, that the schedule updates on a report other than aSlideDeck.nullwhen it updates the whole report, which a slide deck always does.nextRunAt(string (date-time) or null, required): When the schedule will next run the report.nullif it has no runs left before itsendDate. UnlikestartDateandendDate, this is an actual UTC time.
- When
statusisfailedid(string, required): The report, by itsidfromids.status(failed, required): The call failed on this report and changed nothing on it. The other reports are unaffected.error(object, required): Why this report failed, as the endpoint for one report would answer. Retry only these reports.code(string, required): A stable, machine-readable code for the error, such asapi-key-missing-scopeordata-validation-error. Use it, rather thanmessage, to handle specific errors in your code.message(string, required): A human-readable explanation of what went wrong, to log or show to people. When the request's path parameters, query or body are invalid (data-validation-error), it lists each invalid field by its path, with the problem, such asbody.emails.0: Invalid email address.statusCode(number, required): The HTTP status the same call on this report alone would answer, such as404or403.
- When