Moved RestEndpoint to client for sharing