---
title: "Get host task"
method: GET
path: "/v1/hosts/{host_id}/tasks/{task_id}"
tags: ["Host"]
---

# Get host task

`GET /v1/hosts/{host_id}/tasks/{task_id}`

Returns information about a particular task for a host.

## Path parameters

- `host_id` string, required
- `task_id` string, uuid, required

## Response `200`

OK response.

- Task
  - `completed_at` string, date-time — The time when the task was completed.
  - `created_at` string, date-time, required — The time when the task was created.
  - `database_id` string — The database ID of the task.
  - `entity_id` string, required — The entity ID (database_id or host_id) that this task belongs to.
  - `error` string — The error message if the task failed.
  - `host_id` string — The ID of the host that the task is running on.
  - `instance_id` string — The ID of the instance that the task is operating on.
  - `node_name` string — The name of the node that the task is operating on.
  - `parent_id` string, uuid — The parent task ID of the task.
  - `scope` 'database' | 'host', required — The scope of the task (database or host).
  - `status` 'pending' | 'running' | 'completed' | 'canceled' | 'canceling' | 'failed' | 'unknown', required — The status of the task.
  - `task_id` string, uuid, required — The unique ID of the task.
  - `type` string, required — The type of the task.

## Other responses

- `400` — Bad Request response.
- `404` — Not Found response.
- `409` — Conflict response.
- `500` — Internal Server Error response.
- `default` — Unexpected error response

---

[API](https://skmtc.net/pgedge/apis/pgedge-control-plane-v1-api.md) · [All operations](https://skmtc.net/pgedge/apis/pgedge-control-plane-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pgedge/pgedge-control-plane-v1-api/versions/29a68546f34c/schema)
