Manage session environments
Run an environment-control operation. Every request, including list and get, requires an Idempotency-Key. Reuse the key only when retrying the same request.
/v1/sessions/{session_id}/environmentsAuthorization
serverToken The server's BRAIN_API_TOKEN, sent as Authorization: Bearer . Required for application API calls when configured; optional only on a loopback server started without a token.
In: header
Path Parameters
^ses_[A-Za-z0-9]{20,32}$Header Parameters
1 <= length <= 256Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The same service request in every extension role and transport.
The same service request in every extension role and transport.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/sessions/string/environments" \ -H "Idempotency-Key: string" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "operation": "list" }'nullPrepare reusable code on the built-in Environment workers POST
Waits until the declared artifacts are loaded on eligible workers. Preparation is retained for this server process, restored after worker replacement, and independent of session lifetime. Repeating the request checks current resources again. It grants no session authority.
Call an environment method POST
Next Page