---
title: List All Tunnels
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Zero Trust](https://developers.cloudflare.com/api/go/resources/zero_trust)

[Tunnels](https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List All Tunnels

client.ZeroTrust.Tunnels.List(ctx, params) (\*V4PagePaginationArray\[[TunnelListResponse](<https://developers.cloudflare.com/api/go/resources/zero_trust#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/tunnels

Lists and filters all types of Tunnels in an account.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Cloudflare One Connectors Write``Cloudflare One Connectors Read``Cloudflare One Connector: cloudflared Write``Cloudflare One Connector: cloudflared Read``Cloudflare Tunnel Write``Cloudflare Tunnel Read`

##### ParametersExpand Collapse

<details>

<summary>

params TunnelListParams

</summary>

AccountID param.Field\[string]

Path param: Cloudflare account ID

maxLength32

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

ExcludePrefix param.Field\[string]Optional

Query param

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20exclude_prefix">Link to this property</a>

ExistedAt param.Field\[string]Optional

Query param: If provided, include only resources that were created (and not deleted) before this time. URL encoded.

formaturl-encoded-date-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20existed_at">Link to this property</a>

IncludePrefix param.Field\[string]Optional

Query param

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20include_prefix">Link to this property</a>

IsDeleted param.Field\[bool]Optional

Query param: If <code>true</code>, only include deleted tunnels. If <code>false</code>, exclude deleted tunnels. If empty, all tunnels will be included.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20is_deleted">Link to this property</a>

Name param.Field\[string]Optional

Query param: A user-friendly name for the tunnel.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20name">Link to this property</a>

Page param.Field\[float64]Optional

Query param: Page number of paginated results.

minimum1

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20page">Link to this property</a>

PerPage param.Field\[float64]Optional

Query param: Number of results to display.

maximum1000

minimum1

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20per_page">Link to this property</a>

<details>

<summary>

Status param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)">TunnelListParamsStatus</a>]Optional

Query param: The status of the tunnel. Valid values are <code>inactive</code> (tunnel has never been run), <code>degraded</code> (tunnel is active and able to serve traffic but in an unhealthy state), <code>healthy</code> (tunnel is active and able to serve traffic), or <code>down</code> (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

</summary>

const TunnelListParamsStatusInactive <a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)">TunnelListParamsStatus</a> = "inactive"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

const TunnelListParamsStatusDegraded <a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)">TunnelListParamsStatus</a> = "degraded"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

const TunnelListParamsStatusHealthy <a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)">TunnelListParamsStatus</a> = "healthy"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

const TunnelListParamsStatusDown <a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)">TunnelListParamsStatus</a> = "down"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20status">Link to this property</a>

<details>

<summary>

TunTypes param.Field\[\[]TunnelListParamsTunType]Optional

Query param: The types of tunnels to filter by, separated by commas.

</summary>

const TunnelListParamsTunTypeCfdTunnel TunnelListParamsTunType = "cfd\_tunnel"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const TunnelListParamsTunTypeWARPConnector TunnelListParamsTunType = "warp\_connector"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const TunnelListParamsTunTypeWARP TunnelListParamsTunType = "warp"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const TunnelListParamsTunTypeMagic TunnelListParamsTunType = "magic"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

const TunnelListParamsTunTypeIPSec TunnelListParamsTunType = "ip\_sec"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

const TunnelListParamsTunTypeGRE TunnelListParamsTunType = "gre"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

const TunnelListParamsTunTypeCNI TunnelListParamsTunType = "cni"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tun_types">Link to this property</a>

UUID param.Field\[string]Optional

Query param: UUID of the tunnel.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20uuid">Link to this property</a>

WasActiveAt param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20was_active_at%20%3E%20(schema)">Time</a>]Optional

Query param

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20was_active_at">Link to this property</a>

WasInactiveAt param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/zero_trust/subresources/tunnels/methods/list#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20was_inactive_at%20%3E%20(schema)">Time</a>]Optional

Query param

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20was_inactive_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.tunnels%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type TunnelListResponse interface{…}

A Cloudflare Tunnel that connects your origin to Cloudflare’s edge.

</summary>

One of the following:

<details>

<summary>

type CloudflareTunnel struct{…}

A Cloudflare Tunnel that connects your origin to Cloudflare’s edge.

</summary>

ID stringOptional

UUID of the tunnel.

formatuuid

maxLength36

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

AccountTag stringOptional

Cloudflare account ID

maxLength32

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20account_tag">Link to this property</a>

<details>

<summary>

ConfigSrc CloudflareTunnelConfigSrcOptional

Indicates if this is a locally or remotely configured tunnel. If <code>local</code>, manage the tunnel using a YAML file on the origin machine. If <code>cloudflare</code>, manage the tunnel on the Zero Trust dashboard.

</summary>

One of the following:

const CloudflareTunnelConfigSrcLocal CloudflareTunnelConfigSrc = "local"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20config_src%20%3E%20(member)%200">Link to this property</a>

const CloudflareTunnelConfigSrcCloudflare CloudflareTunnelConfigSrc = "cloudflare"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20config_src%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20config_src">Link to this property</a>

<details>

<summary>

DeprecatedConnections \[]CloudflareTunnelConnectionOptional

This field will start returning an empty array. To fetch the connections of a given tunnel, please use the dedicated endpoint <code>/accounts/{account_id}/{tunnel_type}/{tunnel_id}/connections</code>

The Cloudflare Tunnel connections between your origin and Cloudflare’s edge.

</summary>

ID stringOptional

UUID of the Cloudflare Tunnel connection.

formatuuid

maxLength36

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

ClientID stringOptional

UUID of the Cloudflare Tunnel connector.

formatuuid

maxLength36

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20client_id">Link to this property</a>

ClientVersion stringOptional

The cloudflared version used to establish this connection.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20client_version">Link to this property</a>

ColoName stringOptional

The Cloudflare data center used for this connection.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20colo_name">Link to this property</a>

DeprecatedIsPendingReconnect boolOptional

This functionality has been removed. The is\_pending\_reconnect field will now always report false.

Cloudflare continues to track connections for several minutes after they disconnect. This is an optimization to improve latency and reliability of reconnecting. If <code>true</code>, the connection has disconnected but is still being tracked. If <code>false</code>, the connection is actively serving traffic.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20is_pending_reconnect">Link to this property</a>

OpenedAt TimeOptional

Timestamp of when the connection was established.

formatdate-time

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20opened_at">Link to this property</a>

OriginIP stringOptional

The public IP address of the host running cloudflared.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20origin_ip">Link to this property</a>

UUID stringOptional

UUID of the Cloudflare Tunnel connection.

formatuuid

maxLength36

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20uuid">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20connections">Link to this property</a>

ConnsActiveAt TimeOptional

Timestamp of when the tunnel established at least one connection to Cloudflare’s edge. If <code>null</code>, the tunnel is inactive.

formatdate-time

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20conns_active_at">Link to this property</a>

ConnsInactiveAt TimeOptional

Timestamp of when the tunnel became inactive (no connections to Cloudflare’s edge). If <code>null</code>, the tunnel is active.

formatdate-time

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20conns_inactive_at">Link to this property</a>

CreatedAt TimeOptional

Timestamp of when the resource was created.

formatdate-time

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

DeletedAt TimeOptional

Timestamp of when the resource was deleted. If <code>null</code>, the resource has not been deleted.

formatdate-time

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20deleted_at">Link to this property</a>

Metadata unknownOptional

Metadata associated with the tunnel.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20metadata">Link to this property</a>

Name stringOptional

A user-friendly name for a tunnel.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

DeprecatedRemoteConfig boolOptional

Use the config\_src field instead.

If <code>true</code>, the tunnel can be configured remotely from the Zero Trust dashboard. If <code>false</code>, the tunnel must be configured locally on the origin machine.

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20remote_config">Link to this property</a>

<details>

<summary>

Status CloudflareTunnelStatusOptional

The status of the tunnel. Valid values are <code>inactive</code> (tunnel has never been run), <code>degraded</code> (tunnel is active and able to serve traffic but in an unhealthy state), <code>healthy</code> (tunnel is active and able to serve traffic), or <code>down</code> (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

</summary>

One of the following:

const CloudflareTunnelStatusInactive CloudflareTunnelStatus = "inactive"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const CloudflareTunnelStatusDegraded CloudflareTunnelStatus = "degraded"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

const CloudflareTunnelStatusHealthy CloudflareTunnelStatus = "healthy"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

const CloudflareTunnelStatusDown CloudflareTunnelStatus = "down"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

<details>

<summary>

TunType CloudflareTunnelTunTypeOptional

The type of tunnel.

</summary>

One of the following:

const CloudflareTunnelTunTypeCfdTunnel CloudflareTunnelTunType = "cfd\_tunnel"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%200">Link to this property</a>

const CloudflareTunnelTunTypeWARPConnector CloudflareTunnelTunType = "warp\_connector"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%201">Link to this property</a>

const CloudflareTunnelTunTypeWARP CloudflareTunnelTunType = "warp"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%202">Link to this property</a>

const CloudflareTunnelTunTypeMagic CloudflareTunnelTunType = "magic"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%203">Link to this property</a>

const CloudflareTunnelTunTypeIPSec CloudflareTunnelTunType = "ip\_sec"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%204">Link to this property</a>

const CloudflareTunnelTunTypeGRE CloudflareTunnelTunType = "gre"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%205">Link to this property</a>

const CloudflareTunnelTunTypeCNI CloudflareTunnelTunType = "cni"

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)%20%3E%20(property)%20tun_type">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20cloudflare_tunnel%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

type TunnelListResponseTunnelWARPConnectorTunnel struct{…}

A Mesh node that connects your origin to Cloudflare’s edge.

</summary>

ID stringOptional

UUID of the tunnel.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20id">Link to this property</a>

AccountTag stringOptional

Cloudflare account ID

maxLength32

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20account_tag">Link to this property</a>

<details>

<summary>

DeprecatedConnections \[]TunnelListResponseTunnelWARPConnectorTunnelConnectionOptional

This field will start returning an empty array. To fetch the connections of a given tunnel, please use the dedicated endpoint <code>/accounts/{account_id}/{tunnel_type}/{tunnel_id}/connections</code>

The Cloudflare Tunnel connections between your origin and Cloudflare’s edge.

</summary>

ID stringOptional

UUID of the Cloudflare Tunnel connection.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

ClientID stringOptional

UUID of the Cloudflare Tunnel connector.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20client_id">Link to this property</a>

ClientVersion stringOptional

The cloudflared version used to establish this connection.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20client_version">Link to this property</a>

ColoName stringOptional

The Cloudflare data center used for this connection.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20colo_name">Link to this property</a>

DeprecatedIsPendingReconnect boolOptional

This functionality has been removed. The is\_pending\_reconnect field will now always report false.

Cloudflare continues to track connections for several minutes after they disconnect. This is an optimization to improve latency and reliability of reconnecting. If <code>true</code>, the connection has disconnected but is still being tracked. If <code>false</code>, the connection is actively serving traffic.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20is_pending_reconnect">Link to this property</a>

OpenedAt TimeOptional

Timestamp of when the connection was established.

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20opened_at">Link to this property</a>

OriginIP stringOptional

The public IP address of the host running cloudflared.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20origin_ip">Link to this property</a>

UUID stringOptional

UUID of the Cloudflare Tunnel connection.

formatuuid

maxLength36

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections%20%3E%20(items)%20%3E%20(property)%20uuid">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20connections">Link to this property</a>

ConnsActiveAt TimeOptional

Timestamp of when the tunnel established at least one connection to Cloudflare’s edge. If <code>null</code>, the tunnel is inactive.

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20conns_active_at">Link to this property</a>

ConnsInactiveAt TimeOptional

Timestamp of when the tunnel became inactive (no connections to Cloudflare’s edge). If <code>null</code>, the tunnel is active.

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20conns_inactive_at">Link to this property</a>

CreatedAt TimeOptional

Timestamp of when the resource was created.

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20created_at">Link to this property</a>

DeletedAt TimeOptional

Timestamp of when the resource was deleted. If <code>null</code>, the resource has not been deleted.

formatdate-time

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20deleted_at">Link to this property</a>

Metadata unknownOptional

Metadata associated with the tunnel.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20metadata">Link to this property</a>

Name stringOptional

A user-friendly name for a tunnel.

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Status TunnelListResponseTunnelWARPConnectorTunnelStatusOptional

The status of the tunnel. Valid values are <code>inactive</code> (tunnel has never been run), <code>degraded</code> (tunnel is active and able to serve traffic but in an unhealthy state), <code>healthy</code> (tunnel is active and able to serve traffic), or <code>down</code> (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

</summary>

One of the following:

const TunnelListResponseTunnelWARPConnectorTunnelStatusInactive TunnelListResponseTunnelWARPConnectorTunnelStatus = "inactive"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelStatusDegraded TunnelListResponseTunnelWARPConnectorTunnelStatus = "degraded"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelStatusHealthy TunnelListResponseTunnelWARPConnectorTunnelStatus = "healthy"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelStatusDown TunnelListResponseTunnelWARPConnectorTunnelStatus = "down"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20status">Link to this property</a>

<details>

<summary>

TunType TunnelListResponseTunnelWARPConnectorTunnelTunTypeOptional

The type of tunnel.

</summary>

One of the following:

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeCfdTunnel TunnelListResponseTunnelWARPConnectorTunnelTunType = "cfd\_tunnel"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%200">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeWARPConnector TunnelListResponseTunnelWARPConnectorTunnelTunType = "warp\_connector"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%201">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeWARP TunnelListResponseTunnelWARPConnectorTunnelTunType = "warp"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%202">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeMagic TunnelListResponseTunnelWARPConnectorTunnelTunType = "magic"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%203">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeIPSec TunnelListResponseTunnelWARPConnectorTunnelTunType = "ip\_sec"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%204">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeGRE TunnelListResponseTunnelWARPConnectorTunnelTunType = "gre"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%205">Link to this property</a>

const TunnelListResponseTunnelWARPConnectorTunnelTunTypeCNI TunnelListResponseTunnelWARPConnectorTunnelTunType = "cni"

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20tun_type">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.tunnels%20%3E%20(model)%20TunnelListResponse%20%3E%20(schema)>)

### List All Tunnels

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.ZeroTrust.Tunnels.List(context.TODO(), zero_trust.TunnelListParams{
    AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "account_tag": "699d98642c564d2e855e9661899b7252",
      "config_src": "cloudflare",
      "connections": [
        {
          "id": "1bedc50d-42b3-473c-b108-ff3d10c0d925",
          "client_id": "1bedc50d-42b3-473c-b108-ff3d10c0d925",
          "client_version": "2022.7.1",
          "colo_name": "DFW",
          "is_pending_reconnect": false,
          "opened_at": "2021-01-25T18:22:34.317854Z",
          "origin_ip": "10.1.0.137",
          "uuid": "1bedc50d-42b3-473c-b108-ff3d10c0d925"
        }
      ],
      "conns_active_at": "2009-11-10T23:00:00Z",
      "conns_inactive_at": "2009-11-10T23:00:00Z",
      "created_at": "2021-01-25T18:22:34.317854Z",
      "deleted_at": "2009-11-10T23:00:00Z",
      "metadata": {},
      "name": "blog",
      "remote_config": true,
      "status": "healthy",
      "tun_type": "cfd_tunnel"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
      "account_tag": "699d98642c564d2e855e9661899b7252",
      "config_src": "cloudflare",
      "connections": [
        {
          "id": "1bedc50d-42b3-473c-b108-ff3d10c0d925",
          "client_id": "1bedc50d-42b3-473c-b108-ff3d10c0d925",
          "client_version": "2022.7.1",
          "colo_name": "DFW",
          "is_pending_reconnect": false,
          "opened_at": "2021-01-25T18:22:34.317854Z",
          "origin_ip": "10.1.0.137",
          "uuid": "1bedc50d-42b3-473c-b108-ff3d10c0d925"
        }
      ],
      "conns_active_at": "2009-11-10T23:00:00Z",
      "conns_inactive_at": "2009-11-10T23:00:00Z",
      "created_at": "2021-01-25T18:22:34.317854Z",
      "deleted_at": "2009-11-10T23:00:00Z",
      "metadata": {},
      "name": "blog",
      "remote_config": true,
      "status": "healthy",
      "tun_type": "cfd_tunnel"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
```