from arivu.integrations.rest_adapter import RESTIntegrationadapter = RESTIntegration( db=db, api_key="your-secret-key",)adapter.start(host="0.0.0.0", port=8000)
curl -X POST http://localhost:8000/query \ -H "Content-Type: application/json" \ -H "X-API-Key: your-secret-key" \ -d '{"question":"How many users signed up today?","user_id":"rest_user"}'
Session IDs default to the provided user_id field, so API clients can keep their own session identity.
pending_approval responses are returned in JSON so a caller can show a manual approval flow.
/refresh refreshes the schema cache.
/session/{session_id} returns stored session history.
CORS is enabled by default to support browser clients, but you should restrict origins in production.
Use an API key in production. The REST adapter is intentionally simple so you can plug it into any client, but that also means auth is your responsibility.
Error text when the pipeline fails, otherwise null.
Example request
curl -X POST http://localhost:8000/query \ -H "Content-Type: application/json" \ -H "X-API-Key: your-secret-key" \ -d '{"question":"How many users signed up today?","user_id":"rest_user"}'