Server-side code for ApiResource