# Stream all template types from 2.x HTTP JSON API

**URL:** <https://forum.canton.network/t/stream-all-template-types-from-2-x-http-json-api/7589>\
**Category:** App Development\
**Tags:** json-api\
**Created:** [January 10, 2025, 8:48pm UTC](https://forum.canton.network/t/stream-all-template-types-from-2-x-http-json-api/7589 "2025-01-10T20:48:48Z")\
**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 10, 2025, 8:48pm UTC](https://forum.canton.network/t/stream-all-template-types-from-2-x-http-json-api/7589/1 "2025-01-10T20:48:48Z")

</div>

With the `v1/stream/query` endpoint, one can [stream active contracts for a given list of template ids](https://docs.daml.com/2.9.5/json-api/index.html#contracts-query-stream). For example:

```haskell
wscat --connect http://localhost:7575/v1/stream/query \
      --subprotocol 'daml.ws.auth' \
      --subprotocol 'jwt.token.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2RhbWwuY29tL2p3dC9hdWQvcGFydGljaXBhbnQvc2FuZGJveCIsInN1YiI6ImFsaWNlIiwiaXNzIjoiaWdub3JlZCJ9.uKjafJLbf4KCgBL6ys1pBT2jxs0DpflUpKX-5ZRtLVs' \
      --execute '{ "templateIds" : ["bc6d87a0d45cb8e2a9ea194ab9d380e79ab9622695c8fa9ab6c23d764d1e0df5:Main:Asset"] }' | jq

```

Is there a way to subscribe to _all_ contracts for any template (that are visible to the calling user/party)?

---

<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 10, 2025, 8:49pm UTC](https://forum.canton.network/t/stream-all-template-types-from-2-x-http-json-api/7589/2 "2025-01-10T20:49:10Z")

</div>

I conclude from the error messages returned from these filters…

```haskell
{ }
-- Object is missing required member 'templateIds'

```

```haskell
{ "templateIds" : [] }
-- search requires at least one item in 'templateIds'

```

```haskell
{ "templateIds" : ["*"] }
-- Expected JsString(<packageId>:<module>:<entity>)

```

```haskell
{ "templateIds" : ["*:*:*"] }
-- non expected character 0x2a in Daml-LF Package ID \"*\"

```

…that there is no way to subscribe to _all_ contract types.
