Understanding how the REST API works