REST API - Setting a timeout limit