Designing a RESTful-like API