# Query does not return data

**URL:** <https://forum.canton.network/t/query-does-not-return-data/819>\
**Category:** App Development\
**Created:** [July 9, 2020, 8:01pm UTC](https://forum.canton.network/t/query-does-not-return-data/819 "2020-07-09T20:01:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgnesin](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mgnesin](https://forum.canton.network/u/mgnesin)\
**Post date:** [July 9, 2020, 8:01pm UTC](https://forum.canton.network/t/query-does-not-return-data/819/1 "2020-07-09T20:01:33Z")

</div>

Please help me adjust Streaming API query below to return data:  
API:

```haskell
wss://api.projectdabl.com:443/data/xdf1p1lu9vhs9qxg/v1/stream/fetch

```

Query:

```haskell
[{"templateId":"2ef7cea81f7368d1a11a027a44cd56e66973d56f5d17c363f7876a00f92848e3:Main:Application", "key": {"lender":"ledger-party-fdf6256b-bae9-47f2-820e-7698e4b88a55"}},
		{"templateId":"2ef7cea81f7368d1a11a027a44cd56e66973d56f5d17c363f7876a00f92848e3:Main:ApprovedApplication",key: {"lender":"ledger-party-fdf6256b-bae9-47f2-820e-7698e4b88a55"}},
		{"templateId":"2ef7cea81f7368d1a11a027a44cd56e66973d56f5d17c363f7876a00f92848e3:Main:Payment",key: {"lender":"ledger-party-fdf6256b-bae9-47f2-820e-7698e4b88a55"}},
		{"templateId":"2ef7cea81f7368d1a11a027a44cd56e66973d56f5d17c363f7876a00f92848e3:Main:PaymentRequest",key: {"lender":"ledger-party-fdf6256b-bae9-47f2-820e-7698e4b88a55"}}]

```

Currently response is:

```haskell
type: 'message',
  data: '{"events":[],"offset":"0000000000000016"}

```

---

<div class="post-metadata">

**Author:** ![Li\_Ma](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/li_ma/32/305_2.png) [@Li\_Ma](https://forum.canton.network/u/Li_Ma)\
**Post date:** [July 9, 2020, 8:50pm UTC](https://forum.canton.network/t/query-does-not-return-data/819/2 "2020-07-09T20:50:42Z")

</div>

Hi @mgnesin

I suggest troubleshooting by the following steps:

1. Making sure the PackageId: `2ef7cea81f7368d1a11a027a44cd56e66973d56f5d17c363f7876a00f92848e3 ` in the query body, align with your targeted dar. And dar is correctly deployed to the ledger.  
The template name may seem the same, but the underlying Model could be referencing a different dar package. One easy way to confirm is to deploy your latest dar and try to create and query on a fresh ledger
2. Making sure a `GET /v1/query` ACS call does show some data by the key criteria you provided above.
3. Making sure the token you passed in websocket subprotocol belongs to a `Party` that has permission to see the data you are query from, you can also confirm that by using the token to call `GET /v1/query`

---

<div class="post-metadata">

**Author:** ![mgnesin](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mgnesin](https://forum.canton.network/u/mgnesin)\
**Post date:** [July 13, 2020, 2:31pm UTC](https://forum.canton.network/t/query-does-not-return-data/819/3 "2020-07-13T14:31:15Z")

</div>

Thank you! I am getting the data back now.

---

<div class="post-metadata">

**Author:** ![andreolf](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/andreolf/32/491_2.png) [@andreolf](https://forum.canton.network/u/andreolf)\
**Post date:** [July 15, 2020, 7:16am UTC](https://forum.canton.network/t/query-does-not-return-data/819/4 "2020-07-15T07:16:35Z")

</div>

BTW Welcome to the forum @mgnesin @Li_Ma! Great to see this!
