Get or create an unnamed environment for a composed stack
GET-OR-CREATE an UNNAMED, content-addressed environment for a composed stack — a host plus an optional server group, model override, computer image and pinned skills.
Distinct from POST /environments, which mints a NAMED row that lands in the project's environment list forever. A composed stack is a throwaway: the caller wants to run this exact combination, not to add a permanent entry someone else has to reason about.
Deduplicated by a server-side fingerprint of the stack, so the same stack always returns the same environment. created says which happened — the status is 200 either way, because get-or-create cannot honestly answer 201 on the dedupe path.
A deployment that predates ad-hoc environments answers 400 with details.reason: "ADHOC_UNAVAILABLE".
Requires project membership (admin only when the stack pins plugin versions). Promote one to a named environment with POST /environments/{environmentId}/name.
Path parameters
ID of the hosted project that contains the server.
Request body
Response
The environment for this stack, created or reused.