v1
latestOpenAPI 3.1.02026-07-2675394318.9 KBinspect
Search file contents in image
Regex content search inside the image's root filesystem, powered by ripgrep.
Symlinks are never followed during traversal, hidden files are searched, .gitignore-style files inside the image are ignored, and binary files (containing a NUL byte) are skipped. Rust regex syntax, linear-time matching.
get/inspect/{image_uuid}/grep
Path parameters
image_uuidstring uuid required
A UUID string
Example:12345678-9abc-baba-deda-0123456789ab
The UUID of the image to inspect
Query parameters
patternstring required
Example:^PermitRootLogin
Regex pattern to search for. May be repeated (max 16); patterns are OR-ed. Max 1024 characters each.
pathstring
Example:/etc
File or directory to search inside the image. Defaults to the rootfs root.
globstring
Example:*.conf
Glob to filter files (ripgrep -g semantics, "!" negates). May be repeated.
max_countinteger
Maximum matches per file (hard cap 10000).
max_totalinteger
Maximum total matches across all files (default 1000, hard cap 10000).
case'sensitive' | 'insensitive' | 'smart'
Case sensitivity mode.
Response
OK
Example response
{
"path": "/etc",
"patterns": [
"^PermitRootLogin"
],
"matches": [
{
"path": "/etc/ssh/sshd_config",
"line_number": 57,
"absolute_offset": 1712,
"line_text": "#PermitRootLogin prohibit-password\n",
"line_bytes": 8192,
"submatches": [
{
"text": "PermitRootLogin",
"start": 1,
"end": 16
}
]
}
]
}