Skip to content
Hoody.com

The Log Management endpoints let you discover, inspect, search, and clean up the execution logs produced by processes running inside a container. Use these routes to enumerate log files, tail a file in real time, pull a slice of a log into memory, run a multi-file search, or purge old log data. All routes are scoped to a specific container via the host template.

GET /api/v1/exec/logs/list

Returns the available log files in the container. The response shape varies depending on whether type is supplied: with type the response includes a directory field; without it, the response returns a flat logs array.

NameInTypeRequiredDescription
typequerystringNoType query parameter
limitquerystringNoLimit query parameter
Terminal window
curl -X GET "https://proj123-cnt456-exec-1.eu-west.containers.hoody.icu/api/v1/exec/logs/list?type=application&limit=50"

GET /api/v1/exec/logs/stream

Streams the contents of a specific log file. Set follow=true to keep the connection open and receive new lines as they are written.

NameInTypeRequiredDescription
filequerystringYesFile query parameter
followquerystringNoFollow query parameter
Terminal window
curl -X GET "https://proj123-cnt456-exec-1.eu-west.containers.hoody.icu/api/v1/exec/logs/stream?file=app-2025-01-16.log&follow=true"

POST /api/v1/exec/logs/read

Reads a fixed window of lines from a log file. You can either pass file (a path inside the container) or executionId to target the log of a specific past execution. The response includes both the file metadata and the returned slice of lines.

NameTypeRequiredDefaultDescription
filestringNoFile
executionIdstringNoExecution Id
linesintegerNo100Lines
tailbooleanNotrueTail
searchstringNoSearch
Terminal window
curl -X POST "https://proj123-cnt456-exec-1.eu-west.containers.hoody.icu/api/v1/exec/logs/read" \
-H "Content-Type: application/json" \
-d '{
"file": "app-2025-01-16.log",
"lines": 25,
"tail": true,
"search": "ERROR"
}'

POST /api/v1/exec/logs/search

Searches one or more log files for a literal substring or a regular expression. Use query for substring matching or regex for pattern matching. The response reports how many files were scanned and the total number of matches found.

NameTypeRequiredDefaultDescription
querystringNoQuery
regexstringNoRegex
filesarrayNoFiles
limitintegerNo1000Limit
caseSensitivebooleanNofalseCase Sensitive
Terminal window
curl -X POST "https://proj123-cnt456-exec-1.eu-west.containers.hoody.icu/api/v1/exec/logs/search" \
-H "Content-Type: application/json" \
-d '{
"query": "OOMKilled",
"files": ["app-2025-01-15.log", "app-2025-01-16.log"],
"limit": 500,
"caseSensitive": true
}'

DELETE /api/v1/exec/logs/clear

Deletes log files from the container. Target a single file with file, a category with type, or age out old data with olderThanDays. Set confirm=true to authorize a destructive delete; the response reports how many files were removed and the total bytes reclaimed.

NameInTypeRequiredDescription
filequerystringNoFile query parameter
typequerystringNoType query parameter
olderThanDaysquerystringNoOlderThanDays query parameter
confirmquerystringNoConfirm query parameter
Terminal window
curl -X DELETE "https://proj123-cnt456-exec-1.eu-west.containers.hoody.icu/api/v1/exec/logs/clear?olderThanDays=30&confirm=true"