make apiEndpoint a constant