Add spaces API methods and tests.