# API call in Ember

**URL:** <https://discuss.emberjs.com/t/api-call-in-ember/8885>\
**Category:** Uncategorized\
**Created:** [October 1, 2015, 11:38am UTC](https://discuss.emberjs.com/t/api-call-in-ember/8885 "2015-10-01T11:38:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![harimath](https://avatars.discourse-cdn.com/v4/letter/h/76d3ee/32.png) [@harimath](https://discuss.emberjs.com/u/harimath)\
**Post date:** [October 1, 2015, 11:38am UTC](https://discuss.emberjs.com/t/api-call-in-ember/8885/1 "2015-10-01T11:38:19Z")

</div>

Where does Ember lookup for the URL as below [http://localhost:4200/api/bars?id=1](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

---

<div class="post-metadata">

**Author:** ![elithrar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/elithrar/32/11352_2.png) [@elithrar](https://discuss.emberjs.com/u/elithrar)\
**Post date:** [October 1, 2015, 1:00pm UTC](https://discuss.emberjs.com/t/api-call-in-ember/8885/2 "2015-10-01T13:00:04Z")

</div>

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](http://emberjs.com/api/data/classes/DS.RESTAdapter.html#toc_endpoint-path-customization)

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](http://emberjs.com/api/data/classes/DS.RESTAdapter.html#toc_host-customization)

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

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

```
