Skip to main content

Search

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: search · 1 operation

GET /v1/search/{tenant_slug}/model​

Search Normalized Model

Search the tenant's normalized model across every format (MFI-6.2, #3754).

Matches operations, types and messages of catalog items and Projects alike. Values within one facet OR together and facets AND; each facet's counts are computed over the matches every other facet keeps, so ticking a value shows exactly that many. An unknown facet value narrows to nothing rather than failing. Matches are ranked by full-text relevance; at most 2 000 are considered, and truncated says when that cap was reached. A relevance order has no cursor, so this list pages by offset within those capped matches, and its totals are their lengths rather than separate counts (#7196).

Args: tenant_slug: The tenant slug. q: The search text (1–200 characters after trimming). kind: Element kinds to keep. protocol: Paradigms to keep. format_: Source formats to keep. grade: Grades to keep. all_versions: Search every live revision. limit: Page size. offset: Matches to skip. auth_data: Authentication data (injected by dependency).

Returns: The page of matches, the totals and the four facets.

Raises: HTTPException: 422 when q is blank or longer than 200 characters.

Operation id: search_normalized_model_v1_search__tenant_slug__model_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
qquerystringyesSearch text: words AND together, "quoted phrases" match in order, 'or' alternates and -word excludes (Postgres websearch syntax, English stemming).
kindqueryarray of string or nullnoElement kind, repeatable: operation, type, message.
protocolqueryarray of string or nullnoParadigm, repeatable: rest, rpc, event, graph, data_schema, agent (aliases such as grpc and graphql work).
formatqueryarray of string or nullnoSource-format key, repeatable (openapi-3.1, protobuf, …).
gradequeryarray of string or nullnoCaptured quality grade, repeatable: A, B, C, D, F or ungraded.
all_versionsquerybooleannoSearch every live revision instead of each project's latest.
limitqueryintegernoPage size. At most 100.
offsetqueryintegernoRows to skip. Deprecated: page with cursor instead. At most 10,000.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for search normalized model.application/json ModelSearchResponse
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

ModelSearchResponse​

GET /v1/search/{tenant}/model (MFI-6.2): matches across every format, with facets.

PropertyTypeRequiredDescription
querystringyesThe search text as received (trimmed).
totalintegeryesMatches before any facet is applied (at most the cap).
matchedintegeryesMatches the selected facets keep.
truncatedbooleanyesTrue when the search hit its cap; counts then cover the best-ranked matches only.
offsetintegeryesOffset.
limitintegeryesLimit.
hitsarray of ModelSearchHitnoThis page of matches, best first.
facetsModelSearchFacetsyesFacets.