> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# Publish hosted parties

> Returns a stream of the snapshot of the hosted parties at a ledger offset, which are  satisfying the request's query parameters. Once the stream of GetHostedParties completes, the client SHOULD begin streaming topology updates from the update service, starting at the ``GetHostedPartiesResponse``.``hosted_at_offset``. Clients SHOULD NOT assume that the set of hosted parties they receive reflects the state at the ledger end.
Required permissions: ``ledger:read``

[JSON API AsyncAPI](https://docs.canton.network/reference/json-api-asyncapi-reference/index.md)

›

[/v2/state/hosted-parties](https://docs.canton.network/reference/json-api-asyncapi-reference/channels/v2-state-hosted-parties.md)

›

publish

/v2/state/hosted-parties

# Publish hosted parties

WebSocket

[Added 3.8](#history-added-3-8)

PUBLISH

`/v2/state/hosted-parties`

Returns a stream of the snapshot of the hosted parties at a ledger offset, which are  satisfying the
request's query parameters.
Once the stream of GetHostedParties completes,
the client SHOULD begin streaming topology updates from the update service,
starting at the `GetHostedPartiesResponse`.`hosted_at_offset`.
Clients SHOULD NOT assume that the set of hosted parties they receive reflects the state at the ledger end.

Required permissions: `ledger:read`

## Protocol Details

Protocol
WebSocket

Channel
/v2/state/hosted-parties

Action
publish

Operation ID
sendV2StateHosted-parties

Content type
application/json

Payload
object

## Inputs

### GetHostedPartiesRequest

Direction
Client -> Server

Message
GetHostedPartiesRequest

`hostedAtOffset`
string

`filter`
object

`streamContinuationToken`
string

## Outputs

## Related Schemas

> [accordion] GetHostedPartiesRequest
>
> `hostedAtOffset`
> string
>
> `filter`
> object
>
> `streamContinuationToken`
> string

## History

Added
`3.8`

wscat

```bash wscat theme={"theme":{"light":"github-light","dark":"github-dark"}}
npx wscat \
  -c <WEBSOCKET_URL> \
  -x '{"hostedAtOffset": "<integer>", "filter": {"partyFilter": ["<string>"], "allParticipants": "<boolean>", "synchronizerIdFilter": ["<string>"]}, "streamContinuationToken": "<string>"}' \
  -w -1
```

message

application/json

```json message theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "hostedAtOffset": "<integer>",
  "filter": {
    "partyFilter": [
      "<string>"
    ],
    "allParticipants": "<boolean>",
    "synchronizerIdFilter": [
      "<string>"
    ]
  },
  "streamContinuationToken": "<string>"
}
```
