Fibric. Docs fibric.io →
v0.9 ยท preview
Reference

Search API

The list endpoints answer "show me recent X". Search answers investigative questions: everything that ever touched one order, every refusal by one rule, every action a given operator proposed against one asset last week. One endpoint queries across events, plans, actions, and receipts with a compact filter grammar and returns typed hits. Search is part of the v0.9 preview register.

Shared conventions, including authentication, pagination, and the error envelope, are defined in the API overview. Error codes are catalogued in Errors.

i
Search reads an index, not the ledger

Results reflect the search index, which trails writes by a few seconds. For compliance-grade reads of the audit trail, use the Receipts API directly; for a complete extract, use the receipts export. Search is for finding things, not for proving them.

GET/v1/searchscope search:read

Executes one query. Results are ordered newest first by the hit's own timestamp and cursor-paginated with the standard limit and cursor parameters. A hit is only returned if the calling key could read the underlying object directly, so search never widens what a key can see; workspace-pinned keys search their workspace only.

qrequiredstring · query

The query string, in the filter grammar below. Maximum 512 characters.

typesstring · query

Comma-separated object types to search: event, plan, action, receipt. Defaults to all four.

limitinteger · query

Page size, 1–100. Defaults to 20.

cursorstring · query

Pagination cursor from a previous response's next_cursor.

The filter grammar

A query is a sequence of terms separated by spaces. All terms must match (implicit AND). Three kinds of terms exist:

TermFormExample
Field filterfield:valueentity:order:SO-10884
Range filterfield>=value, field<valueat>=2026-07-01, value>250
Free textbare word or "quoted phrase""promised ship date"

Free text matches over reasoning strings, payload values, and error messages. Values containing spaces or colons beyond the first are quoted: entity:"room:12 west". Prefix a term with - to negate it: -disposition:DEDUP. OR is not supported in v0.9; run two queries.

Filterable fields, by the object types they apply to:

FieldApplies toMatches
entityplan, action, receipt, eventThe entity_key of an action; events match through the plans they triggered.
typeeventThe envelope event_type, exact or glob: type:order.*.
sourceeventThe envelope source.
operatorplan, action, receiptOperator name or op_ id.
connectoraction, receiptConnector instance id or listing slug.
toolaction, receiptThe tool called, for example tool:order.hold.
dispositionactionALLOW, ALERT, BLOCK, or DEDUP.
verdictreceiptThe trust decision recorded on the receipt.
outcomereceiptapplied, blocked, deduped, failed, undone.
statusplanproposed, executed, vetoed, expired.
correlationallThe correlation_id threading a loop together.
requestreceiptThe request_id that produced the receipt.
valueactionThe numeric value; range operators apply.
atallThe object's own timestamp; range operators apply, RFC 3339 or YYYY-MM-DD.

The search response

Hits arrive in the standard list envelope. Each hit wraps the matched object with its type and timestamp so mixed-type results sort and render without inspection.

curl · everything that touched one order this month
curl -G https://api.fibric.io/v1/search \
  -H "Authorization: Bearer $FIBRIC_KEY" \
  --data-urlencode 'q=entity:order:SO-10884 at>=2026-07-01' \
  --data-urlencode 'limit=50'
200 OK Response
json
{
  "object": "list",
  "data": [
    {
      "object": "search_hit",
      "type": "receipt",
      "at": "2026-07-02T15:04:41Z",
      "hit": {
        "id": "rc_5b21",
        "object": "receipt",
        "tool": "order.hold",
        "entity_key": "order:SO-10884",
        "outcome": "applied"
      }
    },
    {
      "object": "search_hit",
      "type": "plan",
      "at": "2026-07-02T15:02:09Z",
      "hit": {
        "id": "pl_7c1a",
        "object": "execution_plan",
        "operator_id": "op_8f2a1c",
        "status": "executed"
      }
    },
    {
      "object": "search_hit",
      "type": "event",
      "at": "2026-07-02T14:58:01Z",
      "hit": {
        "id": "ev_3a91c7",
        "object": "event",
        "source": "magento",
        "event_type": "order.updated"
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Hits carry summary objects; retrieve the id on its own reference endpoint for the full record. The mixed-type, newest-first result reads as a timeline: the example above is the envelope-to-receipt chain for one order, reconstructed in one call.

Worked examples

QuestionQuery
Every refusal this week, anywheretypes=receipt · q=outcome:blocked at>=2026-06-29
What did the order-risk operator do to this order?q=operator:order-risk entity:order:SO-10884
High-value actions awaiting or given approvaltypes=action · q=disposition:ALERT value>=250
Everything in one reasoning loopq=correlation:co_51d2e8
The receipt a failing request wrotetypes=receipt · q=request:req_9b3e21f0
Dedup hits proving a retry storm was absorbedtypes=action · q=disposition:DEDUP entity:order:SO-10884
HVAC fault events that never produced a plantypes=event · q=type:hvac.zone.* "no matching operator"
curl · audit one guardrail's refusals
curl -G https://api.fibric.io/v1/search \
  -H "Authorization: Bearer $FIBRIC_KEY" \
  --data-urlencode 'q=verdict:BLOCK tool:order.refund at>=2026-06-01' \
  --data-urlencode 'types=receipt'

Limits and behavior

Errors

StatusCodeWhen
400missing_parameterq is absent or empty.
400invalid_parameterThe query exceeds its bounds, names an unknown field, uses a range operator on a non-range field, or types names an unknown type.
400invalid_cursorThe cursor is malformed, expired, or was issued for a different query.
429rate_limitedThe search budget is exhausted. Honor Retry-After.

Malformed-query errors name the offending term in message. As everywhere, branch on code; see Errors.