Change REST API to take endpoint ID in URL