- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks/subscribe#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks/subscribe#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks/subscribe#body.request_body)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks/subscribe#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/projects.locations.collections.engines.assistants.agents.a2a.v1.tasks/subscribe#body.aspect)

tasks.subscribe is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like tasks.get) and close the stream.

### HTTP request

Choose an endpoint:
global us   
`GET https://discoveryengine.googleapis.com/v1/{tenant=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/a2a/v1/{name=tasks/*}:subscribe`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `tenant` | `string` Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release. |
| `name` | `string` The resource name of the task to subscribe to. Format: tasks/{taskId} |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains a stream of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1/StreamResponse` instances.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).