---
title: pydo.apps.get_exec_active_deployment()
description: Retrieve Exec URL
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/apps/get_exec_active_deployment/
last_updated: "2026-11-06"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.apps.get_exec_active_deployment()

Generated on 6 Nov 2026 from `pydo` version [`v0.45.0`](https://github.com/digitalocean/pydo/releases/tag/v0.45.0)

## Usage

```python
client.apps.get_exec_active_deployment(
    app_id="4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf",
    component_name="component",
    instance_name=None,
)
```

Returns `JSON` Raises `HttpResponseError`

## Description

Returns a websocket URL that allows sending/receiving console input and output to a component of the active deployment if one exists.

## Parameters

`app_id` string required

The app ID

`component_name` string required

An optional component name. If set, logs will be limited to this component only.

`instance_name` string optional

The name of the actively running ephemeral compute instance

## Request Sample

## Show Request Sample

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

get_resp = client.apps.get_exec_active_deployment(app_id="a6adf840", component_name="component")
```

## Response Example

## Show Response Example

```json
{
  "url": "wss://exec/?token=xxx"
}
```

## More Information

See [`/v2/apps/{app_id}/components/{component_name}/exec`](https://docs.digitalocean.com/reference/api/reference/apps/index.html.md#apps_get_exec_active_deployment) in the API reference for additional detail on responses, headers, parameters, and more.