---
title: "What a tunnel publishes for environments, or would once turned on."
method: GET
path: "/ingress/connectors/{id}/environment-hosts"
tags: ["Reachability"]
---

# What a tunnel publishes for environments, or would once turned on.

`GET /ingress/connectors/{id}/environment-hosts`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ingress/connectors/{id}/environment-hosts`
- Auth: HTTP bearer

Every environment's host under the tunnel's domain, its publication
state, why one got a short-hash name, and the environments it refuses
(private, signed-in only, hosted elsewhere).

## Path parameters

- `id` integer, required

## Response `200`

- EnvironmentHostsResponse: `GET`/`PUT /ingress/connectors/{id}/environment-hosts`.
  - `confirm_token` string, required: Send back as `confirm` to turn it on or off. It names exactly the hosts listed here, so a list that changed since it was shown is not accepted.
  - `connector_id` integer, required
  - `connector_name` string, required
  - `domain` string, required
  - `enabled` boolean, required
  - `enabled_elsewhere` string, nullable: The tunnel that has environment hosts on instead, if another does: at most one may.
  - `host_suffix` string, nullable: The tunnel's hostname suffix: environments are published as `<label>-<suffix>.<domain>` with one, `<label>.<domain>` without.
  - `hosts` EnvironmentHostView[], required: The hosts it publishes, or would publish once turned on.
    - `environment_id` integer, required
    - `environment_name` string, required
    - `hostname` string, required: The host, or the one it would get.
    - `last_error` string, nullable
    - `note` string, nullable: Why the host is not `<label>.<domain>`, when it is the short-hash name.
    - `project_slug` string, required
    - `state` string, required: `published`, `pending`, `error`, or `planned` before the opt-in.
  - `preview_domain_usable` boolean, required: The preview domain is usable: existing hosts stay, no new ones are generated.
  - `refused` EnvironmentHostRefusal[], required
    - `environment_id` integer, required
    - `environment_name` string, required
    - `project_slug` string, required
    - `reason` string, required
  - `warning` string, required

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: No such tunnel
- `500`: Internal server error

## Changes

- **2026-11-06** `1d647563dab0`: 1 info
  - added the optional property `host_suffix` to the response with the `200` status
- **2026-10-26** `b628d915a962`: 1 info
  - added the required property `confirm_token` to the response with the `200` status
- **2026-10-26** `a62e8f318100`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ingress/connectors/:id/environment-hosts/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
