---
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`

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

---

[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)
