- [HTTP request](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#body.request_body)
- [Response body](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#body.aspect)
- [Try it!](https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks/get#try-it)

Gets a task.

After a task is successfully executed or has exhausted its retry attempts, the task is deleted. A `tasks.get` request for a deleted task returns a `NOT_FOUND` error.

### HTTP request

`GET https://cloudtasks.googleapis.com/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudtasks.tasks.get` |

### Query parameters

| Parameters ||
|---|---|
| `responseView` | ``enum (`https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#View`)`` The responseView specifies which subset of the `https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#Task` will be returned. By default responseView is `https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#View.ENUM_VALUES.BASIC`; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for `https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#View.ENUM_VALUES.FULL` requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the `https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#Task` resource. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#Task`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/cloud-tasks`

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