Run and verify the environment's setup script
Requires Idempotency-Key because this operation provisions billable compute. Provisions fresh compute for the environment, runs its setup script exactly as a session would (same image, resources, and variables; no session credentials), records every line of output, profiles the compute, releases it, and writes the verdict to the environment’s setupVerification. Returns 201 with the queued run; poll managedAgentsGetEnvironmentSetupRunV2 with waitSeconds until status is succeeded, failed, or cancelled. On failure read hint, failedLine, and stderrTail first, then the log. One run at a time per environment: a second request while one is in flight is a 409 naming the run to poll. Repeating the exact request with the same Idempotency-Key replays the original 201 response without starting another run. 400 when the environment has no setup script. This spends compute. When the tenant is out of credit, returns 403 setup_run_not_admitted with details.reason out_of_credit; buy credits and retry. A suspended tenant gets the same 403 with details.reason tenant_suspended. An unavailable credit check returns 503 setup_run_admission_unavailable without recording a run.
Authorizations
Headers
Replay-protection key in an organization-wide namespace shared by keyed mutations. It must contain 1 to 256 visible ASCII characters and be sent as exactly one header value. Request identity is the exact HTTP method, escaped path, raw query, and raw body bytes. The same request replays the original successful response; any different request returns 409 idempotency_conflict, and an active matching request returns 409 idempotency_in_progress. Completed receipts are retained for approximately 24 hours, pending claims may be reclaimed after approximately 1 hour, and no deduplication is guaranteed after expiry.
1 - 256^[!-~]+$Path Parameters
Body
Response
Created