---
title: "Recommend node pinning for an environment (internal, operator-only)"
method: GET
path: "/internal/environments/{environment_id}/placement/recommendation"
tags: ["Workload Placement"]
---

# Recommend node pinning for an environment (internal, operator-only)

`GET /internal/environments/{environment_id}/placement/recommendation`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/internal/environments/{environment_id}/placement/recommendation`
- Auth: HTTP bearer

An ADR-055 migration control for operators and the CLI; the console does
not show it. Environments default to `legacy` and need no change here.

## Path parameters

- `environment_id` integer, required

## Query parameters

- `window_days` integer, nullable

## Response `200`

- PinningRecommendationResponse
  - `changes_placement` boolean, required
  - `current_nodes` integer[], required
  - `environment_id` integer, required
  - `moved_between_nodes` boolean, required: Unpinned and moved between nodes: show the recommendation.
  - `nodes_used` integer[], required: Distinct nodes the environment ran on in the window.
  - `reasons` string[], required
  - `recommended_nodes` integer[], required: The recommended `target_nodes`. Recommended, never applied.
  - `window_days` integer, required

## Other responses

- `400`: Invalid window
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Environment not found
- `500`: Storage failed

## Changes

- **2026-11-09** `12896146b193`: 5 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - …1 more
- **2026-10-28** `b8d51a990805`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/internal/environments/:environment_id/placement/recommendation/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)
