---
title: "Get Workflow Logs"
method: GET
path: "/v1/workflow/workflows/{workflowId}/logs"
tags: ["Workflows"]
---

# Get Workflow Logs

`GET /v1/workflow/workflows/{workflowId}/logs`

## Request

- Base URL: `https://api.tetrascience.com`
- URL: `https://api.tetrascience.com/v1/workflow/workflows/{workflowId}/logs`
- Auth: API key in header `ts-auth-token` and API key in header `x-org-slug`

Returns the logs for a workflow, grouped by task. These are the same logs that appear on the **Workflow** page in Tetra.

By default, the response includes logs for the current run of each task in the workflow. To get logs for a single task, use the `taskId` query parameter. When you filter by `taskId`, the response also includes logs from earlier runs of that task, such as runs that were superseded by a retry. Logs from all runs are returned in the same array. The current run's entries come first, followed by earlier runs from oldest to newest. Entries don't indicate which run they came from.

If the workflow can't be found in your organization, the endpoint returns `200` with an empty array (`[]`).

## Path parameters

- `workflowId` string, uuid, required

## Query parameters

- `taskId` string

## Response `200`

The workflow's logs. Each key other than `currentWfStatus` is a task ID, and its value is an array of log entries for that task. If the workflow can't be found, the response is an empty array (`[]`).

- object
  - `currentWfStatus` 'pending' | 'queued' | 'in-progress' | 'completed' | 'failed' | 'canceled': The workflow's current status.

---

[API](https://skmtc.dev/tetrascience/apis/pipelines.md) - [All operations](https://skmtc.dev/tetrascience/apis/pipelines/llms.txt) - [OpenAPI document](https://skmtc.dev/tetrascience/apis/pipelines/revisions/e1d7d5790587?raw)
