Proper url generation and api