---
title: "Connect to a task's websocket"
method: GET
path: "/v1/tasks/{task-id}/websocket/{websocket-id}"
tags: ["changes and tasks"]
---

# Connect to a task's websocket

`GET /v1/tasks/{task-id}/websocket/{websocket-id}`

Establish a websocket connection to a specific task.

## Path parameters

- `task-id` string, required
- `websocket-id` string, required

## Other responses

- `101` — The connection is upgraded to the websocket protocol and the websocket connection is established. The full websocket protocol is not documented. For details, see the [Python client code](https://github.com/canonical/operator/blob/main/ops/pebble.py#L1818).

---

[API](https://skmtc.net/canonical/apis/pebble-api.md) · [All operations](https://skmtc.net/canonical/apis/pebble-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/canonical/pebble-api/revisions/a94f353eccac/schema)
