> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin client: Bolt

> Create, update, list and delete Bolt schedules, deploy YAML schedules and manage Trigger URLs from Python with paradime.admin.bolt in the Administration API.

`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`](https://docs.paradime.io/developers/python-sdk/modules/bolt). For the GraphQL operations, see [Bolt](https://docs.paradime.io/developers/graphql-api/admin-api/bolt).

> [!NOTE]
>
> **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-io` package. See [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index).

The examples on this page use this client:

```python theme={"system"}
from paradime import Paradime

paradime = Paradime(api_endpoint="API_ENDPOINT", api_secret="prdm_cmp_...", workspace_uid="WORKSPACE_UID")
```

> [!NOTE]
>
> Schedules defined in YAML live in the repository: change them there and deploy them with [`deploy_schedules`](#deploy-yaml-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 that [`paradime.bolt.create_schedule`](https://docs.paradime.io/developers/python-sdk/modules/bolt#create-a-bolt-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`.

**name** `str` *required*

The schedule's display name.

**schedule** `str` *required*

The cron expression, or `OFF` for no time-based runs.

**environment** `str` *required*

The slug of the Bolt environment that the schedule runs in.

**slug** `Optional[str]` (default: None)

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`.

**commands** `Optional[List[str]]` (default: None)

The commands each run runs, in order, for example `["dbt build"]`.

**command\_configs** `Optional[List[BoltCommandConfigInput | dict]]` (default: None)

The commands with per-command settings, for example `[BoltCommandConfigInput(command="dbt test", continue_on_error=True)]`.

**continue\_on\_error** `Optional[bool]` (default: None)

The schedule-level default for continuing past a failed command.

**trigger\_on\_webhook** `Optional[bool]` (default: None)

Declares that [Trigger URLs](https://docs.paradime.io/products/bolt/external-triggers/incoming-webhooks.md) start the schedule. `False` when left out.

**git\_branch, description, timezone, owner\_email, suspended, sla\_seconds, trigger\_on\_merge** `optional`

The same settings as [`paradime.bolt.create_schedule`](https://docs.paradime.io/developers/python-sdk/modules/bolt#create-a-bolt-schedule).

**notifications, integrations, self\_healing, turbo\_ci, deferred\_schedule, schedule\_trigger, env\_vars** `optional`

The nested settings of [`paradime.bolt.create_schedule`](https://docs.paradime.io/developers/python-sdk/modules/bolt#create-a-bolt-schedule), as models from `paradime.apis.bolt.types` or as dicts.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `BoltScheduleDefinition`

The new schedule as stored, or the existing one when you sent the same input before.

```python theme={"system"}
from paradime.apis.bolt.types import BoltNotificationChannelInput, BoltNotificationsInput

schedule = paradime.admin.bolt.create_schedule(
    slug="nightly",
    name="Nightly build",
    schedule="0 2 * * *",
    timezone="UTC",
    environment="BOLT_ENVIRONMENT_SLUG",
    commands=["dbt build"],
    notifications=BoltNotificationsInput(
        email_notifications=[
            BoltNotificationChannelInput(channel="data-team@example.com", events=["FAILED"])
        ]
    ),
)
print(schedule.slug, schedule.is_suspended)
```

## 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 as `create_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.

**slug** `str` *required*

The slug of the schedule to change.

**name, schedule, environment** `str` *required*

The display name, the cron expression or `OFF`, and the Bolt environment's slug.

**commands, command\_configs, …** `optional`

Every other setting of [`create_schedule`](#create-a-schedule).

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `BoltScheduleDefinition`

The schedule, as now stored.

```python theme={"system"}
# Pause the schedule. The other settings are sent again because update replaces them.
paradime.admin.bolt.update_schedule(
    "nightly",
    name="Nightly build",
    schedule="0 2 * * *",
    timezone="UTC",
    environment="BOLT_ENVIRONMENT_SLUG",
    commands=["dbt build"],
    suspended=True,
)
```

## 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.

**slug** `str` *required*

The slug of the schedule to delete.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `str`

The slug of the deleted schedule.

```python theme={"system"}
paradime.admin.bolt.delete_schedule("nightly")
```

## 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.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to read, for a company API key.

**page\_size** `int` (default: 100)

How many schedules to read per request, at most 500.

**Returns** `Iterator[BoltScheduleDefinition]`

The schedules, read one page at a time.

```python theme={"system"}
for schedule in paradime.admin.bolt.list_schedules():
    print(schedule.slug, schedule.name, schedule.schedule, schedule.is_suspended)
```

## Deploy YAML schedules

Starts a job that reads the [YAML schedules](https://docs.paradime.io/products/bolt/creating-schedules/schedules-as-code/index) from the workspace's deploy branch and deploys them with the UI schedules. A YAML error fails the job with `VALIDATION_FAILED`.

**branch** `Optional[str]` (default: None)

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`](https://docs.paradime.io/developers/python-sdk/modules/admin/workspaces#update-a-workspace).

**workspace\_uid** `Optional[str]` (default: None)

The workspace to deploy, for a company API key.

**Returns** `AdminJob`

The job. Wait for it with [`admin.jobs.wait`](https://docs.paradime.io/developers/python-sdk/modules/admin/jobs#wait-for-a-job). 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`](https://docs.paradime.io/developers/python-sdk/modules/admin/jobs#list-the-schedules-of-a-deploy).

```python theme={"system"}
job = paradime.admin.bolt.deploy_schedules(branch="main")
job = paradime.admin.jobs.wait(job.id)

for schedule in paradime.admin.jobs.deployed_schedules(job.id):
    if schedule.failure_reason:
        print(f"{schedule.slug} was not deployed: {schedule.failure_reason}")
```

## 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](https://docs.paradime.io/products/bolt/external-triggers/incoming-webhooks.md) of a schedule.

### List Trigger URLs

Iterates over a schedule's Trigger URLs, oldest first. Their secrets are never returned.

**schedule\_slug** `str` *required*

The schedule's slug.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to read, for a company API key.

**page\_size** `int` (default: 100)

How many Trigger URLs to read per request, at most 500.

**Returns** `Iterator[TriggerUrl]`

The Trigger URLs, read one page at a time.

```python theme={"system"}
for trigger_url in paradime.admin.bolt.list_trigger_urls("nightly"):
    print(trigger_url.public_id, trigger_url.name, trigger_url.is_enabled, trigger_url.last_event_at)
```

### Create a Trigger URL

Creates a Trigger URL for a schedule. Its secret is returned only by this call: store it now.

**schedule\_slug** `str` *required*

The slug of the schedule that the URL starts.

**name** `str` *required*

The URL's name, 1 to 100 characters, unique among the schedule's Trigger URLs.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `TriggerUrlWithSecret`

The Trigger URL (`trigger_url`) and its secret (`secret`). Send the secret as `Authorization: Bearer <secret>`.

```python theme={"system"}
created = paradime.admin.bolt.create_trigger_url("nightly", "github-actions")
print(created.trigger_url.url)
print(created.secret)  # shown only once
```

### 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.

**public\_id** `str` *required*

The Trigger URL's public id.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `TriggerUrlWithSecret`

The Trigger URL and its new secret.

```python theme={"system"}
rotated = paradime.admin.bolt.rotate_trigger_url_secret("TRIGGER_URL_PUBLIC_ID")
print(rotated.secret)
```

### 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`.

**public\_id** `str` *required*

The Trigger URL's public id.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `TriggerUrl`

The Trigger URL, now paused or running.

```python theme={"system"}
paradime.admin.bolt.pause_trigger_url("TRIGGER_URL_PUBLIC_ID")
paradime.admin.bolt.resume_trigger_url("TRIGGER_URL_PUBLIC_ID")
```

### Delete a Trigger URL

Deletes a Trigger URL. Deleting it again is not an error.

**public\_id** `str` *required*

The Trigger URL's public id.

**workspace\_uid** `Optional[str]` (default: None)

The workspace to change, for a company API key.

**Returns** `str`

The public id of the deleted Trigger URL.

```python theme={"system"}
paradime.admin.bolt.delete_trigger_url("TRIGGER_URL_PUBLIC_ID")
```

## Types

Import the models from `paradime.apis.admin.bolt.types`. The nested input models of a schedule, such as `BoltNotificationsInput` and `BoltCommandConfigInput`, are in `paradime.apis.bolt.types`.

**BoltScheduleDefinition** `model`

**fields**

**slug** `str`

The schedule's slug.

**name** `str`

The display name.

**schedule** `Optional[str]`

The cron expression, or `OFF`.

**timezone** `Optional[str]`

The timezone the cron expression runs in. `None` for UTC.

**environment** `Optional[EnvironmentLink]`

The Bolt environment, with its `slug` and `name`. `None` when the schedule names none and runs in the default Bolt environment, when the environment no longer exists, or for a key without **Environment admin**.

**git\_branch** `Optional[str]`

The git branch the schedule runs. `None` for the default branch.

**owner\_email** `Optional[str]`

The owner's email.

**description** `Optional[str]`

What the schedule is for.

**sla\_seconds** `Optional[int]`

How long a run may take before it breaches its SLA.

**commands** `Optional[List[str]]`

The commands each run runs.

**is\_suspended** `Optional[bool]`

Whether the schedule is paused.

**trigger\_on\_merge** `Optional[bool]`

Whether a merge to the branch starts a run.

**trigger\_on\_webhook** `Optional[bool]`

Whether Trigger URLs start the schedule.

**updated\_at** `Optional[datetime]`

When the schedule was last saved.

**TriggerUrl** `model`

**fields**

**public\_id** `str`

The Trigger URL's public id.

**name** `str`

The URL's name.

**is\_enabled** `Optional[bool]`

Whether a request to the URL starts a run. `False` while the URL is paused.

**url** `Optional[str]`

The URL that tools send requests to.

**schedule** `Optional[BoltScheduleLink]`

The schedule that the URL starts, with its `slug` and `name`. `None` when the schedule no longer exists: then the URL starts nothing.

**created\_at** `Optional[datetime]`

When the URL was created.

**last\_event\_at** `Optional[datetime]`

When the URL last received a request.

**has\_secret** `Optional[bool]`

Whether the URL has a secret. Always `True`.

**secret\_updated\_at** `Optional[datetime]`

When the secret was last set. `None` for a URL whose secret was set before Paradime recorded this time.

**TriggerUrlWithSecret** `model`

**fields**

**trigger\_url** `TriggerUrl`

The Trigger URL.

**secret** `str`

The secret, returned only once.


## Related topics

- [Admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index.md)
- [Admin client: environments](https://docs.paradime.io/developers/python-sdk/modules/admin/environments.md)
- [Admin client: jobs](https://docs.paradime.io/developers/python-sdk/modules/admin/jobs.md)
- [Admin client: notifications](https://docs.paradime.io/developers/python-sdk/modules/admin/notifications.md)
- [Admin client: usage](https://docs.paradime.io/developers/python-sdk/modules/admin/usage.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.