---
title: "List all targets for a control plane"
method: GET
path: "/v2/control-planes/{controlPlaneId}/core-entities/targets"
tags: ["Targets"]
---

# List all targets for a control plane

`GET /v2/control-planes/{controlPlaneId}/core-entities/targets`

Returns a collection of all targets for a control plane.

## Query parameters

- `size` integer
- `offset` string
- `tags` string

## Response `200`

A paginated list response for a collection of targets.

- object
  - `data` Target[]
    - `created_at` number, nullable — Unix epoch when the resource was created.
    - `failover` boolean, nullable — Whether to use this target only as backup or not.
    - `id` string, nullable — A string representing a UUID (universally unique identifier).
    - `tags` string[], nullable — An optional set of strings associated with the Target for grouping and filtering.
    - `target` string, nullable, required — The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the `port` value will be overridden by the value from the DNS record.
    - `updated_at` number, nullable — Unix epoch when the resource was last updated.
    - `upstream` object, nullable — The unique identifier or the name of the upstream for which to update the target.
      - `id` string
    - `weight` integer, nullable — The weight this target gets within the upstream loadbalancer (`0`-`65535`). If the hostname resolves to an SRV record, the `weight` value will be overridden by the value from the DNS record.
  - `next` string — URI to the next page (may be null)
  - `offset` string — Offset is used to paginate through the API. Provide this value to the next list operation to fetch the next page

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/kong/apis/konnect-api-go-sdk.md) · [All operations](https://skmtc.net/kong/apis/konnect-api-go-sdk/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/konnect-api-go-sdk/versions/f920f418f552/schema)
