---
title: "get workergroup logs"
method: POST
path: "/get_workergroup_logs/"
tags: ["Serverless"]
---

# get workergroup logs

`POST /get_workergroup_logs/`

Retrieves logs for a specific workergroup by ID.

CLI Usage: `vastai get workergroup logs <id> [--tail <num_lines>]`

## Request body

- object
  - `id` integer, required — ID of the worker group
  - `tail` integer — Number of log lines to retrieve from the end

## Response `200`

Logs successfully retrieved.

- union
  - object
    - `logs` string — The workergroup logs
  - string — Error message when workergroup not found or authentication fails

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/versions/4ed14f79f796/schema)
