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

# Get host task logs

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

## Request

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

Returns the log of a particular task for a host.

## Path parameters

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

## Query parameters

- `after_entry_id` string, uuid
- `limit` integer

## Response `200`

OK response.

- TaskLog
  - `database_id` string: The database ID of the task log. Deprecated: use entity_id instead.
  - `entity_id` string, required: The entity ID (database_id or host_id) that this task log belongs to.
  - `entries` TaskLogEntry[], required: Entries in the task log.
    - `fields` object: Additional fields for the log entry.
    - `message` string, required: The log message.
    - `timestamp` string, date-time, required: The timestamp of the log entry.
  - `last_entry_id` string: The ID of the last entry in the task log.
  - `scope` 'database' | 'host', required: The scope of the task (database or host).
  - `task_id` string, required: The unique ID of the task log.
  - `task_status` 'pending' | 'running' | 'completed' | 'failed' | 'unknown' | 'canceled' | 'canceling', required: The status 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/:task_id/logs/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)
