Opentofurun /
Get opentofu job logs
Get logs for an opentofu job
Path parameters
opentofuJobId
string requiredID of the opentofu job
Query parameters
queryType
string`range` selects a log range and returns immediately.one ofrangestartTime
stringFetch logs generated after this timestamp.endTime
stringFetch logs generated before this timestamp.duration
integerRange duration in seconds. If set, only one of `startTime` or `endTime` can be set.lineLimit
numberNumber of log lines to fetch.direction
stringOrdering of log linesone ofbackward, forwardtextIncludes
stringFilter log lines to match this search stringtextNotIncludes
stringFilter log lines to not match this search stringregexIncludes
stringFilter log lines to match this regular expressionregexNotIncludes
stringFilter log lines to not match this regular expression
Request body
- {object}
queryType
string`range` selects a log range and returns immediately.one ofrangestartTime
stringFetch logs generated after this timestamp.endTime
stringFetch logs generated before this timestamp.duration
integerRange duration in seconds. If set, only one of `startTime` or `endTime` can be set.lineLimit
numberNumber of log lines to fetch.min0max1000direction
stringOrdering of log linesone ofbackward, forwardtextIncludes
stringFilter log lines to match this search stringmin length1max length100textNotIncludes
stringFilter log lines to not match this search stringmin length1max length100regexIncludes
stringFilter log lines to match this regular expressionmin length1max length100regexNotIncludes
stringFilter log lines to not match this regular expressionmin length1max length100
Response body
- {object}Response object.
data
[array] requiredResult data.- {object}
containerId
string requiredlog
requiredts
string required
API
CLI
JS Client
GET /v1/opentofu-jobs/{opentofuJobId}/logs
Example request
Request body
curl
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request GET \
--data '{"queryType":"range","startTime":"2023-02-16T14:00:00.000Z","endTime":"2023-02-16T15:00:00.000Z","duration":600,"lineLimit":250,"direction":"backward","textIncludes":"myvalue","textNotIncludes":"myvalue","regexIncludes":"my.*value","regexNotIncludes":"my.*value"}' \
https://api.northflank.com/v1/opentofu-jobs/{opentofuJobId}/logsExample response
200 OK
List of logs values
JSON
{
"data": [
{
"log": "stdout F This is a log line",
"ts": "2023-03-21T15:01:17.310Z"
}
]
}