# Use Postman for async endpoints on the Ledger JSON API

**URL:** <https://forum.canton.network/t/use-postman-for-async-endpoints-on-the-ledger-json-api/7611>\
**Category:** App Development\
**Tags:** ledger-json-api\
**Created:** [January 30, 2025, 8:36pm UTC](https://forum.canton.network/t/use-postman-for-async-endpoints-on-the-ledger-json-api/7611 "2025-01-30T20:36:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [January 30, 2025, 8:36pm UTC](https://forum.canton.network/t/use-postman-for-async-endpoints-on-the-ledger-json-api/7611/1 "2025-01-30T20:36:11Z")

</div>

Some of the endpoints on the Ledger JSON API are WebSocket endpoints. For example:

- `/v2/state/active-contracts`
- `/v2/updates/flats`
- `/v2/updates/trees`
- `/v2/commands/completions`

I know [how to call such endpoints with `wscat`](https://discuss.daml.com/t/use-wscat-with-http-json-api-streaming-api/7588/2).

How do I call those endpoints with Postman?

---

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [January 30, 2025, 8:36pm UTC](https://forum.canton.network/t/use-postman-for-async-endpoints-on-the-ledger-json-api/7611/2 "2025-01-30T20:36:22Z")

</div>

Take as an example, this successful `wscat` call:

```haskell
wscat --connect ws://localhost:7575/v2/updates/trees \
   --subprotocol 'daml.ws.auth' \
   --subprotocol 'jwt.token.eyJhbG...' \
   --execute '{ "verbose": true, "beginExclusive": "0", "filter": { "filtersByParty" : { "Alice::12207...": { "cumulative": [] } } } }'

```

1. In Postman, create a WebSocket request.  

2. Set the URL, using `ws:` as the protocol:  

3. Add a `Sec-WebSocket-Protocol` header with a comma separated list of the “subprotocols.” No braces; no quotes.  

4. Press the “Connect” button.

5. On the Message tab, “Send” a message.

6. In the Response pane, see the response message.
