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.
Path parameters
A UUID string
The UUID of the image to inspect
Query parameters
Regex pattern to search for. May be repeated (max 16); patterns are OR-ed. Max 1024 characters each.
File or directory to search inside the image. Defaults to the rootfs root.
Glob to filter files (ripgrep -g semantics, "!" negates). May be repeated.
Maximum matches per file (hard cap 10000).
Maximum total matches across all files (default 1000, hard cap 10000).
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
}
]
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.