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

# Get OpenTofu job logs

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

## Request

- Base URL: `https://placeholder/v1`
- URL: `https://placeholder/v1/v1/opentofu-jobs/{opentofuJobId}/logs`
- Auth: none required
- TypeScript: <https://skmtc.dev/northflank/apis/northflank-api/docs/v1/opentofu-jobs/:opentofuJobId/logs/get.ts> (a function with typed inputs; its response is checked against the schema)

Get logs for an OpenTofu job

## Path parameters

- `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`: 2 breaking, 11 warning, 1 info
  - removed the request body
  - removed the success response with the status `200`
  - deleted the `path` request parameter `opentofuJobId`
  - deleted the `query` request parameter `direction`
  - …10 more

[Operation history](https://skmtc.dev/northflank/apis/northflank-api/changes/v1/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)
