Query does not return data

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

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

Query:

[{"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:

type: 'message',
  data: '{"events":[],"offset":"0000000000000016"}
1 Like

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
4 Likes

Thank you! I am getting the data back now.

2 Likes

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

1 Like