@kgxsz you are correct in that when you are implementing apiread or apiwrite what you return only goes in the body of the response Now, part of untangled-system's shtick is to give you full control over the ring middleware stack, so you are correct, you'll need to do the session store in another component and install it's middleware in your bigger app middleware component
@kgxsz see https://github.com/untangled-web/untangled-server/blob/ffeb37a328e5cfb300b34c984e81a699755c5995/README.adoc#defining-your-own-middleware and #defining-your-system
In your case you would depend on and install the session store middleware from YourRingHandler