---
title: "Returns HostnameGenerator entity"
method: GET
path: "/v3/mesh/control-planes/{cpId}/hostnamegenerators/{name}"
tags: ["HostnameGenerator"]
---

# Returns HostnameGenerator entity

`GET /v3/mesh/control-planes/{cpId}/hostnamegenerators/{name}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v3/mesh/control-planes/{cpId}/hostnamegenerators/{name}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

## Path parameters

- `cpId` string, uuid, required
- `name` string, required

## Response `200`

Successful response

- HostnameGeneratorItem: HostnameGenerator automatically generates DNS hostnames for services in the mesh based on customizable templates. It provides a consistent naming scheme for service discovery by creating predictable hostnames from service labels and metadata, supporting both MeshService, MeshExternalService, and MeshMultiZoneService resources.
  - `type` 'HostnameGenerator', required: the type of the resource
  - `kri` string: A unique identifier for this resource instance used by internal tooling and integrations. Typically derived from resource attributes and may be used for cross-references or indexing
  - `name` string, required: Name of the Kuma resource
  - `labels` object: The labels to help identity resources
  - `spec` object, required: Spec is the specification of the Kuma HostnameGenerator resource.
    - `extension` object: Extension struct for a plugin configuration
      - `config` unknown
      - `type` string, required: Type of the extension.
    - `selector` object
      - `meshExternalService` object
        - `matchLabels` object
      - `meshMultiZoneService` object
        - `matchLabels` object
      - `meshService` object
        - `matchLabels` object
    - `template` string, required
  - `creationTime` string, date-time: Time at which the resource was created
  - `modificationTime` string, date-time: Time at which the resource was updated

## Other responses

- `404`: Not Found

## Changes

- **2026-12-03** `9c8d300657bd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-beta/changes/v3/mesh/control-planes/:cpId/hostnamegenerators/:name/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-beta.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-beta/revisions/9c8d300657bd?raw)
