# Problems with RESTAdapter using nested dynamic segments

**URL:** <https://discuss.emberjs.com/t/problems-with-restadapter-using-nested-dynamic-segments/6565>\
**Category:** Uncategorized\
**Created:** [October 24, 2014, 7:37pm UTC](https://discuss.emberjs.com/t/problems-with-restadapter-using-nested-dynamic-segments/6565 "2014-10-24T19:37:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgish](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kgish/32/13333_2.png) [@kgish](https://discuss.emberjs.com/u/kgish)\
**Post date:** [October 24, 2014, 7:37pm UTC](https://discuss.emberjs.com/t/problems-with-restadapter-using-nested-dynamic-segments/6565/1 "2014-10-24T19:37:01Z")

</div>

I’ve been struggling for a long time trying to get an application to work properly, and was hoping that someone out there in Ember Land could help me.

Basically it’s a simple application querying a remote service whose REST interface is defined as follows:

Receive a list of folders (_GET /folders_)

```
$ curl "http://192.168.50.11:5000/folders"

Returned JSON:
{
  "folders": [{
      "count": 0,
      "id": "000000004643FC50C0F14E8E855510C59A14928201000000030000009B049B9703BF46CC9FA0EE078DE6666200000000",
      "name": "Suggested Contacts"
  },
  ...
  {
      "count": 8,
      "id": "000000004643FC50C0F14E8E855510C59A14928201000000030000001C90561ACCFB43B29087BD2F2ABAD1BF00000000",
      "name": "Inbox"
  }]
}

```

Receive a list of items of the Inbox (_GET /folders/folder\_id_)

```
$ curl "http://192.168.50.11:5000/folders/000000004643FC50C0F14E8E855510C59A14928201000000030000001C90561ACCFB43B29087BD2F2ABAD1BF00000000"

Returned JSON:
{
  "items": [{
    "id": "000000004643FC50C0F14E8E855510C59A1492820100000005000000C93D7B2CD9C04E30B6FB3748DAE0C17000000000",
    "subject": "another mail"
  },
  ...
  {
      "id": "000000004643FC50C0F14E8E855510C59A1492820100000005000000E5F5694DEFCA4D10B56BB47F169BE96300000000",
      "subject": "high PRIO!"
  }]
}

```

List the properties of a mail message in the Inbox (_GET /folders/folder\_id/items/item\_id_)

```
$ curl "http://192.168.50.11:5000/folders/000000004643FC50C0F14E8E855510C59A14928201000000030000001C90561ACCFB43B29087BD2F2ABAD1BF00000000/items/000000004643FC50C0F14E8E855510C59A1492820100000005000000C93D7B2CD9C04E30B6FB3748DAE0C17000000000"

Returned JSON:
{
  "item": {
    "received": "2014-09-26 12:41:09",
    "flags": "orange",
    "importance": "normal",
    "text": "lal\r\n\r\n\r\n\r\n",
    "size": 3792,
    "id": "000000004643FC50C0F14E8E855510C59A1492820100000005000000C93D7B2CD9C04E30B6FB3748DAE0C17000000000",
    "sent": "2014-09-26 12:41:09",
    "subject": "another mail"
  }
}

```

The topmost `GET`s work just fine, only the last `GET /folders/folder_id/items/item_id` comes up with a blank `{{outlet}}`.

`GET /folders/` =\> OK

`GET /folders/folder_id` =\> OK

`GET /folders/folder_id/items` =\> **NOK**

My `index.html` and `app.js` files can be found here:

[http://jsbin.com/zevuca/1/](http://jsbin.com/zevuca/1/)

Thanks in advance for helping me, I’d appreciate it very very much if I could finally get this working!

---

<div class="post-metadata">

**Author:** ![kgish](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kgish/32/13333_2.png) [@kgish](https://discuss.emberjs.com/u/kgish)\
**Post date:** [October 27, 2014, 8:19pm UTC](https://discuss.emberjs.com/t/problems-with-restadapter-using-nested-dynamic-segments/6565/2 "2014-10-27T20:19:38Z")

</div>

Bumping this post in the hopes that someone out there will notice and can help me.

---

<div class="post-metadata">

**Author:** ![Ramcat](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@Ramcat](https://discuss.emberjs.com/u/Ramcat)\
**Post date:** [October 27, 2014, 9:04pm UTC](https://discuss.emberjs.com/t/problems-with-restadapter-using-nested-dynamic-segments/6565/3 "2014-10-27T21:04:44Z")

</div>

I get this error in the Console when trying to run your jsbin.

```
"error"

"ReferenceError: 'Ember' is undefined
  at Global code (http://null.jsbin.com/runner:82:14)"

```

I also tried to run it yesterday or Saturday and it failed then as well but I didn’t check the error.
