API call in Ember

Where does Ember lookup for the URL as below http://localhost:4200/api/bars?id=1

I am using data store this.store.query(‘bar’, {id: 1}),

I am getting a 404 error…so just wondering if I am missing something

The /api/bars is by convention - the /api prefix will have been specified in the application or model adapter: RESTAdapter - 4.6 - Ember API Documentation

If you want to customize the host (which will default to the “same host” as the Ember app) for your backend you’ll need to change the host property of the adapter - e.g. RESTAdapter - 4.6 - Ember API Documentation

// app/adapters/application.js
import DS from 'ember-data';

export default DS.RESTAdapter.extend({
  namespace: 'api/',
  host: 'https://api.example.com'
});