# Daml Training Platform: Episode 5 Command Query

**URL:** <https://forum.canton.network/t/daml-training-platform-episode-5-command-query/2696>\
**Category:** App Development\
**Tags:** daml, training, platform\
**Created:** [June 11, 2021, 1:55am UTC](https://forum.canton.network/t/daml-training-platform-episode-5-command-query/2696 "2021-06-11T01:55:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quidagis](https://avatars.discourse-cdn.com/v4/letter/q/dbc845/32.png) [@quidagis](https://forum.canton.network/u/quidagis)\
**Post date:** [June 11, 2021, 1:55am UTC](https://forum.canton.network/t/daml-training-platform-episode-5-command-query/2696/1 "2021-06-11T01:55:57Z")

</div>

@Levente_Barczy I am working through Episode 5 - The Ledger and JSON API.

I have never used any gRPC or JWT before so this is interesting but outside my knowledge. With the Sandbox running, the aim is to perform a command line query using gRPC of the current application based on the ongoing NFT example.

Went to the [JWT.io](http://JWT.io) site, entered the relevant parameters, and generated the non-signed JWT. On the video at 18:28, you now have the command:

`curl -H "Authorization: Bearer" http://127.0.0.1:7575/v1/query` and are supposed to add the current JWT (J\_W\_T) into the string. However on the video, due to the way that MACOS and Linux dump characters into the Terminal, the previous string is over-written.

I have tried:

`curl -H "Authorization: Bearer" J_W_T http://127.0.0.1:7575/v1/query` ← fail  
`curl -H "Authorization: Bearer" http://127.0.0.1:7575/v1/query/J_W_T` ← fail  
`curl -H "Authorization: Bearer" http://127.0.0.1:7575/v1/query J_W_T` ← fail

What is the correct string format to action this query?

---

<div class="post-metadata">

**Author:** ![Gary\_Verhaegen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gary_verhaegen/32/81_2.png) [@Gary\_Verhaegen](https://forum.canton.network/u/Gary_Verhaegen)\
**Post date:** [June 11, 2021, 8:16am UTC](https://forum.canton.network/t/daml-training-platform-episode-5-command-query/2696/2 "2021-06-11T08:16:34Z")

</div>

If you put your solution as a response rather than an edit you could mark it as the answer 🙂

---

<div class="post-metadata">

**Author:** ![quidagis](https://avatars.discourse-cdn.com/v4/letter/q/dbc845/32.png) [@quidagis](https://forum.canton.network/u/quidagis)\
**Post date:** [June 11, 2021, 10:02pm UTC](https://forum.canton.network/t/daml-training-platform-episode-5-command-query/2696/3 "2021-06-11T22:02:49Z")

</div>

UPDATE #1: I worked it out, about 10 seconds after 👆🏻

`curl -H "Authorization: Bearer J_W_T" http://127.0.0.1:7575/v1/query` ← `{"result":[{"agree ...`

Update #2: The video is not clear with this, especially for gRPC/JWT novices … until you get to 19:17 on the video when @Levente_Barczy shows the full command 😨

---

<div class="post-metadata">

**Author:** ![quidagis](https://avatars.discourse-cdn.com/v4/letter/q/dbc845/32.png) [@quidagis](https://forum.canton.network/u/quidagis)\
**Post date:** [June 11, 2021, 10:03pm UTC](https://forum.canton.network/t/daml-training-platform-episode-5-command-query/2696/4 "2021-06-11T22:03:51Z")

</div>

As always, thanks.
