interpreter

Start an isolated interpreter context with its own state, directory and environment.

At most 4 contexts run in one sandbox; each is a process of the sandbox's own user.

post/v1/sandboxes/{id}/interpreter/contexts

Request

  • Base URL: https://api.withruntime.com
  • URL: https://api.withruntime.com/v1/sandboxes/{id}/interpreter/contexts
  • Auth: HTTP bearer

Path parameters

idstring required

Resource identifier (UUID).

Headers

Idempotency-Keystring

Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.

Request body

idstring

A context's id; each language's name is its default context, started on first use.

language'python' | 'javascript' | 'typescript' | 'r' | 'java' | 'bash' | 'go'

python by default. R, Java and Go are installed on first use (tens of seconds, once) when the image lacks them.

cwdstring
envobject

Environment variables for the context's process.

Response

Success

idstring
languagestring
processIdstring
cwdstring
statestring
startedAtinteger

Changes

No recorded changes to this operation across all 1 revision of this API.