---
title: "List targets"
method: GET
path: "/targets"
tags: ["targets"]
---

# List targets

`GET /targets`

Retrieves targets based on query parameters

## Query parameters

- `query` string

## Response `200`

OK: List of targets.

- ModelTarget[]
  - `Config` integer[]
  - `ConfigSchema` ModelConfigSchema
    - `Hints` object
  - `Discoverable` boolean
  - `Label` string
  - `Namespace` string
  - `Reaping` integer[] — Reaping holds the target's reaping behaviour. It is stored as a raw JSON message (not the ReapingBehaviour interface) because Target is embedded in structs that round-trip through json.Marshal/Unmarshal for persistence, and encoding/json cannot unmarshal a present JSON object into a nil interface field. Use ParseReaping to decode it.
  - `Version` integer

## Other responses

- `404` — Not Found: No targets found.
- `500` — Internal Server Error.

---

[API](https://skmtc.dev/platform-engineering-labs/apis/formae-rest-api.md) · [All operations](https://skmtc.dev/platform-engineering-labs/apis/formae-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/platform-engineering-labs/formae-rest-api/revisions/17a8f5fd7318/schema)
