# API call from local JSON file

**URL:** <https://discuss.emberjs.com/t/api-call-from-local-json-file/11954>\
**Category:** Ember Data\
**Created:** [November 17, 2016, 9:33pm UTC](https://discuss.emberjs.com/t/api-call-from-local-json-file/11954 "2016-11-17T21:33:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riz](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Riz](https://discuss.emberjs.com/u/Riz)\
**Post date:** [November 17, 2016, 9:33pm UTC](https://discuss.emberjs.com/t/api-call-from-local-json-file/11954/1 "2016-11-17T21:33:06Z")

</div>

Hi all… I am very new to ember, this seems like it would be a very easy and obvious solution but I am having a hard time finding it. I would appreciate any help.

Basically I need to setup an API call with ember data, and instead of it pulling from a url, I would like for it to pull from a json file locally (static data).

My thoughts are if I set the namespace in the adapter it should work but it didn’t.

---

<div class="post-metadata">

**Author:** ![acorncom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/acorncom/32/12198_2.png) [@acorncom](https://discuss.emberjs.com/u/acorncom)\
**Post date:** [November 18, 2016, 5:18am UTC](https://discuss.emberjs.com/t/api-call-from-local-json-file/11954/2 "2016-11-18T05:18:29Z")

</div>

If you want to use Ember Data to retrieve json and have it end up in the store, then you’ll want to setup a custom adapter to point to the right URL (more info here: [Customizing Adapters - Models - Ember Guides](https://guides.emberjs.com/v2.9.0/models/customizing-adapters/) ). You may just want to setup findAll: [Adapter - 4.6 - Ember API Documentation](http://emberjs.com/api/data/classes/DS.Adapter.html#method_findAll)

If you don’t want this data in the Ember Data store then I’d suggest doing a simple Ajax call 😃

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [November 18, 2016, 8:24am UTC](https://discuss.emberjs.com/t/api-call-from-local-json-file/11954/3 "2016-11-18T08:24:57Z")

</div>

You can’t access a local file from your browser unless you use something like [ember-electron](https://github.com/felixrieseberg/ember-electron). But you can still use the old [fixture-adapter](https://github.com/emberjs/ember-data-fixture-adapter) or put your local static data somewhere your browser can access it via an URL.
