# Describe Endpoint Service Zones API

## Analysis

| Area | Impact | Verification |
| --- | --- | --- |
| Console API | Add a read-only `SinkEndpointService` RPC under the existing sink endpoint collection. | Regenerate IDL and inspect swagger path. |
| Sink endpoint model | Resolve `cluster_id` to tenant/shared pool and delegate to regional TiCDC. | Unit test request mapping and response conversion. |
| Regional API client | Call cluster-service-ng TiCDC `DescribeEndpointServiceAvailabilityZones`. | Unit test path and query parameters. |
| Dependency | Bump the TiCDC API module to a version containing cluster-service-ng PR #2813. | `go test` compile confirms new proto symbols. |

## Execution Steps

1. Add `DescribeEndpointServiceAvailabilityZones` request/response messages and RPC to `dataflow-service-ng/idl/idl/dataflow/consoleapi/dataflow.proto`.
   - Success criteria: generated swagger exposes `GET /api/v1beta2/tidbs/{cluster_id}/sinkEndpoints/endpointServiceAvailabilityZones`.
2. Add domain request/response types and a `SinkEndpointModel` method.
   - Success criteria: controller remains a thin gRPC/domain conversion layer.
3. Add a regional TiCDC private link client method for `/api/v1/ticdcSinkEndpoints/endpointServiceAvailabilityZones`.
   - Success criteria: query parameters match the generated TiCDC swagger names.
4. Implement the model method by resolving the cluster with `MgmtSvcGrpcClient`, then passing shared pool ID, service name, and service region to TiCDC.
   - Success criteria: no frontend-visible `sharedPoolId` parameter is required.
5. Add focused unit tests for model and regional client behavior.
   - Success criteria: tests cover successful response mapping and regional error propagation.
6. Run generation and verification.
   - Commands: `make generate-idl`, focused `go test`, `git diff --check`, and a build target if time allows.

## Risks

- The TiCDC API dependency must point at a commit that includes cluster-service-ng PR #2813.
- Public API query parameter casing should follow generated swagger/client conventions.
- This PR should not change create endpoint semantics; it only adds a read-only discovery wrapper.
