{"openapi":"3.1.0","info":{"title":"FiniDB","version":"0.0.1","description":"Planning-model database for AI agents. All writes go through /apply; reads are /query, /explain, /describe, /spec; push is Server-Sent Events on /subscribe."},"paths":{"/db":{"get":{"summary":"List databases","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}},"post":{"summary":"Create a database","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/apply":{"post":{"summary":"Apply a batch of commands atomically","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"commands":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"const":"create_calendar"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"granularity":{"enum":["month","quarter","year"]},"start":{"type":"string"},"end":{"type":"string"},"fiscal_year_start_month":{"type":"integer","minimum":1,"maximum":12},"rollups":{"type":"array","items":{"enum":["quarter","year"]},"description":"roll-up levels above the base granularity, e.g. [\"year\"]; quarter/year ids are fiscal (2027-Q1 = Q1 of FY2027)"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"enum":["number","string","boolean","date"]},"default":{}},"required":["type"]},"description":"custom period properties, e.g. frame"},"period_properties":{"type":"object","additionalProperties":{"type":"object"},"description":"keys are period ids or ranges like 2026-04..2026-12; values are {property: value}"}},"required":["op","id","granularity","start","end"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"extend_calendar"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"end":{"type":"string"}},"required":["op","id","end"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"create_list"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"name":{"type":"string"},"members":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent":{"type":"string"},"computed":{"type":"boolean"}},"required":["id"],"additionalProperties":true}]}},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"enum":["number","string","boolean","date","member"]},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"default":{}},"required":["type"]}},"subsets":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"add_members"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"members":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent":{"type":"string"},"computed":{"type":"boolean"}},"required":["id"],"additionalProperties":true}]}}},"required":["op","list","members"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"set_subset"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"subset":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"members":{"type":"array","items":{"type":"string"}}},"required":["op","list","subset","members"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"add_property"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"calendar":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"property":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"spec":{"type":"object","properties":{"type":{"enum":["number","string","boolean","date","member"]},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"default":{}},"required":["type"]}},"required":["op","property","spec"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"set_property_values"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"calendar":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"property":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"values":{"type":"object","additionalProperties":{},"description":"member id (or, for calendars, a period id or range 2026-04..2026-12) → value"}},"required":["op","property","values"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"create_table"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"columns":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"enum":["number","string","boolean","date","ref","period"]},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"calendar":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"lookup":{"type":"object","properties":{"via":{"type":"string"},"property":{"type":"string"}},"required":["via","property"]}},"required":["type"]}},"time":{"type":"object","properties":{"calendar":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"from":{"type":"string"}},"required":["calendar","from"]}},"required":["op","id","columns"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"add_column"},"table":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"spec":{"type":"object","properties":{"type":{"enum":["number","string","boolean","date","ref","period"]},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"calendar":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"lookup":{"type":"object","properties":{"via":{"type":"string"},"property":{"type":"string"}},"required":["via","property"]}},"required":["type"]}},"required":["op","table","id","spec"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"import_rows"},"table":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"rows":{"type":"array","items":{"oneOf":[{"type":"object"},{"type":"array"}]}},"on_unknown_member":{"enum":["create","error","null"]}},"required":["op","table","rows"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"update_rows"},"table":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"updates":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer"},"values":{"type":"object"}},"required":["row","values"]}},"on_unknown_member":{"enum":["create","error","null"]}},"required":["op","table","updates"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"create_module"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"name":{"type":"string"},"dims":{"type":"array","items":{"type":"string"},"description":"list ids, `list.subset`, and at most one `time` or `time:<calendar>`"},"line_items":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"enum":["number","integer","boolean","string","date"]},"format":{"type":"string"},"description":{"type":"string"},"time_aggregation":{"enum":["sum","average","first","last","min","max","none","formula"],"description":"how roll-up periods aggregate base periods; formula re-evaluates the default rule there (ratios)"},"list_aggregation":{"enum":["sum","average","first","last","min","max","none","formula"]},"input":{"type":"boolean"},"allow_override":{"type":"boolean"},"formulas":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Static scope: dimension → member id, list of ids, or a time range such as \"> @last_actual\", \"in 2026-01..2026-06\""},"formula":{"type":"string"}},"required":["formula"]}}},"additionalProperties":false}}},"required":["op","id","dims"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"add_line_item"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"spec":{"type":"object","properties":{"type":{"enum":["number","integer","boolean","string","date"]},"format":{"type":"string"},"description":{"type":"string"},"time_aggregation":{"enum":["sum","average","first","last","min","max","none","formula"],"description":"how roll-up periods aggregate base periods; formula re-evaluates the default rule there (ratios)"},"list_aggregation":{"enum":["sum","average","first","last","min","max","none","formula"]},"input":{"type":"boolean"},"allow_override":{"type":"boolean"},"formulas":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Static scope: dimension → member id, list of ids, or a time range such as \"> @last_actual\", \"in 2026-01..2026-06\""},"formula":{"type":"string"}},"required":["formula"]}}},"additionalProperties":false}},"required":["op","module","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"update_line_item"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"spec":{"type":"object","properties":{"format":{"type":"string"},"description":{"type":"string"},"time_aggregation":{"enum":["sum","average","first","last","min","max","none","formula"],"description":"how roll-up periods aggregate base periods; formula re-evaluates the default rule there (ratios)"},"list_aggregation":{"enum":["sum","average","first","last","min","max","none","formula"]},"input":{"type":"boolean"},"allow_override":{"type":"boolean"}},"additionalProperties":false}},"required":["op","module","id","spec"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"remove_line_item"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","module","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"set_formula"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"item":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"formula":{"type":"string"},"scope":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Static scope: dimension → member id, list of ids, or a time range such as \"> @last_actual\", \"in 2026-01..2026-06\""},"rule":{"type":"integer"}},"required":["op","module","item","formula"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"remove_formula"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"item":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"rule":{"type":"integer"}},"required":["op","module","item","rule"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"set_values"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"item":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"cells":{"type":"array","items":{"type":"array","prefixItems":[{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":{"type":"string"}}]},{"type":["number","string","boolean","null"]}],"minItems":2,"maxItems":2},"description":"[[coordinates, value], ...]; coordinates are member ids in dimension order or a {dim: member} object"}},"required":["op","module","item","cells"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_calendar"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_list"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"remove_members"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"members":{"type":"array","items":{"type":"string"}}},"required":["op","list","members"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_table"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_rows"},"table":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"rows":{"type":"array","items":{"type":"integer"}}},"required":["op","table","rows"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_module"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"rename_module"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"new_id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id","new_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"rename_line_item"},"module":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"new_id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","module","id","new_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"rename_list"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"new_id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id","new_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"rename_member"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string"},"new_id":{"type":"string"}},"required":["op","list","id","new_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"rename_table"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"new_id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id","new_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"rename_column"},"table":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"new_id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","table","id","new_id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"set_name"},"kind":{"enum":["list","module","member"]},"id":{"type":"string"},"name":{"type":"string"},"list":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","kind","id","name"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"create_view"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"name":{"type":"string"},"source":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"rows":{"type":"array","items":{"type":"string"}},"columns":{"type":"array","items":{"type":"string"}},"pages":{"type":"object","additionalProperties":{"type":"string"}},"line_items":{"type":"array","items":{"type":"string"}},"line_item_axis":{"enum":["rows","columns"]},"header_props":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"filters":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"per dimension: selectors keeping only matching members, e.g. {time: [\"level = year\"]}; property predicates are ANDed, member ids unioned"},"column_widths":{"type":"object","additionalProperties":{"type":"number"}},"default":{"type":"boolean"}},"required":["op","id","source"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"update_view"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"name":{"type":"string"},"rows":{"type":"array","items":{"type":"string"}},"columns":{"type":"array","items":{"type":"string"}},"pages":{"type":"object","additionalProperties":{"type":"string"}},"line_items":{"type":"array","items":{"type":"string"}},"line_item_axis":{"enum":["rows","columns"]},"header_props":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"filters":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"per dimension: selectors keeping only matching members, e.g. {time: [\"level = year\"]}; property predicates are ANDed, member ids unioned"},"column_widths":{"type":"object","additionalProperties":{"type":"number"}},"default":{"type":"boolean"}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_view"},"id":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","id"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"set_constant"},"name":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"value":{"type":["number","string","boolean"]}},"required":["op","name","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"delete_constant"},"name":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"}},"required":["op","name"],"additionalProperties":false}]}},"label":{"type":"string"},"actor":{"type":"object"}},"required":["commands"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"seq":{"type":"integer"},"diagnostics":{"type":"array"}}}}}},"400":{"description":"Validation or compile error","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"suggestion":{"type":"string"}}}}}}}}}}}},"/db/{db}/query":{"post":{"summary":"Read a grid","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"module":{"type":"string"},"table":{"type":"string","description":"read a table's rows instead of a module"},"list":{"type":"string","description":"read a list's members and properties instead of a module"},"calendar":{"type":"string","description":"read a calendar's periods and properties"},"rows":{"type":"array","items":{"type":"string"},"description":"dimension names, outer → inner"},"columns":{"type":"array","items":{"type":"string"}},"pages":{"type":"object","additionalProperties":{"type":"string"},"description":"fixed member for every remaining dimension"},"line_items":{"type":"array","items":{"type":"string"}},"line_item_axis":{"enum":["rows","columns"]},"filters":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"per rows/columns dimension: keep members matching selectors such as \"level = year\", \"frame = fcst\", \"parent = west\", \"fiscal_year = 2027\", \"children_of(west)\", member ids or \"in 2026-Q1..2026-Q4\" (predicates AND, members OR)"},"window":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"integer"},"minItems":2,"maxItems":2},"cols":{"type":"array","items":{"type":"integer"},"minItems":2,"maxItems":2}}}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rowHeaders":{"type":"array"},"colHeaders":{"type":"array"},"cells":{"type":"array"},"errors":{"type":"array"},"totalRows":{"type":"integer"},"totalCols":{"type":"integer"}}}}}}}}},"/db/{db}/explain":{"post":{"summary":"Explain one cell","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"module":{"type":"string"},"item":{"type":"string"},"coords":{}},"required":["module","item","coords"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/describe":{"get":{"summary":"Compact model summary for agents","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/spec":{"get":{"summary":"Full model spec","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/errors":{"get":{"summary":"Cells in error","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array"}}}}}}},"/db/{db}/coverage":{"get":{"summary":"Which rule governs how many cells of a line item","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}},{"name":"module","in":"query","required":true,"schema":{"type":"string"}},{"name":"item","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/stats":{"get":{"summary":"Engine statistics","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/parse_formula":{"post":{"summary":"Parse a formula into its AST (no schema binding)","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"formula":{"type":"string"}},"required":["formula"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/validate_formula":{"post":{"summary":"Compile a formula against a module without applying it","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"module":{"type":"string"},"item":{"type":"string"},"formula":{"type":"string"},"scope":{}},"required":["module","item","formula"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/import":{"post":{"summary":"Import CSV (text/csv body) or JSON rows into a table","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"query","required":true,"schema":{"type":"string"}},{"name":"map","in":"query","schema":{"type":"string"},"description":"column=Header,column=Header"},{"name":"on_unknown_member","in":"query","schema":{"enum":["create","error","null"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/export":{"get":{"summary":"Export spec (json) or a grid (csv)","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"enum":["spec","data"]}},{"name":"module","in":"query","schema":{"type":"string"}},{"name":"rows","in":"query","schema":{"type":"string"}},{"name":"columns","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/db/{db}/recompute":{"post":{"summary":"Discard the computed cache and recalculate every cell (then save)","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/save":{"post":{"summary":"Force a save","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/db/{db}/subscribe":{"get":{"summary":"Server-Sent Events for a query window: snapshot, delta, layout, error","parameters":[{"name":"db","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"JSON-encoded query"}],"responses":{"200":{"description":"text/event-stream"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"security":[{"bearer":[]}]}