Search
Search API endpoints for column metadata for subscriptions, workflows, and tasks.
WorkflowProductSchema
WorkflowSearchSchema
Bases: BaseModel
Schema for workflow search results.
Source code in gso/api/v1/search.py
ProcessSearchSchema
Bases: BaseModel
Schema for process search results.
Source code in gso/api/v1/search.py
SubscriptionColumnPrefix
LabelPrefix
ProductColumnPrefix
Bases: StrEnum
Prefixes applied to product-linked fields for different contexts.
Source code in gso/api/v1/search.py
SortModel
FilterModel
Bases: BaseModel
Filter instruction pairing a field with a value.
Source code in gso/api/v1/search.py
SubscriptionSearchRequest
Bases: BaseModel
Request payload for subscription search.
Source code in gso/api/v1/search.py
normalize_legacy_filter_strings(v)
classmethod
Support legacy shorthand filters like ["type:subscription"].
This allows existing clients to keep working while the preferred format is a list of objects: [{"field": "type", "value": "subscription"}].
Additionally, support resource_type field syntax such as
"resource_type.site_country:(NL)" by translating it to two filters:
- {"field": "resource_type", "value": "site_country"}
- {"field": "instance_value", "value": "(NL)"}
Also support payloads where values already include surrounding
parentheses, e.g. resource_type.site_country_code:(NL) which will
be preserved as-is and passed through to the filter layer.
Source code in gso/api/v1/search.py
SubscriptionSearchResponse
ProcessSearchRequest
Bases: BaseModel
Request payload for process search.
Source code in gso/api/v1/search.py
normalize_legacy_filter_strings(v)
classmethod
Support legacy shorthand filters like ["is_task:true"].
Source code in gso/api/v1/search.py
ProcessSearchResponse
_field_type_str(annotation)
Map a Pydantic/typing annotation to a simple type string for the UI.
Source code in gso/api/v1/search.py
_ensure_new_search_enabled()
Return 404 when the new search feature flag is disabled.
_column_definitions_from_names(names)
Convert field names to {field, name} structures expected by the UI.
We title-case the display name; customize per field later if needed.
Source code in gso/api/v1/search.py
_get_subscription_column_names()
Return the list of subscription table column names.
This uses SQLAlchemy table metadata so it stays in sync with the DB schema.
Source code in gso/api/v1/search.py
_get_schema_field_names(schema)
Return Pydantic field or alias names for the provided schema.
Source code in gso/api/v1/search.py
_filter_out_id_suffix(fields)
Filter out fields that end with _id suffix.
Used for the /columns endpoint so internal identifier fields like
process_id or workflow_id are not exposed as selectable columns.
Source code in gso/api/v1/search.py
_column_definitions_from_schema(schema, *, include_fields=None)
Build column definitions (field, name, type) from a Pydantic schema.
Optionally restrict to a whitelist of field names/aliases when include_fields is provided.
Source code in gso/api/v1/search.py
_get_linked_columns(schema, *, prefix, label_prefix)
Generic helper to build linked column definitions from a schema.
Source code in gso/api/v1/search.py
_get_linked_subscription_column(*, prefix=SubscriptionColumnPrefix.LINKED_SUBSCRIPTION, label_prefix=LabelPrefix.SUBSCRIPTION)
Return column definitions for linked subscriptions.
Source code in gso/api/v1/search.py
_get_linked_product_column(*, prefix=ProductColumnPrefix.PROCESS_PREFIX, label_prefix=LabelPrefix.PRODUCT)
Return column definitions for linked products.
Source code in gso/api/v1/search.py
_get_resource_type_columns()
Return column definitions derived from all resource types.
Each entry is of the form {"field": "resource_type.
Source code in gso/api/v1/search.py
_ensure_columns(columns, extras)
Append missing columns from extras while preserving order.
Source code in gso/api/v1/search.py
get_search_columns()
async
Return available columns for subscriptions, workflows, and tasks.
- Subscriptions: base subscription schema (excluding id-suffixed fields) plus resource-type columns.
- Workflows: fields from
WorkflowSearchSchema(excluding id-suffixed fields) plus linked subscription/product columns. - Tasks (processes): selected fields from
ProcessSchema(excluding id-suffixed fields) plus linked subscription/product columns.
Source code in gso/api/v1/search.py
_linked_subscription_filter_fields()
Return the set of linked subscription field names for filter validation.
_linked_product_filter_fields(*, prefix=ProductColumnPrefix.PROCESS_PREFIX)
Return the set of linked product field names for filter validation.
Source code in gso/api/v1/search.py
search_subscriptions(payload)
async
Search subscriptions using Solr.
Source code in gso/api/v1/search.py
search_tasks(payload)
async
Search processes using Solr and return matching processes enriched with related data.