ktm collections search
Search collections and items within a collection sub-tree using the ktm CLI, with support for filtering by query, tags, and owner ID.
Search collections and items in a collection sub-tree
Usage
ktm collections search [flags]
Examples
ktm collections search --operator my-op --collection-uid <tests_root> --query login
ktm collections search --operator my-op --collection-uid <uid> --query "Verify" -o json
ktm collections search --operator my-op --collection-uid <uid> --tags 12,34 --owner-id 5
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--collection-uid | string | Sub-tree to search under (required; use the product tests_root UID for broadest scope) | |
--operator | string | Operator slug (required) | |
--owner-id | int | Filter by owner user id | |
--query | string | Free-text search term | |
--tags | string | Comma-separated tag ids |
Details
Search scopes results to a collection sub-tree — pass --collection-uid (the product's tests_root_collection_uid for the broadest scope). Omitting --collection-uid fails with HTTP 400.
The search walks sub-collections recursively. Items are matched by substring on meta.name (the client sends fields=name by default). Returns a payload with two arrays: collections (sub-collections whose name matches) and items.
Related
Global flags (--output, --debug, --host, …) apply to every command. See the command reference overview.
What's next?
Last updated on