Skip to main content
search

Global Search

Semantic (vector-based) search across the company's knowledge, for editors and operators alike (DIAGNOSE_RUN).

GET
/api/records/{company_name}/search

The hit types are role-scoped server-side: editors (TEMPLATE_UPDATE in any group of the company) search GLOBAL_SEARCH_ALLOWED_TYPES — machines, templates, chain templates, symptoms, symptom groups, causes, routines and routine steps; everyone else GLOBAL_SEARCH_OPERATOR_TYPES — machines, symptoms, symptom groups, routines and routine steps. Editing is decided per hit, not per company: editable says whether the caller holds TEMPLATE_UPDATE in a group with access to the hit's template; editor-only types (causes, templates, chain templates) come only from such templates. Template-scoped hits carry machine_count, the number of visible machines their actions could run on; a hit the caller cannot edit and that runs on no machine is dropped, since it could only be acted on through a machine.

Results are restricted to what the caller may see: entities of company_name that are either company-visible or shared with one of the caller's groups — the same visibility model as the machine/template list endpoints.

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

company_namestringrequired
qstringqueryrequired

Free-text search query

Required string length: 1 - 500
langenum<string> | nullquery

Preferred display language for hit names

Available options: en, de, fr, es, it, pt, nl, pl, cs, da, sv, fi, nb, et, lt, lv, sk, sl, bg, ru, uk, el, tr, hu, ja, ko, zh, id
limitintegerquerydefault:20
Required range: 1 <= x <= 50
entity_typeenum<string>[] | nullquery

Restrict to these entity types. The allowed set, which is also the default, depends on the caller's role: editors (TEMPLATE_UPDATE in any group of the company) get ['cause', 'chain_template', 'machine', 'routine', 'routine_step', 'symptom', 'symptom_group', 'template'], everyone else ['machine', 'routine', 'routine_step', 'symptom', 'symptom_group']. Types outside the caller's set are rejected with 422.

Response

application/json

Successful Response

hitsobject[]required