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

# flows

# `prefect.server.api.ui.flows`

## Functions

### `count_deployments_by_flow` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L48](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L48)</sup>

```python theme={null}
count_deployments_by_flow(flow_ids: List[UUID] = Body(default=..., embed=True, max_length=200), db: PrefectDBInterface = Depends(provide_database_interface)) -> Dict[UUID, int]
```

Get deployment counts by flow id.

### `next_runs_by_flow` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L143](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L143)</sup>

```python theme={null}
next_runs_by_flow(flow_ids: List[UUID] = Body(default=..., embed=True, max_length=200), db: PrefectDBInterface = Depends(provide_database_interface)) -> Dict[UUID, Optional[SimpleNextFlowRun]]
```

Get the next flow run by flow id.

## Classes

### `SimpleNextFlowRun` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L29](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L29)</sup>

**Methods:**

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

#### `validate_next_scheduled_start_time` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L41](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/api/ui/flows.py#L41)</sup>

```python theme={null}
validate_next_scheduled_start_time(cls, v: DateTime | datetime) -> DateTime
```
