---
title: "Connections queries all the IBC connections of a chain."
method: GET
path: "/ibc/core/connection/v1/connections"
tags: ["Query"]
---

# Connections queries all the IBC connections of a chain.

`GET /ibc/core/connection/v1/connections`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/cosmos/apis/ibc-go-grpc-gateway-docs/docs/ibc/core/connection/v1/connections/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `pagination.key` string, byte
- `pagination.offset` string, uint64
- `pagination.limit` string, uint64
- `pagination.count_total` boolean
- `pagination.reverse` boolean

## Response `200`

A successful response.

- object: QueryConnectionsResponse is the response type for the Query/Connections RPC method.
  - `connections` object[]: list of stored connections of the chain.
    - `id` string: connection identifier.
    - `client_id` string: client associated with this connection.
    - `versions` object[]
      - `identifier` string
      - `features` string[]
    - `state` 'STATE_UNINITIALIZED_UNSPECIFIED' | 'STATE_INIT' | 'STATE_TRYOPEN' | 'STATE_OPEN': current state of the connection end.
    - `counterparty` object: counterparty chain associated with this connection.
      - `client_id` string: identifies the client on the counterparty chain associated with a given connection.
      - `connection_id` string: identifies the connection end on the counterparty chain associated with a given connection.
      - `prefix` object: commitment merkle prefix of the counterparty chain.
        - `key_prefix` string, byte
    - `delay_period` string, uint64: delay period associated with this connection.
  - `pagination` object: PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
    - `next_key` string, byte: next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results.
    - `total` string, uint64
  - `height` object: Normally the RevisionHeight is incremented at each height while keeping RevisionNumber the same. However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes In these cases, the RevisionNumber is incremented so that height continues to be monitonically increasing even as the RevisionHeight gets reset Please note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag. This enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.
    - `revision_number` string, uint64
    - `revision_height` string, uint64

## Other responses

- `default`: An unexpected error response.

## Changes

- **2022-08-01** `8d0e0b0b2bda`: 1 info
  - added the new optional `query` request parameter `pagination.reverse`
- **2021-07-19** `cb56bc693679`: 1 warning
  - deleted the `query` request parameter `pagination.reverse`

[Operation history](https://skmtc.dev/cosmos/apis/ibc-go-grpc-gateway-docs/changes/ibc/core/connection/v1/connections/get.md)

---

[API](https://skmtc.dev/cosmos/apis/ibc-go-grpc-gateway-docs.md) - [All operations](https://skmtc.dev/cosmos/apis/ibc-go-grpc-gateway-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/cosmos/apis/ibc-go-grpc-gateway-docs/revisions/50daa3dd79ce?raw)
