paradime.admin.bolt manages Bolt schedules that are created in the UI or through the API, deploys the YAML schedules of the repository, and manages Trigger URLs. To trigger and follow runs, use paradime.bolt. For the GraphQL operations, see Bolt.
Prerequisites
- These operations are available on every plan.
- Your API key needs the Bolt admin capability group. To read a schedule’s
environment, the key also needs Environment admin. - The admin client of the
paradime-iopackage. See Admin client.
Schedules defined in YAML live in the repository: change them there and deploy them with
deploy_schedules. create_schedule, update_schedule and delete_schedule refuse a YAML schedule with AdminConflictException, and list_schedules doesn’t list YAML schedules.Create a schedule
Creates a schedule, as the Bolt UI does, and deploys it. It takes the settings thatparadime.bolt.create_schedule takes, plus slug, command_configs, continue_on_error and trigger_on_webhook. Give exactly one of commands or command_configs.
With a slug, sending the same input again returns the same schedule. Without one, every call creates another schedule. Leaving out suspended or continue_on_error sets them to False. So, after you pause a schedule, sending the create again raises AdminConflictException unless it says suspended=True.
The slug to give the schedule. Generated when left out. A schedule slug is lowercase letters and digits in groups joined by single hyphens, at most 80 characters. A slug that a YAML schedule uses, or that a deleted schedule used, raises
AdminConflictException.The commands with per-command settings, for example
[BoltCommandConfigInput(command="dbt test", continue_on_error=True)].Declares that Trigger URLs start the schedule.
False when left out.The same settings as
paradime.bolt.create_schedule.The nested settings of
paradime.bolt.create_schedule, as models from paradime.apis.bolt.types or as dicts.The new schedule as stored, or the existing one when you sent the same input before.
Update a schedule
Replaces the settings of a schedule created in the UI or through the API, and redeploys it. It takes the same settings ascreate_schedule, except slug. Every setting is replaced, except that leaving out suspended, continue_on_error or env_vars keeps their values. So send the whole schedule. name is the display name and never changes the slug.
Every other setting of
create_schedule.Delete a schedule
Deletes a schedule created in the UI or through the API, and redeploys the schedules. Deleting it again is not an error. Its slug is never given out again. Its Trigger URLs stay, and start nothing.List schedules
Iterates over the workspace’s schedules created in the UI or through the API, as stored, ordered by slug. YAML schedules are not listed.Deploy YAML schedules
Starts a job that reads the YAML schedules from the workspace’s deploy branch and deploys them with the UI schedules. A YAML error fails the job withVALIDATION_FAILED.
The branch you expect the schedules to deploy from. When the workspace deploys from another branch, the API refuses the call before anything starts. Change the deploy branch with
workspaces.update.The job. Wait for it with
admin.jobs.wait. Its result is a DeployBoltSchedulesResult that holds the first page of the schedules the deploy read. Each schedule has its source and, when it was not deployed, its failure_reason. Read every schedule with admin.jobs.deployed_schedules.Trigger URLs
A Trigger URL starts a schedule when a tool sends a request to it with its secret. In the app, Trigger URLs are the incoming webhooks of a schedule.List Trigger URLs
Iterates over a schedule’s Trigger URLs, oldest first. Their secrets are never returned.Create a Trigger URL
Creates a Trigger URL for a schedule. Its secret is returned only by this call: store it now.The Trigger URL (
trigger_url) and its secret (secret). Send the secret as Authorization: Bearer <secret>.Rotate a Trigger URL’s secret
Gives a Trigger URL a new secret. The old secret stops working at once. The new secret is returned only by this call: store it now.Pause or resume a Trigger URL
pause_trigger_url pauses a Trigger URL: a request to it starts no run. resume_trigger_url resumes it: a request starts a run again. Pausing a paused URL, or resuming a running one, changes nothing. A public id that doesn’t exist raises AdminNotFoundException.
Delete a Trigger URL
Deletes a Trigger URL. Deleting it again is not an error.Types
Import the models fromparadime.apis.admin.bolt.types. The nested input models of a schedule, such as BoltNotificationsInput and BoltCommandConfigInput, are in paradime.apis.bolt.types.