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

# automations

# `prefect.server.api.automations`

## Functions

### `create_automation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L39](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L39)</sup>

```python theme={null}
create_automation(automation: AutomationCreate, db: PrefectDBInterface = Depends(provide_database_interface)) -> Automation
```

Create an automation.

For more information, see [https://www.prefect.io/docs/v3/concepts/automations](https://www.prefect.io/docs/v3/concepts/automations).

### `update_automation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L96](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L96)</sup>

```python theme={null}
update_automation(automation: AutomationUpdate, automation_id: UUID = Path(..., alias='id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> None
```

### `patch_automation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L139](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L139)</sup>

```python theme={null}
patch_automation(automation: AutomationPartialUpdate, automation_id: UUID = Path(..., alias='id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> None
```

### `delete_automation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L165](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L165)</sup>

```python theme={null}
delete_automation(automation_id: UUID = Path(..., alias='id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> None
```

### `read_automations` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L180](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L180)</sup>

```python theme={null}
read_automations(sort: AutomationSort = Body(AutomationSort.NAME_ASC), limit: int = LimitBody(), offset: int = Body(0, ge=0), automations: Optional[AutomationFilter] = None, db: PrefectDBInterface = Depends(provide_database_interface)) -> Sequence[Automation]
```

### `count_automations` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L198](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L198)</sup>

```python theme={null}
count_automations(automations: Optional[AutomationFilter] = Body(None, embed=True), db: PrefectDBInterface = Depends(provide_database_interface)) -> int
```

### `read_automation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L212](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L212)</sup>

```python theme={null}
read_automation(automation_id: UUID = Path(..., alias='id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> Automation
```

### `read_automations_related_to_resource` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L228](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L228)</sup>

```python theme={null}
read_automations_related_to_resource(resource_id: str = Path(..., alias='resource_id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> Sequence[Automation]
```

### `delete_automations_owned_by_resource` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L240](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/automations.py#L240)</sup>

```python theme={null}
delete_automations_owned_by_resource(resource_id: str = Path(..., alias='resource_id'), db: PrefectDBInterface = Depends(provide_database_interface)) -> None
```
