> ## 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.

# GetHostedParties

Ledger API

›

[gRPC API](https://docs.canton.network/reference/grpc-ledger-api-reference/overview.md)

›

[v2](https://docs.canton.network/reference/grpc-ledger-api-reference/com-daml-ledger-api-v2.md)

›

GetHostedParties

com.daml.ledger.api.v2

# GetHostedParties

gRPC

[Added 3.8.0](#history-added-3-8-0)

RPC

`/com.daml.ledger.api.v2.StateService/GetHostedParties`

## Protocol Details

Protocol
gRPC

Service
StateService

RPC
GetHostedParties

Client stream
No

Server stream
Yes

## Inputs

### GetHostedPartiesRequest

Message
com.daml.ledger.api.v2.GetHostedPartiesRequest

Client stream
No

`hosted_at_offset`
int64

`filter`
HostedPartiesFilter

`stream_continuation_token`
bytes

## Outputs

### GetHostedPartiesResponse

Message
com.daml.ledger.api.v2.GetHostedPartiesResponse

Server stream
Yes

`hosted_party`
HostedParty

`hosted_at_offset`
int64

`stream_continuation_token`
bytes

## Related Schemas

> [accordion] com.daml.ledger.api.v2.GetHostedPartiesRequest
>
> `hosted_at_offset`
> int64
>
> `filter`
> HostedPartiesFilter
>
> `stream_continuation_token`
> bytes

> [accordion] com.daml.ledger.api.v2.HostedPartiesFilter
>
> `party_filter`
> repeated string
>
> `all_participants`
> bool
>
> `synchronizer_id_filter`
> repeated string

> [accordion] com.daml.ledger.api.v2.GetHostedPartiesResponse
>
> `hosted_party`
> HostedParty
>
> `hosted_at_offset`
> int64
>
> `stream_continuation_token`
> bytes

> [accordion] com.daml.ledger.api.v2.HostedParty
>
> `party`
> string
>
> `hosting_participants`
> repeated HostingParticipant

> [accordion] com.daml.ledger.api.v2.HostingParticipant
>
> `participant_id`
> string
>
> `synchronizer_id`
> string
>
> `record_time`
> Timestamp
>
> `offset`
> int64
>
> `participant_permission`
> ParticipantPermission
>
> `hosting_state`
> HostingState

> [accordion] com.daml.ledger.api.v2.ParticipantPermission
>
> <ul>
>   <li>`PARTICIPANT_PERMISSION_UNSPECIFIED`</li>
>
>   <li>`PARTICIPANT_PERMISSION_SUBMISSION`</li>
>
>   <li>`PARTICIPANT_PERMISSION_CONFIRMATION`</li>
>
>   <li>`PARTICIPANT_PERMISSION_OBSERVATION`</li>
> </ul>

> [accordion] com.daml.ledger.api.v2.HostingState
>
> <ul>
>   <li>`HOSTING_STATE_UNSPECIFIED`</li>
>
>   <li>`HOSTING_STATE_ONBOARDING`</li>
>
>   <li>`HOSTING_STATE_ACTIVE`</li>
> </ul>

## History

Added
`3.8.0`

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
# This RPC uses streaming semantics. Send additional JSON messages on stdin as needed.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.StateService/GetHostedParties <<'EOF'
{
  "hostedAtOffset": "0",
  "filter": {
    "partyFilter": [
      "string"
    ],
    "allParticipants": true,
    "synchronizerIdFilter": [
      "string"
    ]
  },
  "streamContinuationToken": "BASE64_ENCODED_BYTES"
}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "hostedParty": {
    "party": "string",
    "hostingParticipants": [
      {
        "participantId": "string",
        "synchronizerId": "string",
        "recordTime": "string",
        "offset": "0",
        "participantPermission": "PARTICIPANT_PERMISSION_UNSPECIFIED",
        "hostingState": "HOSTING_STATE_UNSPECIFIED"
      }
    ]
  },
  "hostedAtOffset": "0",
  "streamContinuationToken": "BASE64_ENCODED_BYTES"
}
```
