Search one entity's content with a regular expression

POST /Platform/entities/{entity_type}/{entity_id}/search

Search one entity's content with a regular expression. Returns the matching lines with their locations.

The search runs server-side over the entity's YAML and returns the numbered matching lines with locators. It locates text ahead of an edit/patch, and verifies whether a string is present or absent in an entity.

pattern is a case-insensitive regular expression. A plain string works as a literal substring search (regex metacharacters are optional), so both send_email and \bDr\.\s+\w+ are valid. An absent string yields an empty match list.

Returns each match with its 1-based view line number AND the JSONPath of the field it falls in. The JSONPath is exactly the anchor accepted by edit to scope a non-unique replacement — and it is INDEXED for matches inside list items ($.fields[20].label), so it converts directly to a patch JSON Pointer (/fields/20/label) with no index counting.

Matches also carry locator context, rendered as REAL numbered view lines (never invented text):

With logical (default), the pattern is also matched against each field's unfolded string value, so a phrase that YAML folds across continuation lines (e.g. a long block-scalar paragraph) still matches even though it straddles a physical line break. This is the key advantage over a plain grep of the raw YAML, which would miss such folded matches (a false negative).

search returns ONLY the matching lines (plus a few context lines) — never the full field. A whole large text field is read via get with paths=<field>: the complete field as clean line-numbered text in one call, numbered with the SAME view coordinates search reports (single-path reads).

Path parameters

Body parameters

Returns

EntitySearchResponse

Example request

curl -X POST "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}/search" \
  -H "Authorization: Bearer $HILUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'