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

# List host tasks

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

## Request

- Base URL: `http:////localhost:3000`
- URL: `http:////localhost:3000/v1/hosts/{host_id}/tasks`
- Auth: none declared

Lists all tasks for a host.

## Path parameters

- `host_id` string, required

## Query parameters

- `after_task_id` string, uuid
- `limit` integer
- `sort_order` 'asc' | 'ascend' | 'ascending' | 'desc' | 'descend' | 'descending'

## Response `200`

OK response.

- ListHostTasksResponse
  - `tasks` Task[], required: The tasks for the given host.
    - `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

## Changes

- **2026-01-18** `4dfd62ae6481`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pgedge/apis/pgedge-control-plane-v1-api/changes/v1/hosts/:host_id/tasks/get.md)

---

[API](https://skmtc.dev/pgedge/apis/pgedge-control-plane-v1-api.md) - [All operations](https://skmtc.dev/pgedge/apis/pgedge-control-plane-v1-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pgedge/apis/pgedge-control-plane-v1-api/revisions/34e82976a4b2?raw)
