Introduce a bunch of new APIs

These are mostly useful for calling into the backend.