issue #1501: allow Closeable, top-level apis to be used as opposed to RestContext