> For the complete documentation index, see [llms.txt](https://docs.sudoplatform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sudoplatform.com/guides/decentralized-identity/cloud-agent/cloud-agent-admin-api/connections.md).

# Connections

A `Connection` represents an established, active communications pathway with a foreign agent whom the cloud agent has connected to via successful completion of a [connection exchange](/guides/decentralized-identity/cloud-agent/cloud-agent-admin-api/aries-interop-profile-aip/connection-exchanges.md).

## View connections

View established connections, with pagination and filtering options. Returns a `nextToken` which can be passed into the same query in order to fetch subsequent pages.

```graphql
query MyQuery {
  connections(
    page: {
      nextToken: null
    }
    filter: {}
  ) {
    items {
      id
      alias
    }
    nextToken
  }
}
```

Alternatively, view a single connection, referenced by its unique ID.

```graphql
query MyQuery {
  connection(
    connectionId: "001fe530-3562-41d6-a631-3df9c7ae1f38"
  ) {
    id
    alias
  }
}
```

## Delete a connection

Delete an established connection. Any basic messages associated with the connection are also deleted.

```graphql
mutation MyMutation {
  deleteConnection(
    connectionId: "001fe530-3562-41d6-a631-3df9c7ae1f38"
  )
}
```
