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

# Phase of Play

> A span of play with each team's phase, in and out of possession.

> [!WARNING]
>
> The Game Data API is in preview. Endpoints, fields and limits may change before release, and it is not yet available to call.

## Technical Details

* **Variable Type:** Segment
* **Segment Type:** `phase_of_play`
* **Returned By:** [List Game Segments](https://docs.uplift.ai/api-reference/game-data/segments/list.md)
* **Filter:** `segment_type=phase_of_play`

## Description

A span of in-play time with a phase for each team: the team in possession and the team out of possession. The segment's `team_id` is the team in possession. Phases cover in-play time with no gaps and stop during a [dead ball](https://docs.uplift.ai/api-reference/game-data/event-catalogue/segments/dead-ball). Each event's `phase` is the in-possession phase.

**In possession:** `build_up`, `create`, `finish`, `quick_break`, `direct`, `set_play`, `chaotic`

**Out of possession:** `high_block`, `medium_block`, `low_block`, `defending_transition`, `defending_quick_break`, `defending_direct`, `defending_set_play`, `chaotic`

A fast attack after a turnover is a `quick_break`.

Every segment has the same envelope fields: time, frames, team, player, `confidence` and `layer`. See [List Game Segments](https://docs.uplift.ai/api-reference/game-data/segments/list.md). The fields below are specific to this type and are returned in `attributes`.

## Attributes

| Field | Units | Description |
| - | - | - |
| `team_in_possession_phase_type` | — | Phase of the team in possession, from the first list above. |
| `team_out_of_possession_phase_type` | — | Phase of the team out of possession, from the second list above. |
| `previous_phase` | — | In-possession phase before this one. |
| `ended_with` | — | What ended the phase, for example `phase_change`. |
| `team_possession_lead_to_shot` | — | Whether the team possession this phase belongs to led to a shot. |
| `team_possession_lead_to_goal` | — | Whether the team possession this phase belongs to led to a goal. |

## Example

Only the type-specific fields and a few envelope fields are shown.

```json theme={null}
{
  "segment_type": "phase_of_play",
  "segment_id": "ph-0417",
  "team_id": "t-0451",
  "team_side": "home",
  "attributes": {
    "team_in_possession_phase_type": "create",
    "team_out_of_possession_phase_type": "medium_block",
    "previous_phase": "build_up",
    "ended_with": "phase_change",
    "team_possession_lead_to_shot": true,
    "team_possession_lead_to_goal": false
  }
}
```

## Related

* [Team Possession](https://docs.uplift.ai/api-reference/game-data/event-catalogue/segments/team-possession)
* [Dead Ball](https://docs.uplift.ai/api-reference/game-data/event-catalogue/segments/dead-ball)
* [Team Shape](https://docs.uplift.ai/api-reference/game-data/event-catalogue/events/team-shape)


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