---
title: "Get OpenTofu job logs"
method: GET
path: "/v1/teams/{teamId}/opentofu-jobs/{opentofuJobId}/logs"
tags: ["OpenTofu", "team"]
---

# Get OpenTofu job logs

`GET /v1/teams/{teamId}/opentofu-jobs/{opentofuJobId}/logs`

## Request

- Base URL: `https://placeholder/v1`
- URL: `https://placeholder/v1/v1/teams/{teamId}/opentofu-jobs/{opentofuJobId}/logs`
- Auth: none required

Get logs for an OpenTofu job

## Path parameters

- `teamId` string, required
- `opentofuJobId` string, required: ID of the opentofu job

## Query parameters

- `queryType` 'range': `range` selects a log range and returns immediately.
- `startTime` string, date-time: Fetch logs generated after this timestamp.
- `endTime` string, date-time: Fetch logs generated before this timestamp.
- `duration` integer: Range duration in seconds. If set, only one of `startTime` or `endTime` can be set.
- `lineLimit` integer: Number of log lines to fetch.
- `direction` 'backward' | 'forward': Ordering of log lines
- `textIncludes` string: Filter log lines to match this search string
- `textNotIncludes` string: Filter log lines to not match this search string
- `regexIncludes` string: Filter log lines to match this regular expression
- `regexNotIncludes` string: Filter log lines to not match this regular expression

## Response `200`

List of logs values

## Changes

- **2026-11-06** `503a425aa44f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/northflank/apis/northflank-api/changes/v1/teams/:teamId/opentofu-jobs/:opentofuJobId/logs/get.md)

---

[API](https://skmtc.dev/northflank/apis/northflank-api.md) - [All operations](https://skmtc.dev/northflank/apis/northflank-api/llms.txt) - [OpenAPI document](https://skmtc.dev/northflank/apis/northflank-api/revisions/6511db980148?raw)
