# Should I use Ember Data for custom AJAX calls like "get the latest"?

**URL:** <https://discuss.emberjs.com/t/should-i-use-ember-data-for-custom-ajax-calls-like-get-the-latest/8899>\
**Category:** Ember Data\
**Created:** [October 2, 2015, 6:39pm UTC](https://discuss.emberjs.com/t/should-i-use-ember-data-for-custom-ajax-calls-like-get-the-latest/8899 "2015-10-02T18:39:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![skaterdav85](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/skaterdav85/32/18291_2.png) [@skaterdav85](https://discuss.emberjs.com/u/skaterdav85)\
**Post date:** [October 2, 2015, 6:39pm UTC](https://discuss.emberjs.com/t/should-i-use-ember-data-for-custom-ajax-calls-like-get-the-latest/8899/1 "2015-10-02T18:39:15Z")

</div>

I use Ember Data for all the standard operations like findRecord, findAll, etc, but what about for custom endpoints outside of the standard stuff, like: /posts/latest. For this small example, it probably would make more sense to use `findAll()` and sort on the client. In my other scenario however, it isn’t so simple so the work is being done on the server. What is the best way to handle this?

Thanks!

---

<div class="post-metadata">

**Author:** ![varblob](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/varblob/32/10304_2.png) [@varblob](https://discuss.emberjs.com/u/varblob)\
**Post date:** [October 2, 2015, 8:16pm UTC](https://discuss.emberjs.com/t/should-i-use-ember-data-for-custom-ajax-calls-like-get-the-latest/8899/2 "2015-10-02T20:16:23Z")

</div>

How about using query, something like `/api/model?filter=latest`.

---

<div class="post-metadata">

**Author:** ![skaterdav85](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/skaterdav85/32/18291_2.png) [@skaterdav85](https://discuss.emberjs.com/u/skaterdav85)\
**Post date:** [October 2, 2015, 9:10pm UTC](https://discuss.emberjs.com/t/should-i-use-ember-data-for-custom-ajax-calls-like-get-the-latest/8899/3 "2015-10-02T21:10:48Z")

</div>

ya that is probably the best choice. And in the query method of the adapter, I can do some trickery to change the endpoint to /latest. thanks!

---

<div class="post-metadata">

**Author:** ![lightblade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/lightblade/32/15632_2.png) [@lightblade](https://discuss.emberjs.com/u/lightblade)\
**Post date:** [October 3, 2015, 6:20am UTC](https://discuss.emberjs.com/t/should-i-use-ember-data-for-custom-ajax-calls-like-get-the-latest/8899/4 "2015-10-03T06:20:48Z")

</div>

Check out [ember-api-actions](https://github.com/mike-north/ember-api-actions) to see if it meets your need
