HTTP API ======== The HTTP layer is intentionally thin. Channel wrappers should call it, but the business rules stay inside Alba Core. .. autoclass:: app.api.routes.SearchRequest :members: .. autofunction:: app.api.routes.search Example: request body --------------------- .. code-block:: json { "message": "Find me a house in Auckland with 4 bedrooms under 5000", "current_requirements": null } Example: curl ------------- .. code-block:: bash curl -X POST "http://127.0.0.1:65385/alba-core/search" \ -H "Content-Type: application/json" \ -d "{\"message\":\"Find me a house in Auckland with 4 bedrooms under 5000\"}" Example: Python client ---------------------- .. code-block:: python import httpx response = httpx.post( "http://127.0.0.1:65385/alba-core/search", json={"message": "Queenstown, 3 bedrooms, budget up to 5000"}, timeout=10, ) response.raise_for_status() print(response.json()["match_count"])